Issue #27 invalid

revision with multiple parents cannot be pushed (caused by hg backout)

Kumar McMillan
created an issue

[using hgsubversion tip of 64:08be8ee73551]

I wanted to backout a changeset per http://www.bitbucket.org/durin42/hgsubversion/issue/26/handle-directory-creation-in-push

To do this I ran hg backout <revision>

After that, I ran hg merge and committed.

Now, hg svn out raises this error:

$ hg svn out unknown exception encountered, details follow report bug details to http://www.selenic.com/mercurial/bts or mercurial@selenic.com Mercurial Distributed SCM (version 00d76fa3ffba+20081101) Extensions loaded: mq, rebase, svn Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/bin/hg", line 20, in <module> mercurial.dispatch.run() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5//lib/python2.5/site-packages/mercurial/dispatch.py", line 20, in run sys.exit(dispatch(sys.argv[1:])) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5//lib/python2.5/site-packages/mercurial/dispatch.py", line 29, in dispatch return _runcatch(u, args) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5//lib/python2.5/site-packages/mercurial/dispatch.py", line 45, in _runcatch return _dispatch(ui, args) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5//lib/python2.5/site-packages/mercurial/dispatch.py", line 367, in _dispatch ret = _runcommand(ui, options, cmd, d) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5//lib/python2.5/site-packages/mercurial/dispatch.py", line 420, in _runcommand return checkargs() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5//lib/python2.5/site-packages/mercurial/dispatch.py", line 376, in checkargs return cmdfunc() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5//lib/python2.5/site-packages/mercurial/dispatch.py", line 359, in <lambda> d = lambda: func(ui, repo, *args, cmdoptions) File "/Users/kumar/src/hgsubversion/init.py", line 10, in svn return svncommand.svncmd(ui, repo, subcommand, *args, opts) File "/Users/kumar/src/hgsubversion/svncommand.py", line 39, in svncmd opts) File "/Users/kumar/src/hgsubversion/utility_commands.py", line 125, in show_outgoing_to_svn o_r = outgoing_revisions(ui, repo, hge, svn_commit_hashes) File "/Users/kumar/src/hgsubversion/utility_commands.py", line 148, in outgoing_revisions assert len(working_rev) == 1 AssertionError

(inside the while loop that does working_rev = working_rev.parents())

Is this because a revision has multiple parents?

$ hg parents changeset: 9:5bbdad0fa973 tag: tip parent: 7:8c98ee8c975e parent: 8:45fdc79ea069 user: kumar date: Sun Nov 09 14:27:34 2008 -0600 summary: backed out new site-packages since this was redone as raw svn commit

I'm not sure how to work around this, I suppose I will just make my commits from svn and re-clone.

Comments (3)

  1. Kumar McMillan reporter

    ack, sorry about the formatting, here is the traceback again:

    kumar$ hg svn out
    ** unknown exception encountered, details follow
    ** report bug details to http://www.selenic.com/mercurial/bts
    ** or mercurial@selenic.com
    ** Mercurial Distributed SCM (version 00d76fa3ffba+20081101)
    ** Extensions loaded: mq, rebase, svn
    Traceback (most recent call last):
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/bin/hg", line 20, in <module>
        mercurial.dispatch.run()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5//lib/python2.5/site-packages/mercurial/dispatch.py", line 20, in run
        sys.exit(dispatch(sys.argv[1:]))
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5//lib/python2.5/site-packages/mercurial/dispatch.py", line 29, in dispatch
        return _runcatch(u, args)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5//lib/python2.5/site-packages/mercurial/dispatch.py", line 45, in _runcatch
        return _dispatch(ui, args)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5//lib/python2.5/site-packages/mercurial/dispatch.py", line 367, in _dispatch
        ret = _runcommand(ui, options, cmd, d)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5//lib/python2.5/site-packages/mercurial/dispatch.py", line 420, in _runcommand
        return checkargs()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5//lib/python2.5/site-packages/mercurial/dispatch.py", line 376, in checkargs
        return cmdfunc()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5//lib/python2.5/site-packages/mercurial/dispatch.py", line 359, in <lambda>
        d = lambda: func(ui, repo, *args, **cmdoptions)
      File "/Users/kumar/src/hgsubversion/__init__.py", line 10, in svn
        return svncommand.svncmd(ui, repo, subcommand, *args, **opts)
      File "/Users/kumar/src/hgsubversion/svncommand.py", line 39, in svncmd
        **opts)
      File "/Users/kumar/src/hgsubversion/utility_commands.py", line 125, in show_outgoing_to_svn
        o_r = outgoing_revisions(ui, repo, hge, svn_commit_hashes)
      File "/Users/kumar/src/hgsubversion/utility_commands.py", line 148, in outgoing_revisions
        assert len(working_rev) == 1
    AssertionError
    
  2. Augie Fackler repo owner

    Pushing merges doesn't have clear results in my mind. What you can do in this situation is rather than use merge, use 'hg svn rebase' to move the backout to tip of svn development and then push that.

    I'm planning on adding support for merged changesets, but I'm still figuring out how to handle some of the cases. Until then, this isn't strictly a bug.

  3. Kumar McMillan reporter

    right, I thought about using hg svn rebase but that command was failing with the same traceback as above. I guess rebase calls the function outgoing_revisions ?

  4. Log in to comment