Signed-off-by: Felipe Contreras <felipe.contre...@gmail.com>
---
 contrib/remote-helpers/git-remote-hg |  1 +
 contrib/remote-helpers/test-hg.sh    | 40 ++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+)

diff --git a/contrib/remote-helpers/git-remote-hg 
b/contrib/remote-helpers/git-remote-hg
index 6cad5cd..bc6e8fa 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -624,6 +624,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
diff --git a/contrib/remote-helpers/test-hg.sh 
b/contrib/remote-helpers/test-hg.sh
index 4bd7584..23ff0db 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 <we...@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 -r 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
-- 
1.8.3.rc1.579.g184e698

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to