Use the new incremental import style by default
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Simon Hausmann committed
Mar 23, 2007 at 09:30 UTC
967f72e21b9f38725d64a7520bca99bbef9e8ab3
1 file changed
+16
-15
contrib/fast-import/git-p4
+16
-15
@@ -751,21 +751,22 @@ class GitSync(Command):
751
752
if len(self.branch) == 0:
753
self.branch = "p4"
754
- if len(args) == 0:
755
- if not gitBranchExists(self.branch) and gitBranchExists("origin"):
756
- if not self.silent:
757
- print "Creating %s branch in git repository based on origin" % self.branch
758
- system("git branch %s origin" % self.branch)
759
-
760
- [self.previousDepotPath, p4Change] = extractDepotPathAndChangeFromGitLog(extractLogMessageFromGitCommit(self.branch))
761
- if len(self.previousDepotPath) > 0 and len(p4Change) > 0:
762
- p4Change = int(p4Change) + 1
763
- self.globalPrefix = self.previousDepotPath
764
- self.changeRange = "@%s,#head" % p4Change
765
- self.initialParent = self.branch
766
- self.tagLastChange = False
767
- if not self.silent:
768
- print "Performing incremental import into %s git branch" % self.branch
754
+
755
+ if len(args) == 0:
756
+ if not gitBranchExists(self.branch) and gitBranchExists("origin"):
757
+ if not self.silent:
758
+ print "Creating %s branch in git repository based on origin" % self.branch
759
+ system("git branch %s origin" % self.branch)
760
+
761
+ [self.previousDepotPath, p4Change] = extractDepotPathAndChangeFromGitLog(extractLogMessageFromGitCommit(self.branch))
762
+ if len(self.previousDepotPath) > 0 and len(p4Change) > 0:
763
+ p4Change = int(p4Change) + 1
764
+ self.globalPrefix = self.previousDepotPath
765
+ self.changeRange = "@%s,#head" % p4Change
766
+ self.initialParent = self.branch
767
+ self.tagLastChange = False
768
+ if not self.silent:
769
+ print "Performing incremental import into %s git branch" % self.branch
770
771
self.branch = "refs/heads/" + self.branch
772