Edgewall Software
Modify

Opened 13 years ago

Closed 13 years ago

#10096 closed defect (fixed)

Cannot browse EMPTY mercurial repositories

Reported by: anonymous Owned by: Christian Boos
Priority: normal Milestone: 0.12.3
Component: plugin/mercurial Version: 0.12-stable
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

TracMercurial plugin shows an error like below when I access a trac with an empty mercurial repository (no changesets at all). If I add a changeset this bug disappears, so most users would not experience it though.

UnboundLocalError: local variable 'created_rev' referenced before assignment

And the traceback is:

File "/usr/local/lib/python2.6/dist-packages/trac/web/main.py", line 511, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/local/lib/python2.6/dist-packages/trac/web/main.py", line 237, in dispatch
  resp = chosen_handler.process_request(req)
File "/usr/local/lib/python2.6/dist-packages/trac/versioncontrol/web_ui/browser.py", line 371, in process_request
  node = get_existing_node(req, repos, path, rev_or_latest)
File "/usr/local/lib/python2.6/dist-packages/trac/versioncontrol/web_ui/util.py", line 64, in get_existing_node
  return repos.get_node(path, rev) 
File "/usr/local/lib/python2.6/dist-packages/TracMercurial-0.12.0.28dev_r10653-py2.6.egg/tracext/hg/backend.py", line 683, in get_node
  self.changectx(rev))
File "/usr/local/lib/python2.6/dist-packages/TracMercurial-0.12.0.28dev_r10653-py2.6.egg/tracext/hg/backend.py", line 889, in __init__
  self.created_rev = created_rev

also my environment is:

Trac 0.12.2
Genshi 0.6
Mercurial 1.8
mod_wsgi 3.2 (WSGIProcessGroup trac WSGIApplicationGroup %{GLOBAL})
pysqlite 2.4.1
Python 2.6.6 (r266:84292, Sep 15 2010, 16:41:53) [GCC 4.4.5]
setuptools 0.6
SQLite 3.7.2
jQuery 1.4.2

Attachments (0)

Change History (2)

comment:1 by Christian Boos, 13 years ago

Owner: set to Christian Boos

Thanks for the report, I'll fix it.

comment:2 by Christian Boos, 13 years ago

Resolution: fixed
Status: newclosed

Fixed in r10657 and r10658.

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.