]> git.openpandora.org Git - openembedded.git/commitdiff
mtn2git: fix importing of revisions with no ancestor
authorJan Lübbe <jluebbe@debian.org>
Sat, 4 Oct 2008 04:59:22 +0000 (04:59 +0000)
committerJan Lübbe <jluebbe@debian.org>
Sat, 4 Oct 2008 04:59:22 +0000 (04:59 +0000)
contrib/mtn2git/mtn2git.py

index 1de3010756f7c996ba1377dc712170c925d58a1c..a4b43721d95d73b0c6989ebc90cdb8a29c1455fb 100755 (executable)
@@ -255,6 +255,8 @@ def fast_import(ops, revision):
     # could probably happen if we have more than one parent (on a merge)?
 
     cmd = []
+    if len(revision["parent"]) == 0:
+        cmd += ["reset refs/heads/%s" % branch]
     cmd += ["commit refs/heads/%s" % branch]
     cmd += ["mark :%s" % get_mark(revision["revision"])]
     cmd += ["author  <%s> %s" % (revision["author"], get_git_date(revision))]