summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorBlair Holloway <blair_holloway@playstation.sony.com>2015-04-04 08:46:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-04-04 19:43:20 (GMT)
commit34a0dbfc6b7463a68df79d5773102f85e56cbe4d (patch)
treea822caf1c918d173462522a7ce36a2111c2cf454 /git-p4.py
parentd077c2db8db64c931976391afee6c35828868a11 (diff)
downloadgit-34a0dbfc6b7463a68df79d5773102f85e56cbe4d.zip
git-34a0dbfc6b7463a68df79d5773102f85e56cbe4d.tar.gz
git-34a0dbfc6b7463a68df79d5773102f85e56cbe4d.tar.bz2
git-p4: fix filetype detection on files opened exclusively
If a Perforce server is configured to automatically set +l (exclusive lock) on add of certain file types, git p4 submit will fail during getP4OpenedType, as the regex doesn't expect the trailing '*exclusive*' from p4 opened: //depot/file.png#1 - add default change (binary+l) *exclusive* Signed-off-by: Blair Holloway <blair_holloway@playstation.sony.com> Acked-by: Luke Diamand <luke@diamand.org> Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-p4.py b/git-p4.py
index 549022e..2e1c4af 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -368,7 +368,7 @@ def getP4OpenedType(file):
# Returns the perforce file type for the given file.
result = p4_read_pipe(["opened", wildcard_encode(file)])
- match = re.match(".*\((.+)\)\r?$", result)
+ match = re.match(".*\((.+)\)( \*exclusive\*)?\r?$", result)
if match:
return match.group(1)
else: