summaryrefslogtreecommitdiff
path: root/contrib/fast-import/git-p4
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <shausman@trolltech.com>2007-03-23 09:30:41 +0100
committerLibravatar Simon Hausmann <shausman@trolltech.com>2007-03-23 09:30:41 +0100
commit967f72e21b9f38725d64a7520bca99bbef9e8ab3 (patch)
treef9e2758298e7ac02d8e3aa19018c83ebc0cf3019 /contrib/fast-import/git-p4
parentMake it possible to run git-p4 submit from within the git repository (diff)
downloadtgif-967f72e21b9f38725d64a7520bca99bbef9e8ab3.tar.xz
Use the new incremental import style by default
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Diffstat (limited to 'contrib/fast-import/git-p4')
-rwxr-xr-xcontrib/fast-import/git-p431
1 files changed, 16 insertions, 15 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index a8f7cce25d..61978c3da6 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -751,21 +751,22 @@ class GitSync(Command):
if len(self.branch) == 0:
self.branch = "p4"
- if len(args) == 0:
- if not gitBranchExists(self.branch) and gitBranchExists("origin"):
- if not self.silent:
- print "Creating %s branch in git repository based on origin" % self.branch
- system("git branch %s origin" % self.branch)
-
- [self.previousDepotPath, p4Change] = extractDepotPathAndChangeFromGitLog(extractLogMessageFromGitCommit(self.branch))
- if len(self.previousDepotPath) > 0 and len(p4Change) > 0:
- p4Change = int(p4Change) + 1
- self.globalPrefix = self.previousDepotPath
- self.changeRange = "@%s,#head" % p4Change
- self.initialParent = self.branch
- self.tagLastChange = False
- if not self.silent:
- print "Performing incremental import into %s git branch" % self.branch
+
+ if len(args) == 0:
+ if not gitBranchExists(self.branch) and gitBranchExists("origin"):
+ if not self.silent:
+ print "Creating %s branch in git repository based on origin" % self.branch
+ system("git branch %s origin" % self.branch)
+
+ [self.previousDepotPath, p4Change] = extractDepotPathAndChangeFromGitLog(extractLogMessageFromGitCommit(self.branch))
+ if len(self.previousDepotPath) > 0 and len(p4Change) > 0:
+ p4Change = int(p4Change) + 1
+ self.globalPrefix = self.previousDepotPath
+ self.changeRange = "@%s,#head" % p4Change
+ self.initialParent = self.branch
+ self.tagLastChange = False
+ if not self.silent:
+ print "Performing incremental import into %s git branch" % self.branch
self.branch = "refs/heads/" + self.branch