hg convert fails on .hgsubstate merges

Benoit Fouletier benblo at gmail.com
Mon Jun 18 13:44:01 UTC 2018


I have isolated a very simple repro of a conversion failure (attached to
this mail):
1) commit a change to a subrepo from a branch in the main repo
2) commit a change to a subrepo from default in the main repo
3) merge main branch into default --> creates a merge in the subrepo, and
includes .hgsubstate to the main repo's merge
4) running hg convert (Mercurial 4.5) on this fails with this error:

abort: data/.hgsubstate.i at 303030303030: no node !

I've also tried it in Mercurial 4.6, it fails at the same stage but now the
error is:

abort: working directory revision cannot be specified

I read here (
https://www.mercurial-scm.org/pipermail/mercurial-devel/2015-June/071115.html)
that it could be good practice to convert sub-repos bottom-up and then
convert the main repo, so I've tried both converting and copying the
subrepo, but it fails either way.

I'm on Windows 10, using either Mercurial 4.5 or 4.6.

For context, my actual usecase is I have a pretty big Mercurial repo (40
GB), from a Unity game developed over almost 3 years, by over a dozen
contributors.
I want to make a new game using the same codebase/engine, but I'd like to
get rid of (most of) the content to avoid starting with a bloated repo.
Basically, the game's textures and sound files account for 90% of the repo
size, so I want to strip that. But obviously, I want to keep the history.
In my case, the subrepo is code-only, so I don't need to strip anything
from it, cloning it directly would be the best option for me.

I am okay modifying the convert extension if that can solve my problem, but
some pointers on where to start would be helpful :) !

Cheers
-- 
Benoit Fouletier
@benblo42
http://www.swingswingsubmarine.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial/attachments/20180618/337b194a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hg-convert-subrepo-failure.zip
Type: application/x-zip-compressed
Size: 15327 bytes
Desc: not available
URL: <http://www.mercurial-scm.org/pipermail/mercurial/attachments/20180618/337b194a/attachment.bin>


More information about the Mercurial mailing list