Opened 17 years ago
Closed 17 years ago
#7003 closed defect (fixed)
No such changeset error after a login attempt
Reported by: | dkt | Owned by: | Christian Boos |
---|---|---|---|
Priority: | high | Milestone: | not applicable |
Component: | plugin/mercurial | Version: | |
Severity: | normal | Keywords: | |
Cc: | remy.blank@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I'm using a multirepo branch of Trac and Mercurial plugin 0.12.
I get the following error when I try to login:
No changeset None in the repository
I read the file log but I have no clue what's wrong.
2008-03-13 17:50:34,392 Trac[loader] DEBUG: Loading hg from /var/trac/qutecom/plugins/TracMercurial-0.12.0.1-py2.5.egg 2008-03-13 17:50:34,395 Trac[default_workflow] DEBUG: Workflow actions at initialization: {'resolve': {'operations': [u'set_resolution'], 'name': 'resolve', 'default': 0, 'newstate': u'closed', 'oldstates': [u'new', u'assigned', u'accepted', u'reopened'], 'permissions': [u'TICKET_MODIFY']}, 'accept': {'operations': [u'set_owner_to_sel f'], 'name': 'accept', 'default': 0, 'newstate': u'accepted', 'oldstates': [u'new', u'assigned', u'accepted', u'reopened'], 'permissions': [u'TICKET_MODIFY']}, 'leave': {'operations': [u'leave_status'], 'name': 'leave', 'default': 1, 'newstate': u'*', 'oldstates': [u'*'], 'permissions': []}, 'reopen': {'operations': [u'del_resolution' ], 'name': 'reopen', 'default': 0, 'newstate': u'reopened', 'oldstates': [u'closed'], 'permissions': [u'TICKET_CREATE']}, 'reassign': {'operations': [u'set_owner'], 'na me': 'reassign', 'default': 0, 'newstate': u'assigned', 'oldstates': [u'new', u'assigned', u'accepted', u'reopened'], 'permissions': [u'TICKET_MODIFY']}, '_reset': {'op erations': ['reset_workflow'], 'name': 'reset', 'default': 0, 'newstate': 'new', 'oldstates': [], 'permissions': []}} 2008-03-13 17:50:34,397 Trac[env] WARNING: base_url option not set in configuration, generated links may be incorrect 2008-03-13 17:50:34,397 Trac[main] DEBUG: Dispatching <Request "GET u'/login'"> 2008-03-13 17:50:34,405 Trac[svn_fs] DEBUG: Subversion bindings imported 2008-03-13 17:50:34,421 Trac[main] WARNING: 404 No such changeset (No changeset None in the repository)
Attachments (3)
Change History (11)
comment:1 by , 17 years ago
Component: | general → plugin/mercurial |
---|---|
Milestone: | 0.11 → not applicable |
Owner: | changed from | to
Priority: | normal → high |
by , 17 years ago
Attachment: | hg.2.patch added |
---|
Patch of mercurial plugin (previous comment attached file is wrong)
comment:2 by , 17 years ago
I've put in attachment some patches which correct bug. As expected, bug came from a rev!=None with rev in string format. I had another bug with multirepo branch during request matching. When a login request is done (/login), the logModule matches and authentication is messed up. The attached patch redefines the matching pattern.
comment:4 by , 17 years ago
Thanks, this worked for me too. Without these patches, I could not log in at all, making Trac not very useful.
comment:5 by , 17 years ago
comment:6 by , 17 years ago
How about MercurialRepository.normalize_rev()
? A simple search for str(rev)
turned that up, so good guess!
I have the same problem with two repositories, an SVN repo as the default and an additional Mercurial repo. The error comes when I select the root of the Hg repo, then click on "Revision log". The url is:
However, if I change the url to the following, the problem disappears:
Probably because rev
becomes the empty string instead of None
.
The following patch fixes the problem for me:
-
tracext/hg/backend.py
292 292 293 293 def normalize_rev(self, rev): 294 294 """Return the changelog node for the specified rev""" 295 return self.hg_display(self.hg_node(str(rev))) 295 if rev is not None: 296 rev = str(rev) 297 return self.hg_display(self.hg_node(rev)) 296 298 297 299 def short_rev(self, rev): 298 300 """Return the revision number for the specified rev, in compact form.
comment:7 by , 17 years ago
Cc: | added |
---|
comment:8 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Right, that was it.
Fixed in [6854:6858] (hm, sorry for the mess).
I have that as well, must be a
str(rev)
withrev==None
somewhere.