File tree 2 files changed +18
-1
lines changed
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -547,6 +547,11 @@ git-p4.retries::
547
547
Set the value to 0 to disable retries or if your p4 version
548
548
does not support retries (pre 2012.2).
549
549
550
+ git-p4.binary::
551
+ Specifies the p4 executable used by git-p4 to process commands.
552
+ The default value for Windows is `p4.exe` and for all other
553
+ systems the default is `p4`.
554
+
550
555
Clone and sync variables
551
556
~~~~~~~~~~~~~~~~~~~~~~~~
552
557
git-p4.syncFromOrigin::
Original file line number Diff line number Diff line change 26
26
import zlib
27
27
import ctypes
28
28
import errno
29
+ import os .path
30
+ from os import path
29
31
30
32
# support basestring in python3
31
33
try :
@@ -85,7 +87,17 @@ def p4_build_cmd(cmd):
85
87
location. It means that hooking into the environment, or other configuration
86
88
can be done more easily.
87
89
"""
88
- real_cmd = ["p4" ]
90
+ # Look for the P4 binary
91
+ p4bin = gitConfig ("git-p4.binary" )
92
+ real_cmd = []
93
+ if p4bin != "" :
94
+ if path .exists (p4bin ):
95
+ real_cmd = [p4bin ]
96
+ if real_cmd == []:
97
+ if (platform .system () == "Windows" ):
98
+ real_cmd = ["p4.exe" ]
99
+ else :
100
+ real_cmd = ["p4" ]
89
101
90
102
user = gitConfig ("git-p4.user" )
91
103
if len (user ) > 0 :
You can’t perform that action at this time.
0 commit comments