mirror of
https://github.com/git/git
synced 2024-08-27 03:29:21 +00:00
git-p4: remove commented code
Previously, the script contained commented code including Python 2 print statements. Presumably, these were used as a developer aid at some point in history. However, the commented code is generally undesirable, and this commented code serves no useful purpose. Therefore this patch removes it. Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
522e914f65
commit
9084961b2a
|
@ -3583,23 +3583,18 @@ def importNewBranch(self, branch, maxChange):
|
||||||
self.gitStream.flush()
|
self.gitStream.flush()
|
||||||
branchPrefix = self.depotPaths[0] + branch + "/"
|
branchPrefix = self.depotPaths[0] + branch + "/"
|
||||||
range = "@1,%s" % maxChange
|
range = "@1,%s" % maxChange
|
||||||
#print "prefix" + branchPrefix
|
|
||||||
changes = p4ChangesForPaths([branchPrefix], range, self.changes_block_size)
|
changes = p4ChangesForPaths([branchPrefix], range, self.changes_block_size)
|
||||||
if len(changes) <= 0:
|
if len(changes) <= 0:
|
||||||
return False
|
return False
|
||||||
firstChange = changes[0]
|
firstChange = changes[0]
|
||||||
#print "first change in branch: %s" % firstChange
|
|
||||||
sourceBranch = self.knownBranches[branch]
|
sourceBranch = self.knownBranches[branch]
|
||||||
sourceDepotPath = self.depotPaths[0] + sourceBranch
|
sourceDepotPath = self.depotPaths[0] + sourceBranch
|
||||||
sourceRef = self.gitRefForBranch(sourceBranch)
|
sourceRef = self.gitRefForBranch(sourceBranch)
|
||||||
#print "source " + sourceBranch
|
|
||||||
|
|
||||||
branchParentChange = int(p4Cmd(["changes", "-m", "1", "%s...@1,%s" % (sourceDepotPath, firstChange)])["change"])
|
branchParentChange = int(p4Cmd(["changes", "-m", "1", "%s...@1,%s" % (sourceDepotPath, firstChange)])["change"])
|
||||||
#print "branch parent: %s" % branchParentChange
|
|
||||||
gitParent = self.gitCommitByP4Change(sourceRef, branchParentChange)
|
gitParent = self.gitCommitByP4Change(sourceRef, branchParentChange)
|
||||||
if len(gitParent) > 0:
|
if len(gitParent) > 0:
|
||||||
self.initialParents[self.gitRefForBranch(branch)] = gitParent
|
self.initialParents[self.gitRefForBranch(branch)] = gitParent
|
||||||
#print "parent git commit: %s" % gitParent
|
|
||||||
|
|
||||||
self.importChanges(changes)
|
self.importChanges(changes)
|
||||||
return True
|
return True
|
||||||
|
@ -3742,8 +3737,6 @@ def importHeadRevision(self, revision):
|
||||||
newestRevision = change
|
newestRevision = change
|
||||||
|
|
||||||
if info["action"] in self.delete_actions:
|
if info["action"] in self.delete_actions:
|
||||||
# don't increase the file cnt, otherwise details["depotFile123"] will have gaps!
|
|
||||||
#fileCnt = fileCnt + 1
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for prop in ["depotFile", "rev", "action", "type" ]:
|
for prop in ["depotFile", "rev", "action", "type" ]:
|
||||||
|
|
Loading…
Reference in a new issue