diff tests/test-push-warn @ 9954:d6a307719ccb stable

fix bug in prepush logic involving merge changesets When creating new branches and merging them into existing ones, you would sometimes be able to push some changesets (the existing branches) without using --force, even when that creates a new head on the remote. A test which triggers the error has been added.
author Sune Foldager <cryo@cyanite.org>
date Mon, 30 Nov 2009 14:58:52 +0100
parents aa404f3f661b
children 844d83da2da9
line wrap: on
line diff
--- a/tests/test-push-warn	Sat Nov 28 23:44:18 2009 +0100
+++ b/tests/test-push-warn	Mon Nov 30 14:58:52 2009 +0100
@@ -140,4 +140,21 @@
 hg -R i push h
 echo
 
+echo % check prepush logic with merged branches
+hg init j
+hg -R j branch a
+echo init > j/foo
+hg -R j ci -Am init
+hg clone j k
+echo a1 > j/foo
+hg -R j ci -m a1
+hg -R k branch b
+echo b > k/foo
+hg -R k ci -m b
+hg -R k up 0
+hg -R k merge b
+hg -R k ci -m merge
+hg -R k push -r a j
+echo
+
 exit 0