git-p4: indent with 4-spaces
PEP8 recommends that all code should be indented in 4-space units. This guideline is described here: https://www.python.org/dev/peps/pep-0008/#indentation Previously git-p4 had multiple cases where code was indented with a non-multiple of 4-spaces. This patch fixes each of these. Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
990547aa2b
commit
812ee74ea0
18
git-p4.py
18
git-p4.py
@ -877,12 +877,12 @@ def extractLogMessageFromGitCommit(commit):
|
||||
## fixme: title is first line of commit, not 1st paragraph.
|
||||
foundTitle = False
|
||||
for log in read_pipe_lines(["git", "cat-file", "commit", commit]):
|
||||
if not foundTitle:
|
||||
if len(log) == 1:
|
||||
foundTitle = True
|
||||
continue
|
||||
if not foundTitle:
|
||||
if len(log) == 1:
|
||||
foundTitle = True
|
||||
continue
|
||||
|
||||
logMessage += log
|
||||
logMessage += log
|
||||
return logMessage
|
||||
|
||||
|
||||
@ -1094,7 +1094,7 @@ def createOrUpdateBranchesFromOrigin(localRefPrefix = "refs/remotes/p4/", silent
|
||||
|
||||
|
||||
def originP4BranchesExist():
|
||||
return gitBranchExists("origin") or gitBranchExists("origin/p4") or gitBranchExists("origin/p4/master")
|
||||
return gitBranchExists("origin") or gitBranchExists("origin/p4") or gitBranchExists("origin/p4/master")
|
||||
|
||||
|
||||
def p4ParseNumericChangeRange(parts):
|
||||
@ -2116,7 +2116,7 @@ class P4Submit(Command, P4UserMap):
|
||||
submitTemplate = self.prepareLogMessage(template, logMessage, jobs)
|
||||
|
||||
if self.preserveUser:
|
||||
submitTemplate += "\n######## Actual user %s, modified after commit\n" % p4User
|
||||
submitTemplate += "\n######## Actual user %s, modified after commit\n" % p4User
|
||||
|
||||
if self.checkAuthorship and not self.p4UserIsMe(p4User):
|
||||
submitTemplate += "######## git author %s does not match your p4 account.\n" % gitEmail
|
||||
@ -2565,7 +2565,7 @@ class P4Submit(Command, P4UserMap):
|
||||
|
||||
# exit with error unless everything applied perfectly
|
||||
if len(commits) != len(applied):
|
||||
sys.exit(1)
|
||||
sys.exit(1)
|
||||
|
||||
return True
|
||||
|
||||
@ -3401,7 +3401,7 @@ class P4Sync(Command, P4UserMap):
|
||||
p = p[:-1]
|
||||
p = p[p.strip().rfind("/") + 1:]
|
||||
if not p.endswith("/"):
|
||||
p += "/"
|
||||
p += "/"
|
||||
return p
|
||||
|
||||
def getBranchMapping(self):
|
||||
|
Loading…
Reference in New Issue
Block a user