Adjust the output parsing of git name-rev to handle the output of the latest git version.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Simon Hausmann committed
Mar 7, 2007 at 19:58 UTC
6392a40e5ec1cc1190f5870f6d7c9cc3710dfd46
1 file changed
+4
-1
contrib/fast-import/p4-clean-tags.py
+4
-1
@@ -25,7 +25,10 @@ for o, a in opts:
25
sout, sin, serr = popen2.popen3("git-name-rev --tags `git-rev-parse %s`" % branch)
26
output = sout.read()
27
tagIdx = output.index(" tags/p4/")
28
-caretIdx = output.index("^")
28
+try:
29
+ caretIdx = output.index("^")
30
+except:
31
+ caretIdx = len(output) - 1
32
rev = int(output[tagIdx + 9 : caretIdx])
33
34
allTags = os.popen("git tag -l p4/").readlines()