diff hgext/convert/hg.py @ 16106:d75aa756149b stable

convert: use splicemap entries when sorting revisions (issue1748) When sorting revisions before converting them, we have to edit the revision graph using splicemap entries. Otherwise, a spliced revision may be converted before its synthetic parents. Invalid splicemap revisions are now detected before starting the conversion.
author Patrick Mezard <patrick@mezard.eu>
date Fri, 10 Feb 2012 22:34:13 +0100
parents a84e3ed661cb
children 7e279d475669
line wrap: on
line diff
--- a/hgext/convert/hg.py	Fri Feb 10 22:25:49 2012 +0100
+++ b/hgext/convert/hg.py	Fri Feb 10 22:34:13 2012 +0100
@@ -223,6 +223,12 @@
             self.repo._bookmarks[bookmark] = bin(updatedbookmark[bookmark])
             bookmarks.write(self.repo)
 
+    def hascommit(self, rev):
+        if not rev in self.repo and self.clonebranches:
+            raise util.Abort(_('revision %s not be found in destination '
+                               'repository (lookups with clonebranches=true '
+                               'are not implemented)') % rev)
+        return rev in self.repo
 
 class mercurial_source(converter_source):
     def __init__(self, ui, path, rev=None):