remote-hg: ensure remote rebasing works
authorFelipe Contreras <felipe.contreras@gmail.com>
Sat, 25 May 2013 02:29:31 +0000 (21:29 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 May 2013 14:59:30 +0000 (07:59 -0700)
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/remote-helpers/git-remote-hg
contrib/remote-helpers/test-hg.sh
index 2e4f7ca425fb8f684ff3ac57ab05f34ec6d2c365..e0e68eff2cf755baabad59af9460cb07dccb643d 100755 (executable)
@@ -621,6 +621,7 @@ def do_import(parser):
     if os.path.exists(path):
         print "feature import-marks=%s" % path
     print "feature export-marks=%s" % path
+    print "feature force"
     sys.stdout.flush()
 
     tmp = encoding.encoding
index c54adb6fee27c1c7be0ea764f7cb73309adfbc30..af27a0f65fae51771740bc5a31671c8a976f8a1d 100755 (executable)
@@ -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