[Bug 3823] New: Merge fails with KeyError: '.hgsubstate'

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Thu Feb 14 05:01:49 CST 2013


http://bz.selenic.com/show_bug.cgi?id=3823

          Priority: normal
            Bug ID: 3823
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: Merge fails with KeyError: '.hgsubstate'
          Severity: bug
    Classification: Unclassified
                OS: Mac OS
          Reporter: lwarxx at gmail.com
          Hardware: Macintosh
            Status: UNCONFIRMED
           Version: 2.5
         Component: Mercurial
           Product: Mercurial

Merge fails when right branch contains commit with updated subrepository and at
least one additional changeset. So far it happens only with one repository.

For example, this works (commits are merged to feature branch one by one):

hg up default
<modify some file>
hg ci -m 'modify file'
hg up feature
hg merge default
hg ci -m 'merge'
hg up default
hg up -R subrepo
hg ci -m 'update subrepo'
hg up feature
hg merge default
hg ci -m 'merge'

And this fails (two commits merged to feature branch at once):

hg up default
<modify some file>
hg ci -m 'modify file'
hg up -R subrepo
hg ci -m 'update subrepo'
hg up feature
hg merge default

The exception is below:

** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.3 (default, Nov 19 2012, 00:46:55) [GCC 4.2.1 Compatible Apple
Clang 4.1 ((tags/Apple/clang-421.11.66))]
** Mercurial Distributed SCM (version 2.5)
** Extensions loaded: pager, mq, color, rebase, graphlog, fetch, notify,
patchbomb, convert, record, eol, purge, transplant
Traceback (most recent call last):
  File "/opt/local/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 28, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 65, in dispatch
    return _runcatch(req)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 88, in _runcatch
    return _dispatch(req)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 743, in _dispatch
    cmdpats, cmdoptions)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 514, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/extensions.py",
line 189, in wrap
    return wrapper(origfn, *args, **kwargs)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/hgext/color.py",
line 394, in colorcmd
    return orig(ui_, opts, cmd, cmdfunc)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/extensions.py",
line 189, in wrap
    return wrapper(origfn, *args, **kwargs)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/hgext/pager.py",
line 130, in pagecmd
    return orig(ui, options, cmd, cmdfunc)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 833, in _runcommand
    return checkargs()
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 804, in checkargs
    return cmdfunc()
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 740, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/util.py",
line 475, in check
    return func(*args, **kwargs)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/extensions.py",
line 144, in wrap
    util.checksignature(origfn), *args, **kwargs)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/util.py",
line 475, in check
    return func(*args, **kwargs)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/hgext/mq.py",
line 3508, in mqcommand
    return orig(ui, repo, *args, **kwargs)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/util.py",
line 475, in check
    return func(*args, **kwargs)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/commands.py",
line 4438, in merge
    return hg.merge(repo, node, force=opts.get('force'))
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/hg.py",
line 481, in merge
    stats = mergemod.update(repo, node, True, force, False)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/merge.py",
line 630, in update
    stats = applyupdates(repo, actions, wc, p2, pa, overwrite)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/merge.py",
line 391, in applyupdates
    r = ms.resolve(fd, wctx, mctx)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/merge.py",
line 67, in resolve
    if self[dfile] == 'r':
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/merge.py",
line 57, in __getitem__
    return self._state[dfile][0]
KeyError: '.hgsubstate'

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


More information about the Mercurial-devel mailing list