convert: correctly detect missing revlog for root revisions
authorPatrick Mezard <pmezard@gmail.com>
Thu, 23 Oct 2008 23:03:09 +0200
changeset 7232 c2ac09f81ec9
parent 7231 8e7130a10f3b
child 7233 9f0e52e1df77
convert: correctly detect missing revlog for root revisions
hgext/convert/hg.py
tests/test-convert-hg-source.out
--- a/hgext/convert/hg.py	Tue Oct 21 21:24:47 2008 +0200
+++ b/hgext/convert/hg.py	Thu Oct 23 23:03:09 2008 +0200
@@ -255,6 +255,10 @@
         parents = self.parents(ctx)
         if not parents:
             files = util.sort(ctx.manifest().keys())
+            if self.ignoreerrors:
+                # calling getcopies() is a simple way to detect missing
+                # revlogs and populate self.ignored
+                self.getcopies(ctx, files)
             return [(f, rev) for f in files if f not in self.ignored], {}
         if self._changescache and self._changescache[0] == rev:
             m, a, r = self._changescache[1]
--- a/tests/test-convert-hg-source.out	Tue Oct 21 21:24:47 2008 +0200
+++ b/tests/test-convert-hg-source.out	Thu Oct 23 23:03:09 2008 +0200
@@ -28,8 +28,8 @@
 sorting...
 converting...
 4 init
+ignoring: data/b.i@1e88685f5dde: no match found
 3 changebagain
-ignoring: data/b.i@4b3c32ced4f8: no match found
 2 changeall
 1 merge
 0 moveb