summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-05-05 21:00:27 -0700
committerJunio C Hamano <gitster@pobox.com>2015-05-05 21:00:28 -0700
commita9d00b662f0fdb88434b85d2bd55ebfee227e0d7 (patch)
tree07d96aeadb52c7ac626a9a1adaa4ac952b62f5f5
parente971a1f9d52295503b7ea0cdb75e46470d5d5d8a (diff)
parent34a0dbfc6b7463a68df79d5773102f85e56cbe4d (diff)
downloadgit-a9d00b662f0fdb88434b85d2bd55ebfee227e0d7.tar.gz
Merge branch 'ld/p4-filetype-detection'
* ld/p4-filetype-detection: git-p4: fix filetype detection on files opened exclusively git-p4: small fix for locked-file-move-test git-p4: fix small bug in locked test scripts
-rwxr-xr-xgit-p4.py2
-rwxr-xr-xt/t9816-git-p4-locked.sh10
2 files changed, 6 insertions, 6 deletions
diff --git a/git-p4.py b/git-p4.py
index 549022e97c..2e1c4af191 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:
diff --git a/t/t9816-git-p4-locked.sh b/t/t9816-git-p4-locked.sh
index e71e543343..d048bd33fa 100755
--- a/t/t9816-git-p4-locked.sh
+++ b/t/t9816-git-p4-locked.sh
@@ -35,13 +35,13 @@ test_expect_success 'edit with lock not taken' '
)
'
-test_expect_failure 'add with lock not taken' '
+test_expect_success 'add with lock not taken' '
test_when_finished cleanup_git &&
git p4 clone --dest="$git" //depot &&
(
cd "$git" &&
echo line1 >>add-lock-not-taken &&
- git add file2 &&
+ git add add-lock-not-taken &&
git commit -m "add add-lock-not-taken" &&
git config git-p4.skipSubmitEdit true &&
git p4 submit --verbose
@@ -107,7 +107,7 @@ test_expect_failure 'chmod with lock taken' '
)
'
-test_expect_failure 'copy with lock taken' '
+test_expect_success 'copy with lock taken' '
lock_in_another_client &&
test_when_finished cleanup_git &&
test_when_finished "cd \"$cli\" && p4 revert file2 && rm -f file2" &&
@@ -130,8 +130,8 @@ test_expect_failure 'move with lock taken' '
git p4 clone --dest="$git" //depot &&
(
cd "$git" &&
- git mv file1 file2 &&
- git commit -m "mv file1 to file2" &&
+ git mv file1 file3 &&
+ git commit -m "mv file1 to file3" &&
git config git-p4.skipSubmitEdit true &&
git config git-p4.detectRenames true &&
git p4 submit --verbose