diff mbox series

[06/20] git-p4: remove commented code

Message ID 20220112134635.177877-7-jholdsworth@nvidia.com (mailing list archive)
State Superseded
Headers show
Series git-p4: Various code tidy-ups | expand

Commit Message

Joel Holdsworth Jan. 12, 2022, 1:46 p.m. UTC
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, commented code and therefore this patch removes
them.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
---
 git-p4.py | 7 -------
 1 file changed, 7 deletions(-)

Comments

Eric Sunshine Jan. 12, 2022, 7:33 p.m. UTC | #1
On Wed, Jan 12, 2022 at 8:47 AM Joel Holdsworth <jholdsworth@nvidia.com> wrote:
> 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, commented code and therefore this patch removes
> them.

I'm having trouble interpreting the final sentence in this paragraph.
Did you mean "...commented code is useless, therefore remove it" or
something along those lines?

> Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
diff mbox series

Patch

diff --git a/git-p4.py b/git-p4.py
index 0bd1ba00ba..ad385d6919 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -3654,23 +3654,18 @@  def importNewBranch(self, branch, maxChange):
         self.gitStream.flush()
         branchPrefix = self.depotPaths[0] + branch + "/"
         range = "@1,%s" % maxChange
-        #print "prefix" + branchPrefix
         changes = p4ChangesForPaths([branchPrefix], range, self.changes_block_size)
         if len(changes) <= 0:
             return False
         firstChange = changes[0]
-        #print "first change in branch: %s" % firstChange
         sourceBranch = self.knownBranches[branch]
         sourceDepotPath = self.depotPaths[0] + sourceBranch
         sourceRef = self.gitRefForBranch(sourceBranch)
-        #print "source " + sourceBranch
 
         branchParentChange = int(p4Cmd(["changes", "-m", "1", "%s...@1,%s" % (sourceDepotPath, firstChange)])["change"])
-        #print "branch parent: %s" % branchParentChange
         gitParent = self.gitCommitByP4Change(sourceRef, branchParentChange)
         if len(gitParent) > 0:
             self.initialParents[self.gitRefForBranch(branch)] = gitParent
-            #print "parent git commit: %s" % gitParent
 
         self.importChanges(changes)
         return True
@@ -3813,8 +3808,6 @@  def importHeadRevision(self, revision):
                 newestRevision = change
 
             if info["action"] in self.delete_actions:
-                # don't increase the file cnt, otherwise details["depotFile123"] will have gaps!
-                #fileCnt = fileCnt + 1
                 continue
 
             for prop in ["depotFile", "rev", "action", "type" ]: