diff options
author | Holger Freyther <zecke@selfish.org> | 2008-01-13 17:08:33 +0000 |
---|---|---|
committer | Holger Freyther <zecke@selfish.org> | 2008-01-13 17:08:33 +0000 |
commit | d5f431af20cf181bf5e6a0e1100cc9e8b0ab5cf1 (patch) | |
tree | b921dab5c78728fb409a8d33ce65a30d5b809fac /contrib | |
parent | 48af2490ed717ea3f790b4dcda78a8ed3ca96502 (diff) |
* Import revisions without a parent properly! The diffing would have been all right but
we have not diffed the two manifests at all. Now we are diffinf an empty manifest against
the initial one.
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/mtn2git/mtn2git.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/mtn2git/mtn2git.py b/contrib/mtn2git/mtn2git.py index 94f467598e..db29edf725 100755 --- a/contrib/mtn2git/mtn2git.py +++ b/contrib/mtn2git/mtn2git.py @@ -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)? |