[Bug 5263] New: Splitting zero-file commit gives stack trace

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Wed Jun 8 19:56:23 UTC 2016


https://bz.mercurial-scm.org/show_bug.cgi?id=5263

            Bug ID: 5263
           Summary: Splitting zero-file commit gives stack trace
           Product: Mercurial
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: evolution
          Assignee: bugzilla at selenic.com
          Reporter: hg at pewpew.net
                CC: mercurial-devel at selenic.com,
                    pierre-yves.david at ens-lyon.org

In this repo, 0 is public, 1 is draft, and 2 is draft on branch 'foo'.
> hg xl
@  2:8b5056d7 foo spectral tip
|  branch foo
| o  1:ceea8395 spectral
|/   foo2
o  0:9366cf59 spectral
   foo

You can see that there's no files listed, because the commit to create the
branch is empty (has no files):
> hg debugdata -c 2
09b0c63914718d163062ac34d55ac4363b198362
Kyle Lippincott <spectral at google.com>
1465415450 25200 branch:foo

branch foo


Running `hg split` on this change gives a stack trace:
> HGRCPATH=/dev/null hg --config extensions.evolve=$HOME/src/hg/mutable-history/hgext/evolve.py split . 
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2]
** Mercurial Distributed SCM (version 3.8.1+37-983353035cec)
** Extensions loaded: evolve
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 891, in
_dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 636, in
runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 1021, in
_runcommand
    return checkargs()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 982, in
checkargs
    return cmdfunc()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 888, 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/local/google/home/spectral/src/hg/mutable-history/hgext/evolve.py", line
2942, in cmdsplit
    tip = repo[newcommits[-1]]
IndexError: list index out of range

(newcommits is empty because repo.status returned only empty lists).

Version information:
> hg -R $HOME/src/hg/mutable-history summary 
parent: 1711:7a2e0629bdee 
 inhibit: protect agains dropped 'bmstore.write'
branch: stable
bookmarks: @
commit: (clean)
update: (current)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list