Edgewall Software
Modify

Opened 17 years ago

Closed 16 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 Christian Boos)

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)

diff_backport.patch (3.4 KB ) - added by edgimar 16 years ago.
patch to make diff'ing work for trac 0.10.4

Download all attachments as: .zip

Change History (5)

comment:1 by Christian Boos, 17 years ago

Component: version controlplugin/mercurial
Description: modified (diff)
Resolution: worksforme
Status: newclosed
Version: 0.10.4

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.

by edgimar, 16 years ago

Attachment: diff_backport.patch added

patch to make diff'ing work for trac 0.10.4

comment:2 by edgimar, 16 years ago

Resolution: worksforme
Status: closedreopened

patch attached - please commit it. Thanks.

comment:3 by Christian Boos, 16 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 Christian Boos, 16 years ago

Resolution: fixed
Status: reopenedclosed

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).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.