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

Idan Kamara idankk86 at gmail.com
Mon Jun 13 10:20:49 CDT 2011


On Mon, Jun 13, 2011 at 6:16 PM, Angel Ezquerra <ezquerra at gmail.com> wrote:
> On Mon, Jun 13, 2011 at 3:27 PM, Idan Kamara <idankk86 at gmail.com> wrote:
>> On Mon, Jun 13, 2011 at 10:11 AM, Angel Ezquerra <ezquerra at gmail.com> wrote:
>>> 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
>>> genSubrepoRevChangedDescription
>>>  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.
>>
>> back trace suggests it's a malformed revset string.
>>
>>>
>>> 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.
>>
>> Please paste the contents of sto.
>
> Thank you Idan.
>
> Unfortunatelly, I don't have the contents of sto. That is the variable
> that is used to set the value of the 'rev' key in the opts dictionary.
> The traceback does not tell us its value. It is a pity that when
> mercurial throws the error it does not show the fully revset as well
> :-(

Well, when running hg from the command line, you know what string
you passed in as -r...

>
> Anyway, if what you are saying that somehow the sto variable may
> contain some malformed string which in turn is causing the problem. Is
> that correct? In theory that should not be possible since sto should
> be a revision node id, but maybe I missed something on my first
> analysis of the code...

Right, but I don't know how thg constructs its revset string, it's
possible it has a bug.
That's why looking at the revset will tell us more.

Perhaps thg has a mode where it prints the hg commands it runs?


More information about the Mercurial-devel mailing list