strange error message when rebasing (incorrectly) keyword extension

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Sep 7 13:08:05 UTC 2016


Thanks for your report, can you create a bug at:

     http://bz.mercurial-scm.org/

Thanks,


On 09/07/2016 03:00 PM, Uwe Brauer wrote:
> Hi
>
> I generated a test repo like this
>  hg init
>  hg bookmark master
>  echo Upstream1 > main.txt
>  hg add main.txt
>  hg commit -m "Up one"
>  hg bookmark exam
>  echo exam1 > exam.txt
>  hg add exam.txt
>  hg commit -m "Exam 1"
>  echo exam2 >> exam.txt
>  hg commit -m "exam2"
>  hg update master
>  echo uwe-three >> main.txt
>  hg commit -m "Uwe three"
>  hg log -G
>
> Then I run
>
> hg rebase -s 2 -d 3
> this is wrong it should be
> hg rebase -s 1 -d 3
>
> But the error message looks puzzeling
>
> rebasing 2:c70195814452 "exam2" (exam)
> ** Unknown exception encountered with possibly-broken third-party extension hggit
> ** which supports versions 3.7 of Mercurial.
> ** Please disable hggit and try your action again.
>
> I did this and repeated the process, then hg complained about another
> 3prd party extension, which had nothing to do with the problem, when
> desactivation all extension I obtain
>
> remote changed exam.txt which local deleted
> use (c)hanged version, leave (d)eleted, or leave (u)nresolved? interrupted!
>
> And I found out it is the
> keyword extension which causes the following error message
>
> (hg rebase -s 1 -d 3 works!)
>
> traceback (most recent call last):
>   File "/usr/bin/hg", line 43, in <module>
>     mercurial.dispatch.run()
>   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 59, in run
>     sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
>   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 125, in dispatch
>     ret = _runcatch(req)
>   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 204, in _runcatch
>     return _dispatch(req)
>   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 887, in _dispatch
>     cmdpats, cmdoptions)
>   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 632, in runcommand
>     ret = _runcommand(ui, options, cmd, d)
>   File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 204, in closure
>     return func(*(args + a), **kw)
>   File "/usr/lib/python2.7/dist-packages/hgext/color.py", line 502, in colorcmd
>     return orig(ui_, opts, cmd, cmdfunc)
>   File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 204, in closure
>     return func(*(args + a), **kw)
>   File "/usr/lib/python2.7/dist-packages/hgext/pager.py", line 160, in pagecmd
>     return orig(ui, options, cmd, cmdfunc)
>   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 1017, in _runcommand
>     return checkargs()
>   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 978, in checkargs
>     return cmdfunc()
>   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 884, in <lambda>
>     d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
>   File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1005, in check
>     return func(*args, **kwargs)
>   File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 204, in closure
>     return func(*(args + a), **kw)
>   File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1005, in check
>     return func(*args, **kwargs)
>   File "/usr/lib/python2.7/dist-packages/hgext/mq.py", line 3519, in mqcommand
>     return orig(ui, repo, *args, **kwargs)
>   File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1005, in check
>     return func(*args, **kwargs)
>   File "/usr/lib/python2.7/dist-packages/hgext/rebase.py", line 404, in rebase
>     collapsef, target)
>   File "/usr/lib/python2.7/dist-packages/hgext/rebase.py", line 688, in rebasenode
>     labels=['dest', 'source'])
>   File "/usr/lib/python2.7/dist-packages/mercurial/merge.py", line 1598, in update
>     stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels)
>   File "/usr/lib/python2.7/dist-packages/mercurial/merge.py", line 1259, in applyupdates
>     complete, r = ms.preresolve(f, wctx)
>   File "/usr/lib/python2.7/dist-packages/mercurial/merge.py", line 539, in preresolve
>     return self._resolve(True, dfile, wctx)
>   File "/usr/lib/python2.7/dist-packages/mercurial/merge.py", line 493, in _resolve
>     labels=self._labels)
>   File "/usr/lib/python2.7/dist-packages/mercurial/filemerge.py", line 681, in premerge
>     return _filemerge(True, repo, mynode, orig, fcd, fco, fca, labels=labels)
>   File "/usr/lib/python2.7/dist-packages/mercurial/filemerge.py", line 562, in _filemerge
>     if not fco.cmp(fcd): # files identical?
>   File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 204, in closure
>     return func(*(args + a), **kw)
>   File "/usr/lib/python2.7/dist-packages/hgext/keyword.py", line 738, in kwfilectx_cmp
>     if (fctx._filerev is None and
> AttributeError: 'absentfilectx' object has no attribute '_filerev'
>
>
> Uwe Brauer
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
>

-- 
Pierre-Yves David



More information about the Mercurial mailing list