summaryrefslogtreecommitdiff
path: root/contrib/remote-helpers/test-hg.sh
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2013-05-25 02:29:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-05-28 14:59:30 (GMT)
commit9529cce86e508d1910395d7493b7b8706ea7cd37 (patch)
tree7db2274d027af25be771f98115c713903ea94ce9 /contrib/remote-helpers/test-hg.sh
parent68b161167841c43c138604429f9981cb453aff8a (diff)
downloadgit-9529cce86e508d1910395d7493b7b8706ea7cd37.zip
git-9529cce86e508d1910395d7493b7b8706ea7cd37.tar.gz
git-9529cce86e508d1910395d7493b7b8706ea7cd37.tar.bz2
remote-hg: ensure remote rebasing works
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/remote-helpers/test-hg.sh')
-rwxr-xr-xcontrib/remote-helpers/test-hg.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh
index c54adb6..af27a0f 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -37,6 +37,8 @@ setup () {
(
echo "[ui]"
echo "username = H G Wells <wells@example.com>"
+ echo "[extensions]"
+ echo "mq ="
) >> "$HOME"/.hgrc
}
@@ -161,4 +163,42 @@ test_expect_success 'authors' '
test_cmp expected actual
'
+test_expect_success 'strip' '
+ test_when_finished "rm -rf hgrepo gitrepo" &&
+
+ (
+ hg init hgrepo &&
+ cd hgrepo &&
+
+ echo one >> content &&
+ hg add content &&
+ hg commit -m one &&
+
+ echo two >> content &&
+ hg commit -m two
+ ) &&
+
+ git clone "hg::hgrepo" gitrepo &&
+
+ (
+ cd hgrepo &&
+ hg strip 1 &&
+
+ echo three >> content &&
+ hg commit -m three &&
+
+ echo four >> content &&
+ hg commit -m four
+ ) &&
+
+ (
+ cd gitrepo &&
+ git fetch &&
+ git log --format="%s" origin/master > ../actual
+ ) &&
+
+ hg -R hgrepo log --template "{desc}\n" > expected &&
+ test_cmp actual expected
+'
+
test_done