tests/test-mq
changeset 6558 550c53d66949
parent 6472 8c4cd80afd3e
parent 6554 3182602fa1fb
child 7048 25961e53a07f
--- a/tests/test-mq	Wed Apr 16 12:15:43 2008 +0200
+++ b/tests/test-mq	Wed Apr 16 16:07:15 2008 +0200
@@ -505,3 +505,35 @@
 hg qpop
 hg qpush
 cd ..
+
+echo % test qpush with --force, issue1087
+hg init forcepush
+cd forcepush
+echo hello > hello.txt
+echo bye > bye.txt
+hg ci -Ama
+hg qnew -d '0 0' empty
+hg qpop
+echo world >> hello.txt
+
+echo % qpush should fail, local changes
+hg qpush
+
+echo % apply force, should not discard changes with empty patch
+hg qpush -f
+hg diff --config diff.nodates=True
+hg qdiff --config diff.nodates=True
+hg log -l1 -p
+hg qref -d '0 0'
+hg qpop
+echo universe >> hello.txt
+echo universe >> bye.txt
+
+echo % qpush should fail, local changes
+hg qpush
+
+echo % apply force, should discard changes in hello, but not bye
+hg qpush -f
+hg st
+hg diff --config diff.nodates=True
+hg qdiff --config diff.nodates=True