annotate tests/test-mq-guards.t @ 22456:4bbcee186fc6 stable

mq: examine "pushable" of already applied patch correctly Before this patch, "hg qselect" with --pop/--reapply may pop patches unexpectedly, even when all of patches applied before "qselect" are still pushable. Strictly speaking about the condition of this issue: - before "qselect" - there are N applied patches - the index of the guarded patch X in the series is less than N - after "qselect" - X is still guarded, and - all of applied patched are still pushable In the case above, "hg qselect" should keep current status, but it actually tries to pop patches because of X. The index in "the series" should be used to examine "pushable" of a patch by "mq.pushablek()", but the index in "applied patches" is used, and this may cause unexpected examination of guarded patch. To examine "pushable" of already applied patch correctly, this patch uses "mq.applied[i].name": "pushable" is the function introduced by the previous patch, and it returns "mq.pushable(mq.applied[i].name)[0]".
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 12 Sep 2014 02:29:19 +0900
parents c89379d47e95
children e53f6b72a0e4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
1 $ echo "[extensions]" >> $HGRCPATH
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
2 $ echo "mq=" >> $HGRCPATH
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
4 $ hg init
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
5 $ hg qinit
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
6
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
7 $ echo x > x
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
8 $ hg ci -Ama
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
9 adding x
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
10
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
11 $ hg qnew a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
12 $ echo a > a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
13 $ hg add a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
14 $ hg qrefresh
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
15
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
16 $ hg qnew b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
17 $ echo b > b
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
18 $ hg add b
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
19 $ hg qrefresh
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
20
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
21 $ hg qnew c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
22 $ echo c > c
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
23 $ hg add c
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
24 $ hg qrefresh
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
25
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
26 $ hg qpop -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
27 popping c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
28 popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
29 popping a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
30 patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
31
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
32
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
33 should fail
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
34
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
35 $ hg qguard does-not-exist.patch +bleh
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
36 abort: no patch named does-not-exist.patch
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11896
diff changeset
37 [255]
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
38
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
39
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
40 should fail
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
41
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
42 $ hg qguard +fail
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
43 abort: no patches applied
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11896
diff changeset
44 [255]
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
45
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
46 $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
47 applying a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
48 now at: a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
49
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
50 should guard a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
51
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
52 $ hg qguard +a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
53
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
54 should print +a
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
55
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
56 $ hg qguard
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
57 a.patch: +a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
58 $ hg qpop
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
59 popping a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
60 patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
61
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
62
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
63 should fail
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
64
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
65 $ hg qpush a.patch
14464
00256f689f9c mq: print "'foo' 'bar'", not "['foo', 'bar']" when showing guards
Martin Geisler <mg@aragost.com>
parents: 13987
diff changeset
66 cannot push 'a.patch' - guarded by '+a'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11896
diff changeset
67 [1]
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
68
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
69 $ hg qguard a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
70 a.patch: +a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
71
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
72 should push b.patch
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
73
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
74 $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
75 applying b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
76 now at: b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
77
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
78 $ hg qpop
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
79 popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
80 patch queue now empty
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
81
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
82 test selection of an empty guard
4133
a9ee6c53af8d mq: abort cleanly when invalid patch name is given to qguard
Christian Ebert <blacktrash@gmx.net>
parents: 3763
diff changeset
83
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
84 $ hg qselect ""
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
85 abort: guard cannot be an empty string
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11896
diff changeset
86 [255]
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
87 $ hg qselect a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
88 number of unguarded, unapplied patches has changed from 2 to 3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
89
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
90 should push a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
91
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
92 $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
93 applying a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
94 now at: a.patch
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
95
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
96 $ hg qguard -- c.patch -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
97
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
98 should print -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
99
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
100 $ hg qguard c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
101 c.patch: -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
102
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
103
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
104 should skip c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
105
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
106 $ hg qpush -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
107 applying b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
108 skipping c.patch - guarded by '-a'
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
109 now at: b.patch
16063
c36db39b3fee mq: fix qnext when all remaining patches are guarded
Patrick Mezard <pmezard@gmail.com>
parents: 15256
diff changeset
110 $ hg qnext
c36db39b3fee mq: fix qnext when all remaining patches are guarded
Patrick Mezard <pmezard@gmail.com>
parents: 15256
diff changeset
111 all patches applied
c36db39b3fee mq: fix qnext when all remaining patches are guarded
Patrick Mezard <pmezard@gmail.com>
parents: 15256
diff changeset
112 [1]
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
113
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
114 should display b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
115
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
116 $ hg qtop
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
117 b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
118
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
119 $ hg qguard -n c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
120
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
121 should push c.patch
7398
2cd1308cb588 mq: gracefully abort qpush/qgoto to guarded patch (issue1186)
Brendan Cully <brendan@kublai.com>
parents: 6607
diff changeset
122
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
123 $ hg qpush -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
124 applying c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
125 now at: c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
126
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
127 $ hg qpop -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
128 popping c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
129 popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
130 popping a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
131 patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
132 $ hg qselect -n
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
133 guards deactivated
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
134 number of unguarded, unapplied patches has changed from 3 to 2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
135
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
136 should push all
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
137
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
138 $ hg qpush -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
139 applying b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
140 applying c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
141 now at: c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
142
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
143 $ hg qpop -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
144 popping c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
145 popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
146 patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
147 $ hg qguard a.patch +1
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
148 $ hg qguard b.patch +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
149 $ hg qselect 1
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
150 number of unguarded, unapplied patches has changed from 1 to 2
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
151
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
152 should push a.patch, not b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
153
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
154 $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
155 applying a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
156 now at: a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
157 $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
158 applying c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
159 now at: c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
160 $ hg qpop -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
161 popping c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
162 popping a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
163 patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
164
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
165 $ hg qselect 2
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
166
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
167 should push b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
168
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
169 $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
170 applying b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
171 now at: b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
172 $ hg qpush -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
173 applying c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
174 now at: c.patch
16064
7e5a281a082c mq: make qprev return the previous applied patch (issue3245)
Patrick Mezard <pmezard@gmail.com>
parents: 16063
diff changeset
175 $ hg qprev
7e5a281a082c mq: make qprev return the previous applied patch (issue3245)
Patrick Mezard <pmezard@gmail.com>
parents: 16063
diff changeset
176 b.patch
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
177
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
178 Used to be an issue with holes in the patch sequence
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
179 So, put one hole on the base and ask for topmost patch.
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
180
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
181 $ hg qtop
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
182 c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
183 $ hg qpop -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
184 popping c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
185 popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
186 patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
187
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
188 $ hg qselect 1 2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
189 number of unguarded, unapplied patches has changed from 2 to 3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
190
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
191 should push a.patch, b.patch
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
192
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
193 $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
194 applying a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
195 now at: a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
196 $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
197 applying b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
198 now at: b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
199 $ hg qpop -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
200 popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
201 popping a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
202 patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
203
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
204 $ hg qguard -- a.patch +1 +2 -3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
205 $ hg qselect 1 2 3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
206 number of unguarded, unapplied patches has changed from 3 to 2
2829
05316bb57d01 mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2821
diff changeset
207
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
208
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
209 list patches and guards
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
210
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
211 $ hg qguard -l
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
212 a.patch: +1 +2 -3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
213 b.patch: +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
214 c.patch: unguarded
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
215
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
216 have at least one patch applied to test coloring
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
217
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
218 $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
219 applying b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
220 now at: b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
221
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
222 list patches and guards with color
2850
851b07ec450c mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2844
diff changeset
223
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
224 $ hg --config extensions.color= qguard --config color.mode=ansi \
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
225 > -l --color=always
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
226 \x1b[0;30;1ma.patch\x1b[0m: \x1b[0;33m+1\x1b[0m \x1b[0;33m+2\x1b[0m \x1b[0;31m-3\x1b[0m (esc)
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
227 \x1b[0;34;1;4mb.patch\x1b[0m: \x1b[0;33m+2\x1b[0m (esc)
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
228 \x1b[0;30;1mc.patch\x1b[0m: \x1b[0;32munguarded\x1b[0m (esc)
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
229
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
230 should pop b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
231
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
232 $ hg qpop
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
233 popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
234 patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
235
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
236 list series
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
237
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
238 $ hg qseries -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
239 0 G a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
240 1 U b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
241 2 U c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
242
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
243 list guards
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
244
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
245 $ hg qselect
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
246 1
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
247 2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
248 3
2829
05316bb57d01 mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2821
diff changeset
249
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
250 should push b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
251
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
252 $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
253 applying b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
254 now at: b.patch
2829
05316bb57d01 mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2821
diff changeset
255
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
256 $ hg qpush -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
257 applying c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
258 now at: c.patch
22454
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
259 $ hg qselect -n --reapply -v
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
260 guards deactivated
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
261 popping guarded patches
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
262 popping c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
263 popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
264 patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
265 reapplying unguarded patches
22454
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
266 skipping a.patch - guarded by '+1' '+2'
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
267 skipping b.patch - guarded by '+2'
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
268 skipping a.patch - guarded by '+1' '+2'
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
269 skipping b.patch - guarded by '+2'
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
270 applying c.patch
22454
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
271 patching file c
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
272 adding c
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
273 c
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
274 now at: c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
275
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
276 guards in series file: +1 +2 -3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
277
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
278 $ hg qselect -s
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
279 +1
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
280 +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
281 -3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
282
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
283 should show c.patch
11819
1c00577b0298 qguard: label patch names by status when listing guards
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11141
diff changeset
284
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
285 $ hg qapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
286 c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
287
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
288 $ hg qrename a.patch new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
289
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
290 should show :
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
291
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
292
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
293 new.patch: +1 +2 -3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
294
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
295
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
296 b.patch: +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
297
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
298
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
299 c.patch: unguarded
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
300
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
301 $ hg qguard -l
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
302 new.patch: +1 +2 -3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
303 b.patch: +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
304 c.patch: unguarded
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
305
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
306 $ hg qnew d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
307 $ hg qpop
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
308 popping d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
309 now at: c.patch
2844
582cbc4392cb qselect: add --pop, --reapply options
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2829
diff changeset
310
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
311 should show new.patch and b.patch as Guarded, c.patch as Applied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
312
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
313
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
314 and d.patch as Unapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
315
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
316 $ hg qseries -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
317 0 G new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
318 1 G b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
319 2 A c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
320 3 U d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
321
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
322 qseries again, but with color
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
323
13987
e0f07847f8de color: add support for terminfo-based attributes and color
Danek Duvall <duvall@comfychair.org>
parents: 12942
diff changeset
324 $ hg --config extensions.color= --config color.mode=ansi qseries -v --color=always
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
325 0 G \x1b[0;30;1mnew.patch\x1b[0m (esc)
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
326 1 G \x1b[0;30;1mb.patch\x1b[0m (esc)
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
327 2 A \x1b[0;34;1;4mc.patch\x1b[0m (esc)
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
328 3 U \x1b[0;30;1md.patch\x1b[0m (esc)
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
329
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
330 $ hg qguard d.patch +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
331
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
332 new.patch, b.patch: Guarded. c.patch: Applied. d.patch: Guarded.
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
333
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
334 $ hg qseries -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
335 0 G new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
336 1 G b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
337 2 A c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
338 3 G d.patch
3685
193e9c6d1a6d Issue424: mq patch loses guard when qrenamed
Mathieu Clabaut <mathieu.clabaut@gmail.com>
parents: 2990
diff changeset
339
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
340 $ qappunappv()
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
341 > {
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
342 > for command in qapplied "qapplied -v" qunapplied "qunapplied -v"; do
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
343 > echo % hg $command
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
344 > hg $command
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
345 > done
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
346 > }
4240
943f40b4da30 Tests for qapplied/qunapplied fixes (417c2068cb92 and ce6c364ebb2a)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4133
diff changeset
347
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
348 $ hg qpop -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
349 popping c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
350 patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
351 $ hg qguard -l
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
352 new.patch: +1 +2 -3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
353 b.patch: +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
354 c.patch: unguarded
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
355 d.patch: +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
356 $ qappunappv
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
357 % hg qapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
358 % hg qapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
359 % hg qunapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
360 c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
361 % hg qunapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
362 0 G new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
363 1 G b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
364 2 U c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
365 3 G d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
366 $ hg qselect 1
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
367 number of unguarded, unapplied patches has changed from 1 to 2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
368 $ qappunappv
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
369 % hg qapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
370 % hg qapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
371 % hg qunapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
372 new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
373 c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
374 % hg qunapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
375 0 U new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
376 1 G b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
377 2 U c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
378 3 G d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
379 $ hg qpush -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
380 applying new.patch
14464
00256f689f9c mq: print "'foo' 'bar'", not "['foo', 'bar']" when showing guards
Martin Geisler <mg@aragost.com>
parents: 13987
diff changeset
381 skipping b.patch - guarded by '+2'
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
382 applying c.patch
14464
00256f689f9c mq: print "'foo' 'bar'", not "['foo', 'bar']" when showing guards
Martin Geisler <mg@aragost.com>
parents: 13987
diff changeset
383 skipping d.patch - guarded by '+2'
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
384 now at: c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
385 $ qappunappv
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
386 % hg qapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
387 new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
388 c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
389 % hg qapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
390 0 A new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
391 1 G b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
392 2 A c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
393 % hg qunapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
394 % hg qunapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
395 3 G d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
396 $ hg qselect 2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
397 number of unguarded, unapplied patches has changed from 0 to 1
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
398 $ qappunappv
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
399 % hg qapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
400 new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
401 c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
402 % hg qapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
403 0 A new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
404 1 U b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
405 2 A c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
406 % hg qunapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
407 d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
408 % hg qunapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
409 3 U d.patch
4240
943f40b4da30 Tests for qapplied/qunapplied fixes (417c2068cb92 and ce6c364ebb2a)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4133
diff changeset
410
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
411 $ for patch in `hg qseries`; do
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
412 > echo % hg qapplied $patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
413 > hg qapplied $patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
414 > echo % hg qunapplied $patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
415 > hg qunapplied $patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
416 > done
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
417 % hg qapplied new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
418 new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
419 % hg qunapplied new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
420 b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
421 d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
422 % hg qapplied b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
423 new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
424 % hg qunapplied b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
425 d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
426 % hg qapplied c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
427 new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
428 c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
429 % hg qunapplied c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
430 d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
431 % hg qapplied d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
432 new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
433 c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
434 % hg qunapplied d.patch
4240
943f40b4da30 Tests for qapplied/qunapplied fixes (417c2068cb92 and ce6c364ebb2a)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4133
diff changeset
435
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
436
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
437 hg qseries -m: only b.patch should be shown
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
438 the guards file was not ignored in the past
4241
7c59ade0f0d6 hg qseries -m: guards file was not ignored
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4240
diff changeset
439
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
440 $ hg qdelete -k b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
441 $ hg qseries -m
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
442 b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
443
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
444 hg qseries -m with color
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
445
13987
e0f07847f8de color: add support for terminfo-based attributes and color
Danek Duvall <duvall@comfychair.org>
parents: 12942
diff changeset
446 $ hg --config extensions.color= --config color.mode=ansi qseries -m --color=always
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
447 \x1b[0;31;1mb.patch\x1b[0m (esc)
15245
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
448
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
449
21024
7731a2281cf0 spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents: 16064
diff changeset
450 excercise corner cases in "qselect --reapply"
15245
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
451
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
452 $ hg qpop -a
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
453 popping c.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
454 popping new.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
455 patch queue now empty
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
456 $ hg qguard -- new.patch -not-new
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
457 $ hg qguard -- c.patch -not-c
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
458 $ hg qguard -- d.patch -not-d
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
459 $ hg qpush -a
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
460 applying new.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
461 applying c.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
462 applying d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
463 patch d.patch is empty
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
464 now at: d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
465 $ hg qguard -l
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
466 new.patch: -not-new
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
467 c.patch: -not-c
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
468 d.patch: -not-d
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
469 $ hg qselect --reapply not-d
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
470 popping guarded patches
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
471 popping d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
472 now at: c.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
473 reapplying unguarded patches
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
474 cannot push 'd.patch' - guarded by '-not-d'
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
475 $ hg qser -v
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
476 0 A new.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
477 1 A c.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
478 2 G d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
479 $ hg qselect --reapply -n
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
480 guards deactivated
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
481 $ hg qpush
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
482 applying d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
483 patch d.patch is empty
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
484 now at: d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
485 $ hg qser -v
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
486 0 A new.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
487 1 A c.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
488 2 A d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
489 $ hg qselect --reapply not-c
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
490 popping guarded patches
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
491 popping d.patch
15256
8caf7a757afa mq: fix corner cases for handling of patch 0 in qselect
Mads Kiilerich <mads@kiilerich.com>
parents: 15245
diff changeset
492 popping c.patch
8caf7a757afa mq: fix corner cases for handling of patch 0 in qselect
Mads Kiilerich <mads@kiilerich.com>
parents: 15245
diff changeset
493 now at: new.patch
15245
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
494 reapplying unguarded patches
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
495 applying d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
496 patch d.patch is empty
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
497 now at: d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
498 $ hg qser -v
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
499 0 A new.patch
15256
8caf7a757afa mq: fix corner cases for handling of patch 0 in qselect
Mads Kiilerich <mads@kiilerich.com>
parents: 15245
diff changeset
500 1 G c.patch
15245
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
501 2 A d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
502 $ hg qselect --reapply not-new
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
503 popping guarded patches
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
504 popping d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
505 popping new.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
506 patch queue now empty
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
507 reapplying unguarded patches
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
508 applying c.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
509 applying d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
510 patch d.patch is empty
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
511 now at: d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
512 $ hg qser -v
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
513 0 G new.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
514 1 A c.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
515 2 A d.patch
22453
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
516
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
517 test that qselect shows "number of guarded, applied patches" correctly
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
518
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
519 $ hg qimport -q -e b.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
520 adding b.patch to series file
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
521 $ hg qguard -- b.patch -not-b
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
522 $ hg qpop -a -q
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
523 patch queue now empty
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
524 $ hg qunapplied -v
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
525 0 G new.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
526 1 U c.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
527 2 U d.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
528 3 U b.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
529 $ hg qselect not-new not-c
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
530 number of unguarded, unapplied patches has changed from 3 to 2
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
531 $ hg qpush -q -a
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
532 patch d.patch is empty
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
533 now at: b.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
534
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
535 $ hg qapplied -v
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
536 0 G new.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
537 1 G c.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
538 2 A d.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
539 3 A b.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
540 $ hg qselect --none
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
541 guards deactivated
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
542 $ hg qselect not-new not-c not-d
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
543 number of guarded, applied patches has changed from 0 to 1
22455
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
544
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
545 test that "qselect --reapply" reapplies patches successfully when the
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
546 already applied patch becomes unguarded and it follows the already
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
547 guarded (= not yet applied) one.
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
548
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
549 $ hg qpop -q -a
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
550 patch queue now empty
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
551 $ hg qselect not-new not-c
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
552 number of unguarded, unapplied patches has changed from 1 to 2
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
553 $ hg qpush -q -a
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
554 patch d.patch is empty
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
555 now at: b.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
556 $ hg qapplied -v
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
557 0 G new.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
558 1 G c.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
559 2 A d.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
560 3 A b.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
561 $ hg qselect -q --reapply not-c not-b
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
562 now at: d.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
563 cannot push 'b.patch' - guarded by '-not-b'
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
564 $ hg qseries -v
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
565 0 U new.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
566 1 G c.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
567 2 A d.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
568 3 G b.patch
22456
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
569
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
570 test that "qselect --reapply" checks applied patches correctly when no
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
571 applied patche becomes guarded but some of unapplied ones become
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
572 unguarded.
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
573
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
574 $ hg qpop -q -a
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
575 patch queue now empty
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
576 $ hg qselect not-new not-c not-d
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
577 number of unguarded, unapplied patches has changed from 2 to 1
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
578 $ hg qpush -q -a
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
579 now at: b.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
580 $ hg qapplied -v
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
581 0 G new.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
582 1 G c.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
583 2 G d.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
584 3 A b.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
585 $ hg qselect -q --reapply not-new not-c
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
586 $ hg qseries -v
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
587 0 G new.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
588 1 G c.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
589 2 U d.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
590 3 A b.patch