git-p4: place a single space after every comma
This patch improves consistency across git-p4 by ensuring all command separated arguments to function invocations, tuples and lists are separated by commas with a single space following. 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
12a77f5b7e2d963434636472894d98caf095c0a1
1 file changed
+9
-9
git-p4.py
+9
-9
@@ -99,7 +99,7 @@ def p4_build_cmd(cmd):
99
100
user = gitConfig("git-p4.user")
101
if len(user) > 0:
102
- real_cmd += ["-u",user]
102
+ real_cmd += ["-u", user]
103
104
password = gitConfig("git-p4.password")
105
if len(password) > 0:
@@ -1766,7 +1766,7 @@ class P4Submit(Command, P4UserMap):
1766
1767
print("Patched up RCS keywords in %s" % file)
1768
1769
- def p4UserForCommit(self,id):
1769
+ def p4UserForCommit(self, id):
1770
"""Return the tuple (perforce user,git email) for a given git commit
1771
id.
1772
"""
@@ -1775,11 +1775,11 @@ class P4Submit(Command, P4UserMap):
1775
"--format=%ae", id])
1776
gitEmail = gitEmail.strip()
1777
if gitEmail not in self.emails:
1778
- return (None,gitEmail)
1778
+ return (None, gitEmail)
1779
else:
1780
- return (self.emails[gitEmail],gitEmail)
1780
+ return (self.emails[gitEmail], gitEmail)
1781
1782
- def checkValidP4Users(self,commits):
1782
+ def checkValidP4Users(self, commits):
1783
"""Check if any git authors cannot be mapped to p4 users."""
1784
for id in commits:
1785
user, email = self.p4UserForCommit(id)
@@ -3203,7 +3203,7 @@ class P4Sync(Command, P4UserMap):
3203
3204
gitStream.write("tagger %s\n" % tagger)
3205
3206
- print("labelDetails=",labelDetails)
3206
+ print("labelDetails=", labelDetails)
3207
if 'Description' in labelDetails:
3208
description = labelDetails['Description']
3209
else:
@@ -3409,7 +3409,7 @@ class P4Sync(Command, P4UserMap):
3409
3410
if not m.match(name):
3411
if verbose:
3412
- print("label %s does not match regexp %s" % (name,validLabelRegexp))
3412
+ print("label %s does not match regexp %s" % (name, validLabelRegexp))
3413
continue
3414
3415
if name in ignoredP4Labels:
@@ -3730,7 +3730,7 @@ class P4Sync(Command, P4UserMap):
3730
newestRevision = 0
3731
3732
fileCnt = 0
3733
- fileArgs = ["%s...%s" % (p,revision) for p in self.depotPaths]
3733
+ fileArgs = ["%s...%s" % (p, revision) for p in self.depotPaths]
3734
3735
for info in p4CmdList(["files"] + fileArgs):
3736
@@ -4235,7 +4235,7 @@ class P4Unshelve(Command):
4235
"""Rename the existing branch to branch_name.N ."""
4236
4237
found = True
4238
- for i in range(0,1000):
4238
+ for i in range(0, 1000):
4239
backup_branch_name = "{0}.{1}".format(branch_name, i)
4240
if not gitBranchExists(backup_branch_name):
4241
gitUpdateRef(backup_branch_name, branch_name) # copy ref to backup