Opened 18 years ago
Closed 17 years ago
#6676 closed defect (fixed)
TracMercurial: Comparing two revisions appears to be unimplemented
| Reported by: | anonymous | Owned by: | Christian Boos |
|---|---|---|---|
| Priority: | normal | Milestone: | not applicable |
| Component: | plugin/mercurial | Version: | 0.10.4 |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description (last modified by )
With Trac 10.4 (installed on a Fedora 8 system via yum) and the TracMercurial plugin taken from the repository head, trying to compare two revisions in the revision log using "View Changes" results in an error:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 406, in dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 237, in dispatch
resp = chosen_handler.process_request(req)
File "/usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/changeset.py", line 254, in process_request
diff_args, diff_options)
File "/usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/changeset.py", line 479, in _render_html
for old_node, new_node, kind, change in get_changes():
File "/usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/changeset.py", line 366, in get_changes
for d in repos.get_changes(**diff):
File "/usr/lib/python2.5/site-packages/trac/versioncontrol/api.py", line 282, in get_changes
raise !NotImplementedError
!NotImplementedError
What's puzzling about this is that Repository.get_changes is not overridden in the Mercurial plugin, so it appears this functionality could never have worked at all. But I assume that's not true or the diffs on the TracMercurial page couldn't have been produced. Any clues?
Attachments (1)
Change History (5)
comment:1 by , 18 years ago
| Component: | version control → plugin/mercurial |
|---|---|
| Description: | modified (diff) |
| Resolution: | → worksforme |
| Status: | new → closed |
| Version: | → 0.10.4 |
by , 17 years ago
| Attachment: | diff_backport.patch added |
|---|
patch to make diff'ing work for trac 0.10.4
comment:2 by , 17 years ago
| Resolution: | worksforme |
|---|---|
| Status: | closed → reopened |
patch attached - please commit it. Thanks.
comment:3 by , 17 years ago
| Milestone: | → not applicable |
|---|
Ok, I take your word that this backport will work for 0.10.x, but I won't test it or support it myself.
comment:4 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
Patch applied in r7355, thanks!
I however restored the def sync(): pass method that you removed, as I think it can still be needed (Trac 0.10.3 IIRC).



This is not implemented for source:sandbox/mercurial-plugin, but it is for source:sandbox/mercurial-plugin-0.11, i.e. the version of the plugin adapted to 0.11. It should be possible to backport the changes, so if you feel like contributing a patch for that, please do.
Btw, the
Repository.get_changes()method is only used for comparing two arbitrary paths and/or revs, not for replaying the changes for a given changeset, which is a special case.