From: Simon Hausmann Date: Wed, 7 Mar 2007 18:58:54 +0000 (+0100) Subject: Adjust the output parsing of git name-rev to handle the output of the latest git version. X-Git-Tag: v1.5.3-rc0~65^2^2~197 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=6392a40e5ec1cc1190f5870f6d7c9cc3710dfd46;p=git.git Adjust the output parsing of git name-rev to handle the output of the latest git version. Signed-off-by: Simon Hausmann --- diff --git a/contrib/fast-import/p4-clean-tags.py b/contrib/fast-import/p4-clean-tags.py index 0be51f640..924ff89cc 100755 --- a/contrib/fast-import/p4-clean-tags.py +++ b/contrib/fast-import/p4-clean-tags.py @@ -25,7 +25,10 @@ for o, a in opts: sout, sin, serr = popen2.popen3("git-name-rev --tags `git-rev-parse %s`" % branch) output = sout.read() tagIdx = output.index(" tags/p4/") -caretIdx = output.index("^") +try: + caretIdx = output.index("^") +except: + caretIdx = len(output) - 1 rev = int(output[tagIdx + 9 : caretIdx]) allTags = os.popen("git tag -l p4/").readlines()