From: Jan Lübbe Date: Sat, 4 Oct 2008 04:59:22 +0000 (+0000) Subject: mtn2git: fix importing of revisions with no ancestor X-Git-Tag: Release-2010-05/1~5850^2~22^2~10^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24483588faaf027c968ddde444a87853a5f5de23;p=openembedded.git mtn2git: fix importing of revisions with no ancestor --- diff --git a/contrib/mtn2git/mtn2git.py b/contrib/mtn2git/mtn2git.py index 1de3010756..a4b43721d9 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))]