diff options
-rw-r--r-- | Documentation/git-p4.txt | 2 | ||||
-rwxr-xr-x | git-p4.py | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt index 656587248c..5352cae4b4 100644 --- a/Documentation/git-p4.txt +++ b/Documentation/git-p4.txt @@ -470,6 +470,8 @@ git-p4.client:: git-p4.retries:: Specifies the number of times to retry a p4 command (notably, 'p4 sync') if the network times out. The default value is 3. + Set the value to 0 to disable retries or if your p4 version + does not support retries (pre 2012.2). Clone and sync variables ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -82,7 +82,9 @@ def p4_build_cmd(cmd): if retries is None: # Perform 3 retries by default retries = 3 - real_cmd += ["-r", str(retries)] + if retries > 0: + # Provide a way to not pass this option by setting git-p4.retries to 0 + real_cmd += ["-r", str(retries)] if isinstance(cmd,basestring): real_cmd = ' '.join(real_cmd) + ' ' + cmd |