summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorJoel Holdsworth <jholdsworth@nvidia.com>2022-04-01 15:24:45 +0100
committerJunio C Hamano <gitster@pobox.com>2022-04-01 13:15:43 -0700
commit812ee74ea0d499000402fdfa3388cc69e72cdaf2 (patch)
tree8607e0f00148d547965e10cac8fb325c903773c2 /git-p4.py
parent990547aa2b701ff8cbdf85219175bd015371f55c (diff)
downloadgit-812ee74ea0d499000402fdfa3388cc69e72cdaf2.tar.gz
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>
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/git-p4.py b/git-p4.py
index aabf657a57..a9be9ab13c 100755
--- a/git-p4.py
+++ b/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):