@matheusbsbs / matheus-bagliano / commits / cb53e1f8e9
Fork 0

Turn off potentially slow label detection by default

Signed-off-by: Simon Hausmann <simon@lst.de>

Simon Hausmann committed Apr 8, 2007 at 00:12 UTC cb53e1f8e9a78ab3f980250d2388a62ae2a42d77
1 file changed +6 -2
contrib/fast-import/git-p4
+6 -2
@@ -417,7 +417,8 @@ class P4Sync(Command):
417 optparse.make_option("--silent", dest="silent", action="store_true"),
418 optparse.make_option("--known-branches", dest="knownBranches"),
419 optparse.make_option("--data-cache", dest="dataCache", action="store_true"),
420 - optparse.make_option("--command-cache", dest="commandCache", action="store_true")
420 + optparse.make_option("--command-cache", dest="commandCache", action="store_true"),
421 + optparse.make_option("--detect-labels", dest="detectLabels", action="store_true")
422 ]
423 self.description = """Imports from Perforce into a git repository.\n
424 example:
@@ -437,6 +438,7 @@ class P4Sync(Command):
438 self.committedChanges = Set()
439 self.branch = ""
440 self.detectBranches = False
441 + self.detectLabels = False
442 self.changesFile = ""
443
444 def p4File(self, depotPath):
@@ -892,7 +894,9 @@ class P4Sync(Command):
894 self.globalPrefix += "/"
895
896 self.getUserMap()
895 - self.getLabels();
897 + self.labels = {}
898 + if self.detectLabels:
899 + self.getLabels();
900
901 if len(self.changeRange) == 0:
902 try: