Edgewall Software

Ticket #7856 (closed defect: fixed)

Opened 5 weeks ago

Last modified 5 weeks ago

Mercurial 1.1 does not work with Trac 0.11.2

Reported by: maxim.vuets@… Owned by: cboos
Priority: highest Milestone: not applicable
Component: plugin/mercurial Version: 0.11.2
Severity: critical Keywords: mercurial
Cc: bkocherov@…

Description

The following error happens on the /browser and /changeset pages (also maybe some else, but I don't know it yet).

System Information

Trac 0.11.2
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Mercurial 1.1

Python Traceback

Traceback (most recent call last):
  File "c:\usr\python\lib\site-packages\Trac-0.11.2-py2.5.egg\trac\web\main.py", line 432, in _dispatch_request
    dispatcher.dispatch(req)
  File "c:\usr\python\lib\site-packages\Trac-0.11.2-py2.5.egg\trac\web\main.py", line 204, in dispatch
    resp = chosen_handler.process_request(req)
  File "c:\usr\python\lib\site-packages\Trac-0.11.2-py2.5.egg\trac\versioncontrol\web_ui\browser.py", line 360, in process_request
    'dir': node.isdir and self._render_dir(req, repos, node, rev),
  File "c:\usr\python\lib\site-packages\Trac-0.11.2-py2.5.egg\trac\versioncontrol\web_ui\browser.py", line 406, in _render_dir
    entries = [entry(n) for n in node.get_entries()]
  File "build\bdist.win32\egg\tracext\hg\backend.py", line 690, in get_entries
    yield self.subnode(entry, dirnodes.get(entry+"/", None))
  File "build\bdist.win32\egg\tracext\hg\backend.py", line 645, in subnode
    return MercurialNode(self.repos, p, self.n, self.manifest, dirnode)
  File "build\bdist.win32\egg\tracext\hg\backend.py", line 586, in __init__
    self._init_path(log, path)
  File "build\bdist.win32\egg\tracext\hg\backend.py", line 607, in _init_path
    log_rev = self.file.linkrev(self.file_n)
  File "C:\usr\python\Lib\site-packages\mercurial\revlog.py", line 504, in linkrev
    return self.index[rev][4]
TypeError: list indices must be integers

Attachments

Change History

  Changed 5 weeks ago by cboos

This is because of hg:9fe97eea5510. I'll take this opportunity to switch to the filectx API, as this should ensure compatibility with former versions (probably not below 1.0, but at this stage I think we can forget about those versions).

follow-up: ↓ 3   Changed 5 weeks ago by cboos

  • priority changed from normal to highest
  • status changed from new to closed
  • resolution set to fixed
  • milestone set to not applicable

Should be fixed with r7742 and r7743 (for Trac trunk and MultipleRepositorySupport branch). I also tested these versions with Mercurial 1.0, and it seems to work fine as well.

I didn't see any other problems so far, but don't hesitate to reopen this ticket if other compatibility issues arise.

Also, I don't plan to support the 0.10 version of the plugin, but if someone contributes a patch, I could apply it if the patch takes care of compatibility with older (pre-1.0) Hg versions.

in reply to: ↑ 2   Changed 5 weeks ago by Maxim Vuets <maxim.vuets@…>

Replying to cboos:

Should be fixed with r7742 and r7743 (for Trac trunk and MultipleRepositorySupport branch). I also tested these versions with Mercurial 1.0, and it seems to work fine as well.

I tried r7742 for 0.11.2 and did not face with any problems. It is just very slow, so I'm waiting for applying patches from #7746 (;

Add/Change #7856 (Mercurial 1.1 does not work with Trac 0.11.2)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.