summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <hausmann@kde.org>2007-03-07 19:58:54 +0100
committerLibravatar Simon Hausmann <hausmann@kde.org>2007-03-07 19:58:54 +0100
commit6392a40e5ec1cc1190f5870f6d7c9cc3710dfd46 (patch)
tree015c25596b4006c2a2731666630994d5838ca50b /contrib
parentDon't print a plain newline at the end of the execution (avoids bogus cron er... (diff)
downloadtgif-6392a40e5ec1cc1190f5870f6d7c9cc3710dfd46.tar.xz
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>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/fast-import/p4-clean-tags.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/fast-import/p4-clean-tags.py b/contrib/fast-import/p4-clean-tags.py
index 0be51f6405..924ff89cc6 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()