git-p4: ensure every comment has a single #

PEP8 recommends that every comment should begin with a single '#' character. This guideline is described here: https://www.python.org/dev/peps/pep-0008/#comments Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Joel Holdsworth committed Apr 1, 2022 at 15:24 UTC c785e2029c478dce241f9e07e657ec372b633e6c
1 file changed +6 -6
git-p4.py
+6 -6
@@ -895,7 +895,7 @@ def branchExists(ref):
895 def extractLogMessageFromGitCommit(commit):
896 logMessage = ""
897
898 - ## fixme: title is first line of commit, not 1st paragraph.
898 + # fixme: title is first line of commit, not 1st paragraph.
899 foundTitle = False
900 for log in read_pipe_lines(["git", "cat-file", "commit", commit]):
901 if not foundTitle:
@@ -3485,7 +3485,7 @@ class P4Sync(Command, P4UserMap):
3485 continue
3486 source = paths[0]
3487 destination = paths[1]
3488 - ## HACK
3488 + # HACK
3489 if p4PathStartsWith(source, self.depotPaths[0]) and p4PathStartsWith(destination, self.depotPaths[0]):
3490 source = source[len(self.depotPaths[0]):-4]
3491 destination = destination[len(self.depotPaths[0]):-4]
@@ -3644,7 +3644,7 @@ class P4Sync(Command, P4UserMap):
3644 if self.detectBranches:
3645 branches = self.splitFilesIntoBranches(description)
3646 for branch in branches.keys():
3647 - ## HACK --hwn
3647 + # HACK --hwn
3648 branchPrefix = self.depotPaths[0] + branch + "/"
3649 self.branchPrefixes = [branchPrefix]
3650
@@ -4035,7 +4035,7 @@ class P4Sync(Command, P4UserMap):
4035 self.getLabels()
4036
4037 if self.detectBranches:
4038 - ## FIXME - what's a P4 projectName ?
4038 + # FIXME - what's a P4 projectName ?
4039 self.projectName = self.guessProjectName()
4040
4041 if self.hasOrigin:
@@ -4048,7 +4048,7 @@ class P4Sync(Command, P4UserMap):
4048 for b in self.p4BranchesInGit:
4049 if b != "master":
4050
4051 - ## FIXME
4051 + # FIXME
4052 b = b[len(self.projectName):]
4053 self.createdBranches.add(b)
4054
@@ -4154,7 +4154,7 @@ class P4Clone(P4Sync):
4154 self.cloneBare = False
4155
4156 def defaultDestination(self, args):
4157 - ## TODO: use common prefix of args?
4157 + # TODO: use common prefix of args?
4158 depotPath = args[0]
4159 depotDir = re.sub("(@[^@]*)$", "", depotPath)
4160 depotDir = re.sub("(#[^#]*)$", "", depotDir)