Turn off potentially slow label detection by default

Signed-off-by: Simon Hausmann <simon@lst.de>
This commit is contained in:
Simon Hausmann 2007-04-08 00:12:02 +02:00
parent 1f52af6c73
commit cb53e1f8e9

View File

@ -417,7 +417,8 @@ class P4Sync(Command):
optparse.make_option("--silent", dest="silent", action="store_true"), optparse.make_option("--silent", dest="silent", action="store_true"),
optparse.make_option("--known-branches", dest="knownBranches"), optparse.make_option("--known-branches", dest="knownBranches"),
optparse.make_option("--data-cache", dest="dataCache", action="store_true"), optparse.make_option("--data-cache", dest="dataCache", action="store_true"),
optparse.make_option("--command-cache", dest="commandCache", action="store_true") optparse.make_option("--command-cache", dest="commandCache", action="store_true"),
optparse.make_option("--detect-labels", dest="detectLabels", action="store_true")
] ]
self.description = """Imports from Perforce into a git repository.\n self.description = """Imports from Perforce into a git repository.\n
example: example:
@ -437,6 +438,7 @@ class P4Sync(Command):
self.committedChanges = Set() self.committedChanges = Set()
self.branch = "" self.branch = ""
self.detectBranches = False self.detectBranches = False
self.detectLabels = False
self.changesFile = "" self.changesFile = ""
def p4File(self, depotPath): def p4File(self, depotPath):
@ -892,7 +894,9 @@ class P4Sync(Command):
self.globalPrefix += "/" self.globalPrefix += "/"
self.getUserMap() self.getUserMap()
self.getLabels(); self.labels = {}
if self.detectLabels:
self.getLabels();
if len(self.changeRange) == 0: if len(self.changeRange) == 0:
try: try: