Issue #269 new

KeyError exception on push

Anonymous created an issue

I'm trying to push some code to a SVN repo. I have a few changesets committed against my hg repo that are not in the SVN repo. The history is linear - I committed on top of the head of the SVN repo and nobody else has made commits since.

Stack trace is as follows: {{{

!python

pushing to svn+http://repo/with/path/ searching for changes [r7620] user: some revision pulled 1 revisions merging <some files> merging <some files> saved backup bundle to /home/lindsey/var/repo/.hg/strip-backup/d7f825dc0f93-backup.hg
unknown exception encountered, please report by visiting http://mercurial.selenic.com/wiki/BugTracker Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5] Mercurial Distributed SCM (version 1.8) Extensions loaded: transplant, hgk, reviewboard, pager, fetch, graphlog, record, inotify, mq, histedit, prompt, tortoisehg.util.hgshelve, rdiff, extdiff, color, progress, rebase, subversion Traceback (most recent call last): File "/usr/bin/hg", line 38, in <module> mercurial.dispatch.run() File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 16, in run sys.exit(dispatch(sys.argv[1:])) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 36, in dispatch return _runcatch(u, args) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 58, in _runcatch return _dispatch(ui, args) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 601, in _dispatch cmdpats, cmdoptions) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 406, in runcommand ret = _runcommand(ui, options, cmd, d) File "/usr/lib/pymodules/python2.6/mercurial/extensions.py", line 178, in wrap return wrapper(origfn, *args, kwargs) File "/usr/lib/pymodules/python2.6/hgext/color.py", line 224, in colorcmd return orig(ui_, opts, cmd, cmdfunc) File "/usr/lib/pymodules/python2.6/mercurial/extensions.py", line 178, in wrap return wrapper(origfn, args, kwargs) File "/usr/lib/pymodules/python2.6/hgext/pager.py", line 103, in pagecmd return orig(ui, options, cmd, cmdfunc) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 655, in _runcommand return checkargs() File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 609, in checkargs return cmdfunc() File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 598, in <lambda> d = lambda: util.checksignature(func)(ui, *args, cmdoptions) File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 433, in check return func(args, kwargs) File "/usr/lib/pymodules/python2.6/mercurial/extensions.py", line 133, in wrap util.checksignature(origfn), *args, kwargs) File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 433, in check return func(args, kwargs) File "/usr/local/mercurial-subversion/hgsubversion/wrappers.py", line 495, in generic return orig(ui, repo, *args, opts) File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 433, in check return func(args, kwargs) File "/usr/lib/pymodules/python2.6/mercurial/extensions.py", line 133, in wrap util.checksignature(origfn), *args, kwargs) File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 433, in check return func(args, kwargs) File "/usr/local/mercurial-prompt/prompt.py", line 367, in _push_with_cache res = orig(ui, repo, *args, opts) File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 433, in check return func(args, kwargs) File "/usr/lib/pymodules/python2.6/mercurial/extensions.py", line 133, in wrap util.checksignature(origfn), *args, kwargs) File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 433, in check return func(args, kwargs) File "/usr/lib/pymodules/python2.6/hgext/mq.py", line 3047, in mqcommand return orig(ui, repo, *args, kwargs) File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 433, in check return func(args, kwargs) File "/usr/lib/pymodules/python2.6/mercurial/commands.py", line 3019, in push newbranch=opts.get('new_branch')) File "/usr/local/mercurial-subversion/hgsubversion/svnrepo.py", line 48, in wrapper return fn(self, *args, opts) File "/usr/local/mercurial-subversion/hgsubversion/svnrepo.py", line 59, in push return wrappers.push(self, remote, force, revs) File "/usr/local/mercurial-subversion/hgsubversion/wrappers.py", line 162, in push base_revision = hashes[base_ctx.node()][0] KeyError: '\xdd\tS\x95\xbf;\x13\xe7\xd4\xfe\x9bz\xd3j\x85;\xd6A%\xe4'

}}}

Comments (6)

  1. Anonymous

    Forgot to mention - on doing a `hg push`, the first new revision is correctly pushed to the SVN server. It also shows in my local history, but it appears with as two revisions. One is the subversion revision (it shows a SVN rev number), but also the "old" hg commit.

  2. Anonymous

    After some investigation it seems to be due to having multiple changesets to push. I transplanted a single changeset to a new, clean checkout from SVN and it pushed without error.

  3. Anonymous

    Is `hg svn rebuildmeta` supposed to return any output? I tried it and it completed suspiciously quick, with nothing returned.

    It didn't fix the problem either.

  4. MrTact

    I encountered this problem today, as well. I, however, am working in a team environment and did an hg rebase --svn. I also have multiple changes to commit.

    No dice doing the rebuildmeta, either.

    Haven't figured out how to resolve the problem yet, but I will update here if I find anything (besides the aforementioned "push one commit from a different clone").

  5. Log in to comment