[fold: different for branches and bookmarks]
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Wed Dec 21 19:51:58 UTC 2016
On 12/21/2016 08:40 PM, Uwe Brauer wrote:
>
> > On 12/19/2016 10:25 PM, Arne Babenhauserheide wrote:
>
> > The call `hg fold -r master -r feature` seems wrong. It will fold
> > '(master+feature)::. + .::(master+feature)' Most certainly not what
> > you want as master will be included in the resulting folded
> > changesets.
>
> > You want `hg fold --exact 'only(master, feature)'
> that is supposed to work with branches as well?
> For me it does not work.
>
> Here is what I did
>
> hg init
> echo feature > new.el
> hg add new.el
> hg commit -m feature1
> echo offical2 >> new.el
> hg commit -m feature2
> echo feature3 >> new.el
> hg commit -m feature3
> hg branch feature
> echo feature > feature.el
> hg add feature.el
> hg commit -m feature
> echo feature2 >> feature.el
> hg commit -m feature2
>
> And then I run
> hg fold --exact 'only(default, feature)'
>
> And I obtain the following errors
> ** 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.
> ** If that fixes the bug please report it to https://bitbucket.org/durin42/hg-git/issues
> ** Python 2.7.6 (default, Jun 22 2015, 18:00:18) [GCC 4.8.2]
> ** Mercurial Distributed SCM (version 4.0-rc)
> ** Extensions loaded: evolve, eol, hgk, hggit, fetch, rebase, shelve, largefiles, purge, histedit, pager, record, color, convert, keyword, strip, mq
> Traceback (most recent call last):
> File "/usr/bin/hg", line 45, in <module>
> mercurial.dispatch.run()
> File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 60, in run
> sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
> File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 126, in dispatch
> ret = _runcatch(req)
> File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 216, in _runcatch
> return callcatch(ui, _runcatchfunc)
> File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 225, in callcatch
> return func()
> File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 205, in _runcatchfunc
> return _dispatch(req)
> File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 901, in _dispatch
> cmdpats, cmdoptions)
> File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 650, in runcommand
> ret = _runcommand(ui, options, cmd, d)
> File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 220, in closure
> return func(*(args + a), **kw)
> File "/usr/lib/python2.7/dist-packages/hgext/color.py", line 521, in colorcmd
> return orig(ui_, opts, cmd, cmdfunc)
> File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 220, 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 909, in _runcommand
> return cmdfunc()
> File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 898, in <lambda>
> d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
> File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1037, in check
> return func(*args, **kwargs)
> File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 220, in closure
> return func(*(args + a), **kw)
> File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1037, in check
> return func(*args, **kwargs)
> File "/usr/lib/python2.7/dist-packages/hgext/mq.py", line 3540, in mqcommand
> return orig(ui, repo, *args, **kwargs)
> File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1037, in check
> return func(*args, **kwargs)
> File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 220, in closure
> return func(*(args + a), **kw)
> File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1037, in check
> return func(*args, **kwargs)
> File "/home/oub/ALLES/src/evolve/hgext/evolve.py", line 732, in warnobserrors
> ret = orig(ui, repo, *args, **kwargs)
> File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1037, in check
> return func(*args, **kwargs)
> File "/home/oub/ALLES/src/evolve/hgext/evolve.py", line 3142, in fold
> targetphase = max(c.phase() for c in allctx)
> ValueError: max() arg is an empty sequence
It looks like your fold is empty and that fold unfriendly crash in that
case. Can you submit a bug? (and test latest evolve first if you are not
using it yet)
--
Pierre-Yves David
More information about the Mercurial
mailing list