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

diff --git a/contrib/remote-helpers/test-hg.sh 
b/contrib/remote-helpers/test-hg.sh
index 06700a8..f4e3807 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -281,4 +281,33 @@ test_expect_failure 'remote push diverged' '
        check_branch hgrepo default bump
 '
 
+test_expect_failure 'remote update bookmark diverge' '
+       test_when_finished "rm -rf gitrepo*" &&
+
+       (
+       cd hgrepo &&
+       hg bookmark diverge -r tip^
+       hg checkout diverge
+       ) &&
+
+       git clone "hg::hgrepo" gitrepo &&
+
+       (
+       cd hgrepo &&
+       echo "bump bookmark" > content &&
+       hg commit -m "bump bookmark"
+       ) &&
+
+       (
+       cd gitrepo &&
+       git checkout --quiet diverge &&
+       echo diverge > content &&
+       git commit -a -m diverge &&
+       test_expect_code 1 git push 2> error &&
+       grep "^ ! \[rejected\] *diverge -> diverge (non-fast-forward)$" error
+       ) &&
+
+       check_bookmark hgrepo diverge "bump bookmark"
+'
+
 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