remote-hg: test 'shared_path' in a moved clone
authorAntoine Pelisse <apelisse@gmail.com>
Mon, 23 Dec 2013 20:23:43 +0000 (21:23 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 Dec 2013 18:43:56 +0000 (10:43 -0800)
Since e71d1378 (remote-hg: fix 'shared path' path, 2013-12-07),
Mercurial 'shared_path' file is correctly updated whenever a clone is
moved. Make sure it keeps working, especially as this is depending on a
private Mercurial file.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/remote-helpers/test-hg.sh
index 0b7df110ad6e52f16a2c15d3c124666eecc102f6..5d128a5da9a1afd3bf441f58e75d4f02a64509d5 100755 (executable)
@@ -337,6 +337,17 @@ test_expect_success 'remote cloning' '
        check gitrepo HEAD zero
 '
 
+test_expect_success 'moving remote clone' '
+       test_when_finished "rm -rf gitrepo*" &&
+
+       (
+       git clone "hg::hgrepo" gitrepo &&
+       mv gitrepo gitrepo2 &&
+       cd gitrepo2 &&
+       git fetch
+       )
+'
+
 test_expect_success 'remote update bookmark' '
        test_when_finished "rm -rf gitrepo*" &&