EditingError exception during clone

Issue #447 resolved
Paul Sargent created an issue

It seems that a repository I work with in my commercial life (hence I can't share it, sorry, but I'm happy to spend some time debugging under guidance) is causing an exception in hgsubversion. There's only a single revision in this part of the svn repo (it's a new branch).

In the past I've been working fine on a different svn branch, but that got reintegrated to trunk, deleted (svn rm) and this branch created (svn cp). At that time I've updated hgsubversion and Mercurial to the latest versions (1.8.2 and 3.5). If I now go back to the old branch and try to clone it again, I hit a similar error (Same exception, different path).

This made me think it's a regression, but I've tried hgsubversion versions 1.8 and 1.8.1 and both have the same error (These were the versions I had in my pip cache from previous installs), although all of this is with Mercurial 3.5. I'm now thinking that something has been added to the repo since I did my last clone (rather than update) which is causing problems.

What can I do to debug this?

 hg clone svn+https:/.../sf3-memsub_2015_09_14
destination directory: sf3-memsub_2015_09_14
using single layout
[r56543] ......
** Unknown exception encountered with possibly-broken third-party extension hgsubversion
** which supports versions 3.3 of Mercurial.
** Please disable hgsubversion and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.7.3 (default, Mar 13 2014, 11:03:55) [GCC 4.7.2]
** Mercurial Distributed SCM (version 3.5.1)
** Extensions loaded: hgsubversion
Traceback (most recent call last):
  File "/v/home/epausar/python/environments/default/bin/hg", line 43, in <module>
    mercurial.dispatch.run()
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/dispatch.py", line 30, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/dispatch.py", line 92, in dispatch
    ret = _runcatch(req)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/dispatch.py", line 163, in _runcatch
    return _dispatch(req)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/dispatch.py", line 895, in _dispatch
    cmdpats, cmdoptions)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/dispatch.py", line 656, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/dispatch.py", line 1013, in _runcommand
    return checkargs()
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/dispatch.py", line 982, in checkargs
    return cmdfunc()
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/dispatch.py", line 892, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/util.py", line 792, in check
    return func(*args, **kwargs)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/extensions.py", line 171, in closure
    return func(*(args + a), **kw)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/util.py", line 792, in check
    return func(*args, **kwargs)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/hgsubversion/wrappers.py", line 655, in clone
    orig(ui, source, dest, **opts)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/util.py", line 792, in check
    return func(*args, **kwargs)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/commands.py", line 1425, in clone
    shareopts=opts.get('shareopts'))
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/extensions.py", line 171, in closure
    return func(*(args + a), **kw)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/hgsubversion/wrappers.py", line 644, in hgclonewrapper
    data['srcrepo'], data['dstrepo'] = orig(ui, *args, **opts)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/hg.py", line 531, in clone
    destpeer.local().clone(srcpeer, heads=revs, stream=stream)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/localrepo.py", line 1882, in clone
    ret = exchange.pull(self, remote, heads).cgresult
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/mercurial/extensions.py", line 171, in closure
    return func(*(args + a), **kw)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/hgsubversion/wrappers.py", line 532, in exchangepull
    pullop.cgresult = pull(repo, remote, heads, force)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/hgsubversion/wrappers.py", line 474, in pull
    firstrun)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/hgsubversion/replay.py", line 57, in convert_rev
    return _convert_rev(ui, meta, svn, r, tbdelta, firstrun)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/hgsubversion/replay.py", line 72, in _convert_rev
    svn.get_revision(r.revnum, editor)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/hgsubversion/svnwrap/subvertpy_wrapper.py", line 501, in get_revision
    reporter.finish()
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/hgsubversion/svnwrap/subvertpy_wrapper.py", line 160, in add_directory
    path, self.baton, copyfrom_path, copyfrom_rev)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/hgsubversion/editor.py", line 416, in add_directory
    self._checkparentdir(parent_baton)
  File "/v/home/epausar/python/environments/default/lib/python2.7/site-packages/hgsubversion/editor.py", line 232, in _checkparentdir
    'opened directory: %s != %s' % (self._opendirs[-1][0], baton))
hgsubversion.editor.EditingError: can only operate on the most recently opened directory: f4-ram/code/vlg != f1-

Comments (3)

  1. Augie Fackler repo owner

    I actually just ran into this (using hgsubversion for the first time in a very long time). The problem is ra_serf violates the editor API, and is the only option in svn 1.8 and later. I've got a fix pending.

  2. Log in to comment