From: Sam Hocevar <sam@zoy.org>
To: git@vger.kernel.org
Subject: [PATCH v2] git-p4: remove unnecessary semicolons at end of lines.
Date: Sat, 7 Mar 2009 13:26:25 +0100 [thread overview]
Message-ID: <20090307122625.GA8153@zoy.org> (raw)
In-Reply-To: <20090306155322.GC12880@zoy.org>
Signed-off-by: Sam Hocevar <sam@zoy.org>
---
This is a properly formatted version of the previous patch.
contrib/fast-import/git-p4 | 46 ++++++++++++++++++++++----------------------
1 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 3832f60..7ea5ac6 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -12,7 +12,7 @@ import optparse, sys, os, marshal, popen2, subprocess, shelve
import tempfile, getopt, sha, os.path, time, platform
import re
-from sets import Set;
+from sets import Set
verbose = False
@@ -240,7 +240,7 @@ def p4Cmd(cmd):
result = {}
for entry in list:
result.update(entry)
- return result;
+ return result
def p4Where(depotPath):
if not depotPath.endswith("/"):
@@ -281,7 +281,7 @@ def currentGitBranch():
def isValidGitDir(path):
if (os.path.exists(path + "/HEAD")
and os.path.exists(path + "/refs") and os.path.exists(path + "/objects")):
- return True;
+ return True
return False
def parseRevision(ref):
@@ -328,8 +328,8 @@ def extractSettingsGitLog(log):
def gitBranchExists(branch):
proc = subprocess.Popen(["git", "rev-parse", branch],
- stderr=subprocess.PIPE, stdout=subprocess.PIPE);
- return proc.wait() == 0;
+ stderr=subprocess.PIPE, stdout=subprocess.PIPE)
+ return proc.wait() == 0
_gitConfig = {}
def gitConfig(key):
@@ -492,7 +492,7 @@ class P4RollBack(Command):
maxChange = int(args[0])
if "p4ExitCode" in p4Cmd("changes -m 1"):
- die("Problems executing p4");
+ die("Problems executing p4")
if self.rollbackLocalBranches:
refPrefix = "refs/heads/"
@@ -663,7 +663,7 @@ class P4Submit(Command):
if response == "s":
print "Skipping! Good luck with the next patches..."
for f in editedFiles:
- p4_system("revert \"%s\"" % f);
+ p4_system("revert \"%s\"" % f)
for f in filesToAdd:
system("rm %s" %f)
return
@@ -734,7 +734,7 @@ class P4Submit(Command):
if os.environ.has_key("P4EDITOR"):
editor = os.environ.get("P4EDITOR")
else:
- editor = os.environ.get("EDITOR", defaultEditor);
+ editor = os.environ.get("EDITOR", defaultEditor)
system(editor + " " + fileName)
response = "y"
@@ -753,9 +753,9 @@ class P4Submit(Command):
p4_write_pipe("submit -i", submitTemplate)
else:
for f in editedFiles:
- p4_system("revert \"%s\"" % f);
+ p4_system("revert \"%s\"" % f)
for f in filesToAdd:
- p4_system("revert \"%s\"" % f);
+ p4_system("revert \"%s\"" % f)
system("rm %s" %f)
os.remove(fileName)
@@ -977,9 +977,9 @@ class P4Sync(Command):
if "p4ExitCode" in filedata[0]:
die("Problems executing p4. Error: [%d]."
- % (filedata[0]['p4ExitCode']));
+ % (filedata[0]['p4ExitCode']))
- j = 0;
+ j = 0
contents = {}
while j < len(filedata):
stat = filedata[j]
@@ -1303,8 +1303,8 @@ class P4Sync(Command):
def importNewBranch(self, branch, maxChange):
# make fast-import flush all changes to disk and update the refs using the checkpoint
# command so that we can try to find the branch parent in the git history
- self.gitStream.write("checkpoint\n\n");
- self.gitStream.flush();
+ self.gitStream.write("checkpoint\n\n")
+ self.gitStream.flush()
branchPrefix = self.depotPaths[0] + branch + "/"
range = "@1,%s" % maxChange
#print "prefix" + branchPrefix
@@ -1364,12 +1364,12 @@ class P4Sync(Command):
fullBranch = self.projectName + branch
if fullBranch not in self.p4BranchesInGit:
if not self.silent:
- print("\n Importing new branch %s" % fullBranch);
+ print("\n Importing new branch %s" % fullBranch)
if self.importNewBranch(branch, change - 1):
parent = ""
self.p4BranchesInGit.append(fullBranch)
if not self.silent:
- print("\n Resuming with change %s" % change);
+ print("\n Resuming with change %s" % change)
if self.verbose:
print "parent determined through known branches: %s" % parent
@@ -1485,7 +1485,7 @@ class P4Sync(Command):
self.branch = self.refPrefix + "master"
if gitBranchExists("refs/heads/p4") and self.importIntoRemotes:
system("git update-ref %s refs/heads/p4" % self.branch)
- system("git branch -D p4");
+ system("git branch -D p4")
# create it /after/ importing, when master exists
if not gitBranchExists(self.refPrefix + "HEAD") and self.importIntoRemotes and gitBranchExists(self.branch):
system("git symbolic-ref %sHEAD %s" % (self.refPrefix, self.branch))
@@ -1591,7 +1591,7 @@ class P4Sync(Command):
self.loadUserMapFromCache()
self.labels = {}
if self.detectLabels:
- self.getLabels();
+ self.getLabels()
if self.detectBranches:
## FIXME - what's a P4 projectName ?
@@ -1615,7 +1615,7 @@ class P4Sync(Command):
importProcess = subprocess.Popen(["git", "fast-import"],
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
- stderr=subprocess.PIPE);
+ stderr=subprocess.PIPE)
self.gitOutput = importProcess.stdout
self.gitStream = importProcess.stdin
self.gitError = importProcess.stderr
@@ -1688,9 +1688,9 @@ class P4Rebase(Command):
def rebase(self):
if os.system("git update-index --refresh") != 0:
- die("Some files in your working directory are modified and different than what is in your index. You can use git update-index <filename> to bring the index up-to-date or stash away all your changes with git stash.");
+ die("Some files in your working directory are modified and different than what is in your index. You can use git update-index <filename> to bring the index up-to-date or stash away all your changes with git stash.")
if len(read_pipe("git diff-index HEAD --")) > 0:
- die("You have uncommited changes. Please commit them before rebasing or stash them away with git stash.");
+ die("You have uncommited changes. Please commit them before rebasing or stash them away with git stash.")
[upstream, settings] = findUpstreamBranchPoint()
if len(upstream) == 0:
@@ -1866,7 +1866,7 @@ def main():
description = cmd.description,
formatter = HelpFormatter())
- (cmd, args) = parser.parse_args(sys.argv[2:], cmd);
+ (cmd, args) = parser.parse_args(sys.argv[2:], cmd)
global verbose
verbose = cmd.verbose
if cmd.needsGit:
@@ -1877,7 +1877,7 @@ def main():
if os.path.exists(cmd.gitdir):
cdup = read_pipe("git rev-parse --show-cdup").strip()
if len(cdup) > 0:
- chdir(cdup);
+ chdir(cdup)
if not isValidGitDir(cmd.gitdir):
if isValidGitDir(cmd.gitdir + "/.git"):
--
1.6.1.3
next prev parent reply other threads:[~2009-03-07 12:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-06 15:53 [PATCH] git-p4: remove unnecessary semicolons at end of lines Sam Hocevar
2009-03-06 16:55 ` Brandon Casey
2009-03-06 17:11 ` msysgit corrupting commit messages? Sam Hocevar
2009-03-07 2:48 ` Johannes Schindelin
2009-03-07 12:26 ` Sam Hocevar [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-03-04 21:54 [PATCH] git-p4: improve performance with large files Sam Hocevar
2009-03-04 23:05 ` thestar
2009-03-05 17:23 ` Sam Hocevar
2009-03-06 0:01 ` thestar
2009-03-06 1:14 ` Junio C Hamano
2009-03-06 1:25 ` Han-Wen Nienhuys
2009-03-06 8:53 ` Sam Hocevar
2009-03-06 9:42 ` Junio C Hamano
2009-03-06 10:13 ` [PATCH v4] " Sam Hocevar
2009-03-07 12:25 ` [PATCH v5] git-p4: improve performance when importing huge files by reducing the number of string concatenations while constraining memory usage Sam Hocevar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090307122625.GA8153@zoy.org \
--to=sam@zoy.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.