Issue #374 new

push crashes when using the most current hgsubversion

Jos de Kloe
created an issue

today I tried to use hgsubversion to clone a large svn repository, and found it crashes AFTER modifying the svn repository. I have no idea what is wrong, but hopefully the traceback will allow you to understand what happened. I followed the instructions detailed here: http://mercurial.aragost.com/kick-start/en/hgsubversion/

Steps taken:

  • clone the svn repo using: hg clone svn+http://myserver.mydomain/svn/projectname/trunk/reponame reponame
  • edit a little text file in the hg repo and check in
  • edit another little text file in the svn repo and check it in
  • pull the svn change into mercurial using: hg pull (this created a new head as expected)
  • try to push the hg change into svn using: hg push

this last command fails with this traceback:

>hg push
pushing to svn+http://myserver.mydomain/svn/projectname/trunk/reponame
searching for changes
[r8456] josdekloe: nieuwe svn-hg interface test
pulled 1 revisions
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.3 (default, Jul 24 2012, 11:41:40) [GCC 4.6.3 20120306 (Red Hat 4.6.3-2)]
** Mercurial Distributed SCM (version 1.9.3)
** Extensions loaded: hgsubversion, transplant, convert, color, churn, pager, hgk, extdiff
Traceback (most recent call last):
  File "/usr/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 27, in run
    sys.exit(dispatch(request(sys.argv[1:])))
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 64, in dispatch
    return _runcatch(req)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 87, in _runcatch
    return _dispatch(req)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 688, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 463, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 182, in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/hgext/pager.py", line 107, in pagecmd
    return orig(ui, options, cmd, cmdfunc)
  File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 182, in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/hgext/color.py", line 368, in colorcmd
    return orig(ui_, opts, cmd, cmdfunc)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 742, in _runcommand
    return checkargs()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 696, in checkargs
    return cmdfunc()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 685, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 389, in check
    return func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 137, in wrap
    util.checksignature(origfn), *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 389, in check
    return func(*args, **kwargs)
  File "/usr/people/kloedej/.local/lib/python2.7/site-packages/hgsubversion-1.5_15_68191be64af8-py2.7.egg/hgsubversion/wrappers.py", line 606, in generic
    return orig(ui, repo, *args, **opts)
  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 389, in check
    return func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/commands.py", line 3886, in push
    newbranch=opts.get('new_branch'))
  File "/usr/people/kloedej/.local/lib/python2.7/site-packages/hgsubversion-1.5_15_68191be64af8-py2.7.egg/hgsubversion/svnrepo.py", line 81, in wrapper
    return fn(self, *args, **opts)
  File "/usr/people/kloedej/.local/lib/python2.7/site-packages/hgsubversion-1.5_15_68191be64af8-py2.7.egg/hgsubversion/svnrepo.py", line 100, in push
    return wrappers.push(self, remote, force, revs)
  File "/usr/people/kloedej/.local/lib/python2.7/site-packages/hgsubversion-1.5_15_68191be64af8-py2.7.egg/hgsubversion/wrappers.py", line 303, in push
    repair.strip(ui, repo, to_strip, "all")
  File "/usr/lib64/python2.7/site-packages/mercurial/repair.py", line 60, in strip
    striprev = cl.rev(node)
  File "/usr/lib64/python2.7/site-packages/mercurial/revlog.py", line 292, in rev
    return self._nodecache[node]
TypeError: unhashable type: 'list'
>

After inspecting the svn directory, it is clear that the change applied to hg has been pushed to svn after all. However, the hg repo is not linearised and still contains 2 heads. Is there a way to manually fix this, and still keep the hg repo compatible with hgsubversion (so without using hg merge)?

Comments (5)

  1. Michael McFarland

    I just encountered the same behaviour. Pushing to an svn repository gave me this in the log: pulled 1 revisions 0 files updated, 0 files merged, 0 files removed, 0 files unresolved unhashable type: 'list' [command returned code 255 Thu Feb 21 10:25:34 2013]

    As described, the svn had the files pushed, however my hg repo is not linear. Here are the versions being used:

    TortoiseHg version 2.3.1 with Mercurial-2.1.1, Python-2.6.6, PyQt-4.8.6, Qt-4.7.4

    Subversion version 1.4.4 (r25188)

    hgsubversion revision c8cb06e1f3233c2f8a072faed1474bac17321590

  2. Log in to comment