Possible fix for hg-hg convert losing branch closes (issue2185)
Matt Mackall
mpm at selenic.com
Fri Jul 23 15:52:00 CDT 2010
This fix is really ugly. Thoughts?
diff -r 817258259bc9 hgext/convert/filemap.py
--- a/hgext/convert/filemap.py Thu Jul 22 08:24:56 2010 -0500
+++ b/hgext/convert/filemap.py Fri Jul 23 15:36:54 2010 -0500
@@ -298,7 +298,9 @@
self.origparents[rev] = parents
- if len(mparents) < 2 and not self.wanted(rev, wp):
+ closed = 'close' in self.commits[rev].extra
+
+ if len(mparents) < 2 and not closed and not self.wanted(rev, wp):
# We don't want this revision.
# Update our state and tell the convert process to map this
# revision to the same revision its parent as mapped to.
diff -r 817258259bc9 hgext/convert/hg.py
--- a/hgext/convert/hg.py Thu Jul 22 08:24:56 2010 -0500
+++ b/hgext/convert/hg.py Fri Jul 23 15:36:54 2010 -0500
@@ -175,7 +175,8 @@
if self.filemapmode and nparents == 1:
man = self.repo.manifest
mnode = self.repo.changelog.read(bin(p2))[0]
- if not man.cmp(m1node, man.revision(mnode)):
+ closed = 'close' in commit.extra
+ if not closed and not man.cmp(m1node, man.revision(mnode)):
self.ui.status(_("filtering out empty revision\n"))
self.repo.rollback()
return parent
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list