convert-repo: automatically create empty map file
authorMatt Mackall <mpm@selenic.com>
Sun, 29 Jan 2006 17:22:03 +1300
changeset 1655 7bfd4724932a
parent 1654 b7fc961507db
child 1656 14d73fff4c45
convert-repo: automatically create empty map file
contrib/convert-repo
--- a/contrib/convert-repo	Sun Jan 29 17:12:31 2006 +1300
+++ b/contrib/convert-repo	Sun Jan 29 17:22:03 2006 +1300
@@ -171,9 +171,12 @@
         self.commitcache = {}
 
         self.map = {}
-        for l in file(self.mapfile):
-            sv, dv = l[:-1].split()
-            self.map[sv] = dv
+        try:
+            for l in file(self.mapfile):
+                sv, dv = l[:-1].split()
+                self.map[sv] = dv
+        except IOError:
+            pass
 
     def walktree(self, heads):
         visit = heads