Mercurial > hg-stable
diff tests/test-mq-qpush-fail.t @ 16656:4ae3ba9e4d7a
mq: introduce mq.check setting
When:
[mq]
check = True
is set, qpush, qpop and qgoto behave as if -c/--check were passed. If
incompatible options like -f/--force or --exact are set, this setting is
ignored.
This setting enables what many users expect mq default behaviour to be.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Sat, 12 May 2012 00:19:30 +0200 |
parents | 6ca125af882f |
children | 4da10c00a20c |
line wrap: on
line diff
--- a/tests/test-mq-qpush-fail.t Sat May 12 00:19:30 2012 +0200 +++ b/tests/test-mq-qpush-fail.t Sat May 12 00:19:30 2012 +0200 @@ -387,3 +387,38 @@ now at: p2 $ hg st a M a + +test mq.check setting + + $ hg --config mq.check=1 qpush + applying p3 + now at: p3 + $ hg st a + M a + $ hg --config mq.check=1 qpop + popping p3 + now at: p2 + $ hg st a + M a + $ hg --config mq.check=1 qgoto p3 + applying p3 + now at: p3 + $ hg st a + M a + $ echo b >> b + $ hg --config mq.check=1 qpop --force + popping p3 + now at: p2 + $ hg st b + $ hg --config mq.check=1 qpush --exact + abort: local changes found, refresh first + [255] + $ hg revert -qa a + $ hg qpop + popping p2 + patch queue now empty + $ echo a >> a + $ hg --config mq.check=1 qpush --force + applying p2 + now at: p2 + $ hg st a