From fbaef94e4efd734222897cac7448c6f76aaed4ba Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 7 Mar 2007 19:58:54 +0100 Subject: [PATCH] work with newer git versions --- p4-clean-tags.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/p4-clean-tags.py b/p4-clean-tags.py index 0be51f6..924ff89 100755 --- a/p4-clean-tags.py +++ b/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() -- 2.11.4.GIT