summaryrefslogtreecommitdiff
path: root/t/t9814-git-p4-rename.sh
diff options
context:
space:
mode:
authorGary Gibbons <ggibbons@perforce.com>2012-07-12 23:29:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-07-12 23:31:34 (GMT)
commit8e9497c2e742f25dc25f85d0382833a0b79dfa8f (patch)
treebf6f3e6c85dda40dbccec513160ba8c179e15546 /t/t9814-git-p4-rename.sh
parent84cb00036fb59cf0ff305dcc27551f0519b5098c (diff)
downloadgit-8e9497c2e742f25dc25f85d0382833a0b79dfa8f.zip
git-8e9497c2e742f25dc25f85d0382833a0b79dfa8f.tar.gz
git-8e9497c2e742f25dc25f85d0382833a0b79dfa8f.tar.bz2
git p4: add support for 'p4 move' in P4Submit
For -M option (detectRenames) in P4Submit, use 'p4 move' rather than 'p4 integrate'. Check Perforce server for exisitence of 'p4 move' and use it if present, otherwise revert to 'p4 integrate'. [pw: wildcard-encode src/dest, add/update tests, tweak code] Signed-off-by: Gary Gibbons <ggibbons@perforce.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9814-git-p4-rename.sh')
-rwxr-xr-xt/t9814-git-p4-rename.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/t/t9814-git-p4-rename.sh b/t/t9814-git-p4-rename.sh
index 84fffb3..3bf1224 100755
--- a/t/t9814-git-p4-rename.sh
+++ b/t/t9814-git-p4-rename.sh
@@ -77,16 +77,16 @@ test_expect_success 'detect renames' '
git commit -a -m "Rename file1 to file4" &&
git diff-tree -r -M HEAD &&
git p4 submit &&
- p4 filelog //depot/file4 &&
- p4 filelog //depot/file4 | test_must_fail grep -q "branch from" &&
+ p4 filelog //depot/file4 >filelog &&
+ ! grep " from //depot" filelog &&
git mv file4 file5 &&
git commit -a -m "Rename file4 to file5" &&
git diff-tree -r -M HEAD &&
git config git-p4.detectRenames true &&
git p4 submit &&
- p4 filelog //depot/file5 &&
- p4 filelog //depot/file5 | grep -q "branch from //depot/file4" &&
+ p4 filelog //depot/file5 >filelog &&
+ grep " from //depot/file4" filelog &&
git mv file5 file6 &&
echo update >>file6 &&
@@ -97,8 +97,8 @@ test_expect_success 'detect renames' '
test -n "$level" && test "$level" -gt 0 && test "$level" -lt 98 &&
git config git-p4.detectRenames $(($level + 2)) &&
git p4 submit &&
- p4 filelog //depot/file6 &&
- p4 filelog //depot/file6 | test_must_fail grep -q "branch from" &&
+ p4 filelog //depot/file6 >filelog &&
+ ! grep " from //depot" filelog &&
git mv file6 file7 &&
echo update >>file7 &&
@@ -109,8 +109,8 @@ test_expect_success 'detect renames' '
test -n "$level" && test "$level" -gt 2 && test "$level" -lt 100 &&
git config git-p4.detectRenames $(($level - 2)) &&
git p4 submit &&
- p4 filelog //depot/file7 &&
- p4 filelog //depot/file7 | grep -q "branch from //depot/file6"
+ p4 filelog //depot/file7 >filelog &&
+ grep " from //depot/file6" filelog
)
'