Skip to content

Commit a9d00b6

Browse files
committed
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
2 parents e971a1f + 34a0dbf commit a9d00b6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

git-p4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def getP4OpenedType(file):
368368
# Returns the perforce file type for the given file.
369369

370370
result = p4_read_pipe(["opened", wildcard_encode(file)])
371-
match = re.match(".*\((.+)\)\r?$", result)
371+
match = re.match(".*\((.+)\)( \*exclusive\*)?\r?$", result)
372372
if match:
373373
return match.group(1)
374374
else:

t/t9816-git-p4-locked.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ test_expect_success 'edit with lock not taken' '
3535
)
3636
'
3737

38-
test_expect_failure 'add with lock not taken' '
38+
test_expect_success 'add with lock not taken' '
3939
test_when_finished cleanup_git &&
4040
git p4 clone --dest="$git" //depot &&
4141
(
4242
cd "$git" &&
4343
echo line1 >>add-lock-not-taken &&
44-
git add file2 &&
44+
git add add-lock-not-taken &&
4545
git commit -m "add add-lock-not-taken" &&
4646
git config git-p4.skipSubmitEdit true &&
4747
git p4 submit --verbose
@@ -107,7 +107,7 @@ test_expect_failure 'chmod with lock taken' '
107107
)
108108
'
109109

110-
test_expect_failure 'copy with lock taken' '
110+
test_expect_success 'copy with lock taken' '
111111
lock_in_another_client &&
112112
test_when_finished cleanup_git &&
113113
test_when_finished "cd \"$cli\" && p4 revert file2 && rm -f file2" &&
@@ -130,8 +130,8 @@ test_expect_failure 'move with lock taken' '
130130
git p4 clone --dest="$git" //depot &&
131131
(
132132
cd "$git" &&
133-
git mv file1 file2 &&
134-
git commit -m "mv file1 to file2" &&
133+
git mv file1 file3 &&
134+
git commit -m "mv file1 to file3" &&
135135
git config git-p4.skipSubmitEdit true &&
136136
git config git-p4.detectRenames true &&
137137
git p4 submit --verbose

0 commit comments

Comments
 (0)