summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <simon@lst.de>2007-03-22 21:27:14 +0100
committerLibravatar Simon Hausmann <simon@lst.de>2007-03-22 21:27:14 +0100
commit8136a6399c886dec8d1b806a7d8728324e906729 (patch)
tree9c5767f424ce6b10720fe555269b1f297d2d9365
parentAdded some helper function(s) to parse the depot path and change number from ... (diff)
downloadtgif-8136a6399c886dec8d1b806a7d8728324e906729.tar.xz
Helper function to check the existance of a revision
Signed-off-by: Simon Hausmann <simon@lst.de>
-rwxr-xr-xcontrib/fast-import/git-p43
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 6ead1c4173..b21dee3199 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -83,6 +83,9 @@ def extractDepotPathAndChangeFromGitLog(log):
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:
def __init__(self):
self.usage = "usage: %prog [options]"