hgext/convert/filemap.py
changeset 19862 42455ebbab9f
parent 17797 e4da793998bf
child 19863 daeab82fa644
--- a/hgext/convert/filemap.py	Tue Oct 01 14:48:53 2013 -0400
+++ b/hgext/convert/filemap.py	Wed Oct 02 19:46:47 2013 +0200
@@ -231,8 +231,8 @@
                 continue
             self.seenchildren[r] = self.seenchildren.get(r, 0) + 1
             if self.seenchildren[r] == self.children[r]:
-                del self.wantedancestors[r]
-                del self.parentmap[r]
+                self.wantedancestors.pop(r, None)
+                self.parentmap.pop(r, None)
                 del self.seenchildren[r]
                 if self._rebuilt:
                     del self.children[r]
@@ -281,7 +281,11 @@
         # of wanted ancestors of its parents. Plus rev itself.
         wrev = set()
         for p in parents:
-            wrev.update(self.wantedancestors[p])
+            if p in self.wantedancestors:
+                wrev.update(self.wantedancestors[p])
+            else:
+                self.ui.warn(_('warning: %s parent %s is missing\n') %
+                             (rev, p))
         wrev.add(rev)
         self.wantedancestors[rev] = wrev