Helper function to check the existance of a revision

This commit is contained in:
Simon Hausmann
2007-03-22 21:27:14 +01:00
parent 29b9fbc9ad
commit c27a1d9593

3
git-p4
View File

@@ -83,6 +83,9 @@ def extractDepotPathAndChangeFromGitLog(log):
return values.get("depot-path"), values.get("change") return values.get("depot-path"), values.get("change")
def gitBranchExists(branch):
return os.system("git-rev-parse %s 2>/dev/null >/dev/null") == 0
class Command: class Command:
def __init__(self): def __init__(self):
self.usage = "usage: %prog [options]" self.usage = "usage: %prog [options]"