ParseError: ('not a prefix: end', 41)

Angel Ezquerra ezquerra at
Mon Jun 13 02:11:57 CDT 2011

A user has recently reported the following traceback happening while
running the latest stable version of TortoiseHg:

** Mercurial version (1.8.4).  TortoiseHg version (2.0.5)
** Command: --nofork workbench
** CWD: C:\mais\xx_Data_\DataControl
** Extensions loaded: fixfrozenexts, hgk, highlight, fetch
** Python version: 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC
v.1500 32 bit (Intel)]
** Windows version: (6, 1, 7601, 2, 'Service Pack 1')
** Processor architecture: x86
** Qt-4.7.1 PyQt-4.8.3
Recoverable runtime error (stderr):
Traceback (most recent call last):
  File "tortoisehg\hgqt\revdetails.pyo", line 221, in onFileRevSelected
  File "tortoisehg\hgqt\fileview.pyo", line 306, in displayFile
  File "tortoisehg\hgqt\fileview.pyo", line 529, in __init__
  File "tortoisehg\hgqt\fileview.pyo", line 714, in readStatus
  File "tortoisehg\hgqt\fileview.pyo", line 668, in
  File "mercurial\commands.pyo", line 2671, in log
  File "mercurial\cmdutil.pyo", line 1119, in walkchangerevs
  File "mercurial\cmdutil.pyo", line 177, in revrange
  File "mercurial\revset.pyo", line 813, in match
  File "mercurial\parser.pyo", line 81, in parse
  File "mercurial\parser.pyo", line 73, in _parse
  File "mercurial\parser.pyo", line 45, in _parse
ParseError: ('not a prefix: end', 41)

I am trying to debug the problem but I am a bit stuck.

The problem happens on a part of the code that is trying to get the
subrepo information in order show it to the user. The tortoisehg code
in question is simply calling:

commands.log(_ui, srepo, **opts)

where srepo is the subrepository repo object, and opts is a dictionary
with the following fields:

opts = {'date':None, 'user':None, 'rev':[sto]}

"sto" is a string that contains the node id of the revision whose
information we want to get.

Looking at the parser code I don't really understand how we can get
that error. I've tried feeding the commands.log() call with invalid
data but I have not been able to reproduce the error. Any clues
regarding this issue would be appreciated.



More information about the Mercurial-devel mailing list