summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2008-01-13 17:33:28 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2008-01-13 17:33:28 +0000
commitc951cce8e94630d41ce362cdfc1fecea24066325 (patch)
tree592504ab933cb32c79601f361535db8bdca2ba60
parent8eaa2ab5a0006f8010425f95246ae27cca59a793 (diff)
parent1052bee548c8194cbee9298e947c00937f68450a (diff)
merge of '37503acf69411b447655a4711ed7b553120c14df'
and '99d10c4327664b741cfed74f3f99ac3f6d9e5b7b'
-rwxr-xr-xcontrib/mtn2git/mtn2git.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/mtn2git/mtn2git.py b/contrib/mtn2git/mtn2git.py
index 94f467598e..1de3010756 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)?
@@ -424,10 +430,7 @@ def main(mtn_cli, db, rev):
for head in heads:
print >> sys.stderr, old_heads, head
all_revs += ops.ancestry_difference(head, old_heads)
- for rev in all_revs:
- if not rev in branch_heads:
- branch_heads[rev] = []
- branch_heads[rev].append(branch)
+ status.former_heads[branch] = heads
sorted_revs = [rev for rev in ops.toposort(all_revs)]
@@ -437,10 +440,6 @@ def main(mtn_cli, db, rev):
else:
print >> sys.stderr, "Going to import revision ", rev
fast_import(ops, parse_revision(ops, rev))
- branches = branch_heads[rev]
- for branch in branches:
- status.former_heads[branch] = [rev]
-
if __name__ == "__main__":
import optparse
@@ -465,3 +464,4 @@ if __name__ == "__main__":
print >> sys.stderr, "Failed to open the status file"
main(options.mtn, options.database, options.rev)
status.store(options.status)
+