diff options
author | Simon Hausmann <hausmann@kde.org> | 2007-03-07 19:58:54 +0100 |
---|---|---|
committer | Simon Hausmann <hausmann@kde.org> | 2007-03-07 19:58:54 +0100 |
commit | 6392a40e5ec1cc1190f5870f6d7c9cc3710dfd46 (patch) | |
tree | 015c25596b4006c2a2731666630994d5838ca50b /contrib | |
parent | Don't print a plain newline at the end of the execution (avoids bogus cron er... (diff) | |
download | tgif-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-x | contrib/fast-import/p4-clean-tags.py | 5 |
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() |