* [PATCH 1/2] Add p4 read_pipe and write_pipe wrappers
[not found] <g829vo@ger.gmane.org>
@ 2008-08-14 22:40 ` Anand Kumria
2008-08-14 22:40 ` [PATCH 2/2] Utilise our new p4_read_pipe and p4_write_pipe wrappers Anand Kumria
0 siblings, 1 reply; 2+ messages in thread
From: Anand Kumria @ 2008-08-14 22:40 UTC (permalink / raw)
To: git; +Cc: simon, torarvid, Anand Kumria
Two additional wrappers to cover 3 places where we utilise p4
in piped form. Found by Tor Arvid Lund.
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
---
contrib/fast-import/git-p4 | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 6c64224..3e9df70 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -69,6 +69,10 @@ def write_pipe(c, str):
return val
+def p4_write_pipe(c, str):
+ real_cmd = p4_build_cmd(c)
+ return write_pipe(c, str)
+
def read_pipe(c, ignore_error=False):
if verbose:
sys.stderr.write('Reading pipe: %s\n' % c)
@@ -80,6 +84,9 @@ def read_pipe(c, ignore_error=False):
return val
+def p4_read_pipe(c, ignore_error=False):
+ real_cmd = p4_build_cmd(c)
+ return read_pipe(real_cmd, ignore_error)
def read_pipe_lines(c):
if verbose:
--
1.5.6.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] Utilise our new p4_read_pipe and p4_write_pipe wrappers
2008-08-14 22:40 ` [PATCH 1/2] Add p4 read_pipe and write_pipe wrappers Anand Kumria
@ 2008-08-14 22:40 ` Anand Kumria
0 siblings, 0 replies; 2+ messages in thread
From: Anand Kumria @ 2008-08-14 22:40 UTC (permalink / raw)
To: git; +Cc: simon, torarvid, Anand Kumria
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
---
contrib/fast-import/git-p4 | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 3e9df70..12fa9d3 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -141,7 +141,7 @@ def setP4ExecBit(file, mode):
def getP4OpenedType(file):
# Returns the perforce file type for the given file.
- result = read_pipe("p4 opened %s" % file)
+ result = p4_read_pipe("opened %s" % file)
match = re.match(".*\((.+)\)\r?$", result)
if match:
return match.group(1)
@@ -681,7 +681,7 @@ class P4Submit(Command):
submitTemplate = self.prepareLogMessage(template, logMessage)
if os.environ.has_key("P4DIFF"):
del(os.environ["P4DIFF"])
- diff = read_pipe("p4 diff -du ...")
+ diff = p4_read_pipe("diff -du ...")
newdiff = ""
for newFile in filesToAdd:
@@ -719,7 +719,7 @@ class P4Submit(Command):
if self.isWindows:
submitTemplate = submitTemplate.replace("\r\n", "\n")
- write_pipe("p4 submit -i", submitTemplate)
+ p4_write_pipe("submit -i", submitTemplate)
else:
fileName = "submit.txt"
file = open(fileName, "w+")
--
1.5.6.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-14 23:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <g829vo@ger.gmane.org>
2008-08-14 22:40 ` [PATCH 1/2] Add p4 read_pipe and write_pipe wrappers Anand Kumria
2008-08-14 22:40 ` [PATCH 2/2] Utilise our new p4_read_pipe and p4_write_pipe wrappers Anand Kumria
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).