[PATCH 05/12] Add a single command that will be used to construct the 'p4' command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 Rather than having three locations where the 'p4' command is built up,
 refactor this into the one place. This will, eventually, allow us to
 have one place where we modify the evironment or pass extra
 command-line options to the 'p4' binary.

Signed-off-by: Anand Kumria <wildfire@xxxxxxxxxxx>
---
 contrib/fast-import/git-p4 |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 2ed36ec..b4acf76 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -16,6 +16,17 @@ from sets import Set;
 
 verbose = False
 
+
+def p4_build_cmd(cmd):
+    """Build a suitable p4 command line.
+
+    This consolidates building and returning a p4 command line into one
+    location. It means that hooking into the environment, or other configuration
+    can be done more easily.
+    """
+    real_cmd = "%s %s" % ("p4", cmd)
+    return real_cmd
+
 def die(msg):
     if verbose:
         raise Exception(msg)
-- 
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux