Fails running hg convert on repo with svn subrepo

Svein Seldal sveinse at seldal.com
Sun Aug 13 09:39:30 UTC 2017


Hi

I have a hg repo that fails "hg convert". The repo is a 
once-converted-from-svn repo, that use both largefiles and subrepo. 
Since it has heritage from svn, it has somewhere in its history 
.hgsubstate referring to svn subrepos.

See below for a trace of my steps. I'm converting a hg repo into a new 
repo. Note that hg is executing svn info in the destination repo, which 
doesn't exist. Is this a bug in hg?

I've experimented with that I can make hg convert proceed further if I 
manually check out the appropriate svn subrepos into subdir location in 
the destination hg repo.

The run later fails at another failure which I haven't figured out of yet:
LookupError: data/.hgsubstate.i at 303030303030: no node

What I'm trying to ask for is: This can't be the correct behavior of hg 
convert, can it? I think it is linked to this being a subrepo. Is there 
a way to configure hg convert to disregard all subrepo processing, or 
otherwise alter or filter the repo for hg convert to pass?

Best regards,
Svein Seldal



Failure:

$ hg clone http://<remote_url> 01-hg
$ hg convert -s hg 01-hg -d hg 02-hg -A author.map --filemap file.map 
--config convert.hg.startrev=5 --debug --traceback

...

source: 483f7def22c1d3b4983c5ad17a0bc49ae3e05538
committing files:
build/buildenv.global
committing manifest
committing changelog
2479 Update pack-update URL
source: 309e2f31deb16a29f75184ae2fcba5587e1b4d82
resolving manifests
  branchmerge: True, force: True, partial: False
  ancestor: cd993044501a, local: 8a453d552b49, remote: d02b81e8f981
svn: warning: W155007: 
'/home/sveinse/hg-convert/02-hg/libs/libChestBoard/Utils' is not a 
working copy
run hg sink post-conversion action
run hg source post-conversion action
Traceback (most recent call last):
   File "/home/sveinse/build/mercurial-4.2.3/mercurial/scmutil.py", line 
146, in callcatch
     return func()
   File "/home/sveinse/build/mercurial-4.2.3/mercurial/dispatch.py", 
line 285, in _runcatchfunc
     return _dispatch(req)
   File "/home/sveinse/build/mercurial-4.2.3/mercurial/dispatch.py", 
line 912, in _dispatch
     cmdpats, cmdoptions)
   File "/home/sveinse/build/mercurial-4.2.3/mercurial/dispatch.py", 
line 648, in runcommand
     ret = _runcommand(ui, options, cmd, d)
   File "/home/sveinse/build/mercurial-4.2.3/mercurial/dispatch.py", 
line 920, in _runcommand
     return cmdfunc()
   File "/home/sveinse/build/mercurial-4.2.3/mercurial/dispatch.py", 
line 909, in <lambda>
     d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
   File "/home/sveinse/build/mercurial-4.2.3/mercurial/util.py", line 
1080, in check
     return func(*args, **kwargs)
   File "/home/sveinse/build/mercurial-4.2.3/hgext/convert/__init__.py", 
line 437, in convert
     return convcmd.convert(ui, src, dest, revmapfile, **opts)
   File "/home/sveinse/build/mercurial-4.2.3/hgext/convert/convcmd.py", 
line 611, in convert
     c.convert(sortmode)
   File "/home/sveinse/build/mercurial-4.2.3/hgext/convert/convcmd.py", 
line 522, in convert
     self.copy(c)
   File "/home/sveinse/build/mercurial-4.2.3/hgext/convert/convcmd.py", 
line 490, in copy
     source, self.map, full, cleanp2)
   File "/home/sveinse/build/mercurial-4.2.3/hgext/convert/hg.py", line 
327, in putcommit
     for file in self._calculatemergedfiles(source, p1ctx, p2ctx):
   File "/home/sveinse/build/mercurial-4.2.3/hgext/convert/hg.py", line 
209, in _calculatemergedfiles
     False, # followcopies
   File "/home/sveinse/build/mercurial-4.2.3/mercurial/extensions.py", 
line 231, in closure
     return func(*(args + a), **kw)
   File 
"/home/sveinse/build/mercurial-4.2.3/hgext/largefiles/overrides.py", 
line 471, in overridecalculateupdates
     repo, p1, p2, pas, branchmerge, force, acceptremote, *args, **kwargs)
   File "/home/sveinse/build/mercurial-4.2.3/mercurial/merge.py", line 
962, in calculateupdates
     acceptremote, followcopies)
   File "/home/sveinse/build/mercurial-4.2.3/mercurial/merge.py", line 
821, in manifestmerge
     if any(wctx.sub(s).dirty() for s in wctx.substate):
   File "/home/sveinse/build/mercurial-4.2.3/mercurial/merge.py", line 
821, in <genexpr>
     if any(wctx.sub(s).dirty() for s in wctx.substate):
   File "/home/sveinse/build/mercurial-4.2.3/mercurial/subrepo.py", line 
1206, in dirty
     if self._state[1] in self._wcrevs() or ignoreupdate:
   File "/home/sveinse/build/mercurial-4.2.3/mercurial/subrepo.py", line 
1161, in _wcrevs
     output, err = self._svncommand(['info', '--xml'])
   File "/home/sveinse/build/mercurial-4.2.3/mercurial/subrepo.py", line 
1144, in _svncommand
     % p.returncode)
Abort: svn: E155007: 
'/home/sveinse/hg-convert/02-hg/libs/libChestBoard/Utils' is not a 
working copy
abort: svn: E155007: 
'/home/sveinse/hg-convert/02-hg/libs/libChestBoard/Utils' is not a 
working copy


More information about the Mercurial mailing list