* Import revisions without a parent properly! The diffing would have been all right but
authorHolger Freyther <zecke@selfish.org>
Sun, 13 Jan 2008 17:08:33 +0000 (17:08 +0000)
committerHolger Freyther <zecke@selfish.org>
Sun, 13 Jan 2008 17:08:33 +0000 (17:08 +0000)
  we have not diffed the two manifests at all. Now we are diffinf an empty manifest against
  the initial one.

contrib/mtn2git/mtn2git.py

index 94f4675..db29edf 100755 (executable)
@@ -244,6 +244,12 @@ def fast_import(ops, revision):
         all_modifications = all_modifications.union(modified)
         all_deleted = all_deleted.union(deleted) 
 
+    if len(revision["parent"]) == 0:
+        (added, modified, deleted) = diff_manifest(build_tree([],""), current_tree)
+        all_added = all_added.union(added)
+        all_modifications = all_modifications.union(modified)
+        all_deleted = all_deleted.union(deleted) 
+
     # TODO:
     # Readd the sanity check to see if we deleted and modified an entry. This
     # could probably happen if we have more than one parent (on a merge)?