Use the new incremental import style by default

Signed-off-by: Simon Hausmann <shausman@trolltech.com>
This commit is contained in:
Simon Hausmann 2007-03-23 09:30:41 +01:00
parent 9512497bcf
commit 967f72e21b

View File

@ -751,21 +751,22 @@ class GitSync(Command):
if len(self.branch) == 0: if len(self.branch) == 0:
self.branch = "p4" 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(args) == 0:
if len(self.previousDepotPath) > 0 and len(p4Change) > 0: if not gitBranchExists(self.branch) and gitBranchExists("origin"):
p4Change = int(p4Change) + 1 if not self.silent:
self.globalPrefix = self.previousDepotPath print "Creating %s branch in git repository based on origin" % self.branch
self.changeRange = "@%s,#head" % p4Change system("git branch %s origin" % self.branch)
self.initialParent = self.branch
self.tagLastChange = False [self.previousDepotPath, p4Change] = extractDepotPathAndChangeFromGitLog(extractLogMessageFromGitCommit(self.branch))
if not self.silent: if len(self.previousDepotPath) > 0 and len(p4Change) > 0:
print "Performing incremental import into %s git branch" % self.branch 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 self.branch = "refs/heads/" + self.branch