953: Hg SCMTool doesn't support old mercurial installs

hugues.********@gmai***** (Google Code) (Is this you? Claim this profile.)
March 21, 2011
What's the URL of the page containing the problem?

http://[host]/r/9/diff/#index_header

What steps will reproduce the problem?
1. setup a Mercurial repository in review board with ssh access
2. post a review request (using post-review)
3. trying to view the diff in review-board

What is the expected output? What do you see instead?

Should display the patch but I get an exception:
The file 'helloworld.php' (r36e4e1329c74) could not be found in the repository: 'sshrepository' 
object has no attribute 'changectx'

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-
py2.4.egg/reviewboard/diffviewer/views.py", line 145, in view_diff
    interdiffset, highlighting, True)[0]
  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-
py2.4.egg/reviewboard/diffviewer/diffutils.py", line 619, in get_diff_files
    large_data=True)
  File "/usr/lib/python2.4/site-packages/Djblets-0.5alpha3-py2.4.egg/djblets/util/misc.py", 
line 143, in cache_memoize
    data = lookup_callable()
  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-
py2.4.egg/reviewboard/diffviewer/diffutils.py", line 618, in <lambda>
    enable_syntax_highlighting),
  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-
py2.4.egg/reviewboard/diffviewer/diffutils.py", line 341, in get_chunks
    old = get_original_file(filediff)
  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-
py2.4.egg/reviewboard/diffviewer/diffutils.py", line 248, in get_original_file
    large_data=True)[0]
  File "/usr/lib/python2.4/site-packages/Djblets-0.5alpha3-py2.4.egg/djblets/util/misc.py", 
line 143, in cache_memoize
    data = lookup_callable()
  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-
py2.4.egg/reviewboard/diffviewer/diffutils.py", line 247, in <lambda>
    data = cache_memoize(key, lambda: [fetch_file(file, revision)],
  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-
py2.4.egg/reviewboard/diffviewer/diffutils.py", line 227, in fetch_file
    data = tool.get_file(file, revision)
  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-
py2.4.egg/reviewboard/scmtools/hg.py", line 22, in get_file
    return self.client.cat_file(path, str(revision))
  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-
py2.4.egg/reviewboard/scmtools/hg.py", line 130, in cat_file
    raise FileNotFoundError(path, rev, str(e))
FileNotFoundError: The file 'helloworld.php' (r36e4e1329c74) could not be found in the 
repository: 'sshrepository' object has no attribute 'changectx'

What operating system are you using? What browser?
Centos 5.2 on server, OSX 10.5 Safari 4ß/Firefox 3.0.7

Please provide any additional information below.

Apache has a readonly access to our repositories with a public key authentication.
When under Apache account, clone works correctly without password needed, no exception.
The same repository can be accessed via hgwebdir but mirror path is not working (see #952)
#1 sandeep*******@gmai***** (Google Code) (Is this you? Claim this profile.)
I had the same problem even though I was not using SSH. The problem seems to be that
reviewboard's support for mercurial seems to be based on a newer version of the 'hg
python API'. Hence the 'sshrepository' object has no attribute 'changectx'. Upgrading
to mercurial 1.1.2 solved the problem for me. 
chipx86
#2 chipx86
Someone will need to volunteer to take on the work for this.
  • +Confirmed
  • +Component-SCMTools
david
#3 david
  • +Hg SCMTool doesn't support old mercurial installs
#4 deure*****@gmai***** (Google Code) (Is this you? Claim this profile.)
I think there are two bugs here.
#1 Not supporting old mercurial installs like sandeep says.
#2 Not supporting ssh HG repositories (even in newer versions of mercurial
sshrepository doesn't have a changectx)
david
#5 david
#2 is tracked in bug 547. As far as older hg, I don't think it's worth it now.
  • -Confirmed
    +WontFix