Opened 18 years ago
Closed 18 years ago
#5706 closed defect (fixed)
"View changes" triggers a NotImplementedError:
| Reported by: | jwiles | Owned by: | Christian Boos | 
|---|---|---|---|
| Priority: | normal | Milestone: | not applicable | 
| Component: | version control | Version: | |
| Severity: | normal | Keywords: | hg | 
| Cc: | jwiles@…, shunichi.goto@… | Branch: | |
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
How to Reproduce
While doing a GET operation on /changeset, Trac issued an internal error.
This happens any time I click the button labeled "View changes", to view changes between selected revisions (/log/{respository path}).
I am using the Mercurial plugin 0.11.
Request parameters:
{'new': u'61:39f15e9acc1f@trunk/mono-transform.sh',
 'old': u'44:e80cdb5ece16@trunk/mono-transform.sh'}
System Information
| Trac |  0.11dev-r5823 
 | 
| Python |  2.4.3 (#1, Apr  3 2007, 09:54:27)  [GCC 4.1.1 (Gentoo 4.1.1)] 
 | 
| setuptools |  0.6c3 
 | 
| SQLite |  3.3.17 
 | 
| pysqlite |  2.3.3 
 | 
| Genshi |  0.5dev-r676 
 | 
| Pygments |  0.8.1 
 | 
| Mercurial |  0.9.3 
 | 
Python Traceback
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Trac-0.11dev_r5823-py2.4.egg/trac/web/main.py", line 434, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/Trac-0.11dev_r5823-py2.4.egg/trac/web/main.py", line 217, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/Trac-0.11dev_r5823-py2.4.egg/trac/versioncontrol/web_ui/changeset.py", line 319, in process_request
    self._render_html(req, repos, chgset, restricted, xhr, data)
  File "/usr/lib/python2.4/site-packages/Trac-0.11dev_r5823-py2.4.egg/trac/versioncontrol/web_ui/changeset.py", line 523, in _render_html
    for old_node, new_node, kind, change in get_changes():
  File "/usr/lib/python2.4/site-packages/Trac-0.11dev_r5823-py2.4.egg/trac/versioncontrol/web_ui/changeset.py", line 420, in get_changes
    old_path=data['old_path'], old_rev=data['old_rev']):
  File "/usr/lib/python2.4/site-packages/Trac-0.11dev_r5823-py2.4.egg/trac/versioncontrol/api.py", line 306, in get_changes
    raise NotImplementedError
NotImplementedError
Attachments (1)
Change History (8)
comment:1 by , 18 years ago
| Owner: | changed from to | 
|---|---|
| Version: | devel | 
comment:2 by , 18 years ago
| Component: | general → version control | 
|---|---|
| Keywords: | hg added | 
| Milestone: | → not applicable | 
Known and documented limitation. See also TracMercurial#FeaturesthatTracsvnhasbutnotcurrentlyimplementedforTrachg.
comment:3 by , 18 years ago
| Cc: | added | 
|---|
I have a patch to implement anydiff feature for mercurial plugin. I've implemented for 0.10.x and using for long while, but it is not well played on 0.11. Anyway, I attach a patch for 0.11 (diff against sandbox/mercurial-plugin-0.11 r5796).
by , 18 years ago
| Attachment: | mercurial-plugin-0.11-anydiff.patch added | 
|---|
Patch to add anydiff feature for mercurial plugin
comment:4 by , 18 years ago
| Status: | new → assigned | 
|---|
Thanks, I think it's a good starting point. When comparing directories however, it looks like sub-directories are not taken into account. Rather than using node.get_entries, we should perhaps look directly at the manifest(s) for comparing 2 different folders.
comment:5 by , 18 years ago
Well, actually the patch doesn't work at all for directories, as soon as they contain any subdirectory (e.g. the doc/ folder in mercurial repo: doing a diff from a revision log on that folder triggers a KeyError: u'doc/ja' exception).
But as it works fine for files, I've committed the patch as an intermediate step in r5946.
comment:6 by , 18 years ago
| Summary: | NotImplementedError: → "View changes" triggers a NotImplementedError: | 
|---|
comment:7 by , 18 years ago
| Resolution: | → fixed | 
|---|---|
| Status: | assigned → closed | 
I think I actually reworked that completely a while ago, in r6053.



  
Changing the targeted version and assigning to cboos, as this is an omission in the Mercurial plugin not Trac.