diff tests/test-mq-qpush-fail.t @ 16653:73b8c2554be8

mq: introduce qpop --check qpop --check let you qpop with uncommitted files if they do not intersect with files touched by the popped patches.
author Patrick Mezard <patrick@mezard.eu>
date Sat, 12 May 2012 00:19:30 +0200
parents 9d76320d8b99
children 490ed8972f1b
line wrap: on
line diff
--- a/tests/test-mq-qpush-fail.t	Tue May 08 15:31:00 2012 -0700
+++ b/tests/test-mq-qpush-fail.t	Sat May 12 00:19:30 2012 +0200
@@ -202,6 +202,42 @@
   $ test -f a.orig && echo 'error: backup with --no-backup'
   [1]
 
+test qpop --check
+
+  $ hg qpush
+  applying p1
+  now at: p1
+  $ hg qpop --check --force
+  abort: cannot use both --force and --check
+  [255]
+  $ echo a >> a
+  $ hg qpop --check
+  abort: local changes found, refresh first
+  [255]
+  $ hg revert -qa a
+  $ rm a
+  $ hg qpop --check
+  abort: local changes found, refresh first
+  [255]
+  $ hg rm -A a
+  $ hg qpop --check
+  abort: local changes found, refresh first
+  [255]
+  $ hg revert -qa a
+  $ echo b > b
+  $ hg add b
+  $ hg qpop --check
+  abort: local changes found, refresh first
+  [255]
+  $ hg forget b
+  $ echo d > d
+  $ hg add d
+  $ hg qpop --check
+  popping p1
+  patch queue now empty
+  $ hg forget d
+  $ rm d
+
 test qpush --force and backup files
 
   $ echo a >> a