Mercurial > public > mercurial-scm > hg
diff hgext/convert/hg.py @ 9431:d1b135f2f415
convert: fix history topology when using hg.tagsbranch
When using hg.tagsbranch, all conversions fail at
transcribing the source repo topology with conversion
scenarios interleaving:
- initial repo conversion,
- then upstream tag
- then later incremental conversion
The problem is caused by the usage of the last source
revid as source revid for the tagnode in the revision
map.
On a later incremental conversion, when resolving some
child commit of the true last source revid, convert
will parent the nodes to the tag node. If using
tagsbranch you get a bad topology where all incremental
commit nodes end up in the tag branch.
Analysis and test by Edouard Gomez <ed.gomez@free.fr>
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 06 Sep 2009 15:29:14 +0200 |
parents | 68e0a55eee6e |
children | fef209e65757 a2f36a082449 |
line wrap: on
line diff
--- a/hgext/convert/hg.py Sat Sep 05 18:56:51 2009 +0200 +++ b/hgext/convert/hg.py Sun Sep 06 15:29:14 2009 +0200 @@ -189,7 +189,7 @@ newlines = sorted([("%s %s\n" % (tags[tag], tag)) for tag in tags]) if newlines == oldlines: - return None + return None, None data = "".join(newlines) def getfilectx(repo, memctx, f): return context.memfilectx(f, data, False, False, None) @@ -201,7 +201,7 @@ [".hgtags"], getfilectx, "convert-repo", date, extra) self.repo.commitctx(ctx) - return hex(self.repo.changelog.tip()) + return hex(self.repo.changelog.tip()), hex(tagparent) def setfilemapmode(self, active): self.filemapmode = active