diff tests/test-mq @ 6558:550c53d66949

merge from crew-stable
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 16 Apr 2008 16:07:15 +0200
parents 8c4cd80afd3e 3182602fa1fb
children 25961e53a07f
line wrap: on
line diff
--- 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