Edgewall Software
Modify

Opened 17 years ago

Closed 17 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)

mercurial-plugin-0.11-anydiff.patch (2.9 KB ) - added by Shun-ichi Goto <shunichi.goto@…> 17 years ago.
Patch to add anydiff feature for mercurial plugin

Download all attachments as: .zip

Change History (8)

comment:1 by Alec Thomas, 17 years ago

Owner: changed from Jonas Borgström to Christian Boos
Version: devel

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

comment:2 by Christian Boos, 17 years ago

Component: generalversion control
Keywords: hg added
Milestone: not applicable

comment:3 by Shun-ichi Goto <shunichi.goto@…>, 17 years ago

Cc: shunichi.goto@… 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 Shun-ichi Goto <shunichi.goto@…>, 17 years ago

Patch to add anydiff feature for mercurial plugin

comment:4 by Christian Boos, 17 years ago

Status: newassigned

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 Christian Boos, 17 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 Christian Boos, 17 years ago

Summary: NotImplementedError:"View changes" triggers a NotImplementedError:

comment:7 by Christian Boos, 17 years ago

Resolution: fixed
Status: assignedclosed

I think I actually reworked that completely a while ago, in r6053.

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.