git-p4: remove spaces around default arguments
PEP8 recommends that there should be no spaces around the = sign of default argument values of functions. This guideline is described here: https://www.python.org/dev/peps/pep-0008/#other-recommendations Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
84af8b8544
commit
57fe2ce0e1
12
git-p4.py
12
git-p4.py
@ -1040,7 +1040,7 @@ def branch_exists(branch):
|
|||||||
return out.rstrip() == branch
|
return out.rstrip() == branch
|
||||||
|
|
||||||
|
|
||||||
def findUpstreamBranchPoint(head = "HEAD"):
|
def findUpstreamBranchPoint(head="HEAD"):
|
||||||
branches = p4BranchesInGit()
|
branches = p4BranchesInGit()
|
||||||
# map from depot-path to branch name
|
# map from depot-path to branch name
|
||||||
branchByDepotPath = {}
|
branchByDepotPath = {}
|
||||||
@ -1068,7 +1068,7 @@ def findUpstreamBranchPoint(head = "HEAD"):
|
|||||||
return ["", settings]
|
return ["", settings]
|
||||||
|
|
||||||
|
|
||||||
def createOrUpdateBranchesFromOrigin(localRefPrefix = "refs/remotes/p4/", silent=True):
|
def createOrUpdateBranchesFromOrigin(localRefPrefix="refs/remotes/p4/", silent=True):
|
||||||
if not silent:
|
if not silent:
|
||||||
print("Creating/updating branch(es) in %s based on origin branch(es)"
|
print("Creating/updating branch(es) in %s based on origin branch(es)"
|
||||||
% localRefPrefix)
|
% localRefPrefix)
|
||||||
@ -2838,7 +2838,7 @@ class P4Sync(Command, P4UserMap):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def extractFilesFromCommit(self, commit, shelved=False, shelved_cl = 0):
|
def extractFilesFromCommit(self, commit, shelved=False, shelved_cl=0):
|
||||||
files = []
|
files = []
|
||||||
fnum = 0
|
fnum = 0
|
||||||
while "depotFile%s" % fnum in commit:
|
while "depotFile%s" % fnum in commit:
|
||||||
@ -3269,7 +3269,7 @@ class P4Sync(Command, P4UserMap):
|
|||||||
'rev': record['headRev'],
|
'rev': record['headRev'],
|
||||||
'type': record['headType']})
|
'type': record['headType']})
|
||||||
|
|
||||||
def commit(self, details, files, branch, parent = "", allow_empty=False):
|
def commit(self, details, files, branch, parent="", allow_empty=False):
|
||||||
epoch = details["time"]
|
epoch = details["time"]
|
||||||
author = details["user"]
|
author = details["user"]
|
||||||
jobs = self.extractJobsFromCommit(details)
|
jobs = self.extractJobsFromCommit(details)
|
||||||
@ -4415,8 +4415,8 @@ def main():
|
|||||||
|
|
||||||
parser = optparse.OptionParser(cmd.usage.replace("%prog", "%prog " + cmdName),
|
parser = optparse.OptionParser(cmd.usage.replace("%prog", "%prog " + cmdName),
|
||||||
options,
|
options,
|
||||||
description = cmd.description,
|
description=cmd.description,
|
||||||
formatter = HelpFormatter())
|
formatter=HelpFormatter())
|
||||||
|
|
||||||
try:
|
try:
|
||||||
(cmd, args) = parser.parse_args(sys.argv[2:], cmd)
|
(cmd, args) = parser.parse_args(sys.argv[2:], cmd)
|
||||||
|
Reference in New Issue
Block a user