tests/test-mq.t
changeset 14256 d04ba50e104d
parent 14210 68ade2a6b30a
child 14347 e8debe1eb255
--- a/tests/test-mq.t	Fri May 06 19:03:41 2011 +0300
+++ b/tests/test-mq.t	Fri May 06 19:55:46 2011 +0300
@@ -1259,6 +1259,47 @@
   now at: changea
   $ cd ..
 
+test qpop with local changes, issue2780
+
+  $ hg init forcepop
+  $ cd forcepop
+  $ echo 1 > 1
+  $ hg ci -Am 1
+  adding 1
+  $ hg qnew foo
+  $ echo 2 > 2
+  $ hg add
+  adding 2
+
+unrelated changes
+
+  $ hg qpop
+  popping foo
+  patch queue now empty
+
+related changes
+
+  $ hg forget 2
+  $ rm 2
+  $ hg qpush
+  applying foo
+  patch foo is empty
+  now at: foo
+  $ echo 2 >> 1
+  $ hg qrefresh
+  $ echo 2 >> 1
+  $ hg qpop
+  abort: local changes found, refresh first
+  [255]
+  $ hg st
+  M 1
+
+related changes with force
+  $ hg qpop --force
+  popping foo
+  patch queue now empty
+  $ hg st
+  $ cd ..
 
 test qpush with --force, issue1087
 
@@ -1276,16 +1317,9 @@
   $ echo world >> hello.txt
 
 
-qpush should fail, local changes
+apply, should not discard changes with empty patch
 
   $ hg qpush
-  abort: local changes found
-  [255]
-
-
-apply force, should not discard changes with empty patch
-
-  $ hg qpush -f
   applying empty
   patch empty is empty
   now at: empty