[oe-commits] : mtn2git: fix importing of revisions with no ancestor

OE GIT Trial gittrial at amethyst.openembedded.net
Sat Oct 4 04:53:21 UTC 2008


Module: org.openembedded.dev.git
Branch: org.openembedded.dev
Commit: b37b26754de15b740b72a2e4dfecc4de6e795038
URL:    http://gitweb.openembedded.net/?p=org.openembedded.dev.git&a=commit;h=b37b26754de15b740b72a2e4dfecc4de6e795038

Author:  <jluebbe at openembedded.org>
Date:   Sat Oct  4 04:59:22 2008 +0000

mtn2git: fix importing of revisions with no ancestor

---

 contrib/mtn2git/mtn2git.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/contrib/mtn2git/mtn2git.py b/contrib/mtn2git/mtn2git.py
index 1de3010..a4b4372 100755
--- a/contrib/mtn2git/mtn2git.py
+++ b/contrib/mtn2git/mtn2git.py
@@ -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))]





More information about the Openembedded-commits mailing list