Mercurial > hg
annotate tests/test-mq-guards.t @ 21312:986b8a58a6d3
run-tests: move t test parsing into its own function
Test parsing is somewhat complicated. This patch extracts it into its
own function.
The impetus of this patch is folding tsttest() into the TTest class.
Subsequent patches will continue this work until tsttest() no longer
exists.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 19 Apr 2014 15:19:28 -0700 |
parents | 7731a2281cf0 |
children | fd0f0b0d316d |
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 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
259 $ hg qselect -n --reapply |
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 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
266 applying c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
267 now at: c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
268 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
269 guards in series file: +1 +2 -3 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
270 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
271 $ hg qselect -s |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
272 +1 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
273 +2 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
274 -3 |
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 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
|
277 |
11896
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
278 $ hg qapplied |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
279 c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
280 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
281 $ hg qrename a.patch new.patch |
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 : |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
284 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
285 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
286 new.patch: +1 +2 -3 |
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 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
289 b.patch: +2 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
290 |
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 c.patch: unguarded |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
293 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
294 $ hg qguard -l |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
295 new.patch: +1 +2 -3 |
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 c.patch: unguarded |
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 $ hg qnew d.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
300 $ hg qpop |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
301 popping d.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
302 now at: c.patch |
2844
582cbc4392cb
qselect: add --pop, --reapply options
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2829
diff
changeset
|
303 |
11896
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
304 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
|
305 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
306 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
307 and d.patch as Unapplied |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
308 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
309 $ hg qseries -v |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
310 0 G new.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
311 1 G b.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
312 2 A c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
313 3 U d.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
314 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
315 qseries again, but with color |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
316 |
13987
e0f07847f8de
color: add support for terminfo-based attributes and color
Danek Duvall <duvall@comfychair.org>
parents:
12942
diff
changeset
|
317 $ 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
|
318 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
|
319 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
|
320 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
|
321 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
|
322 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
323 $ hg qguard d.patch +2 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
324 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
325 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
|
326 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
327 $ hg qseries -v |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
328 0 G new.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
329 1 G b.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
330 2 A c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
331 3 G d.patch |
3685
193e9c6d1a6d
Issue424: mq patch loses guard when qrenamed
Mathieu Clabaut <mathieu.clabaut@gmail.com>
parents:
2990
diff
changeset
|
332 |
11896
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
333 $ qappunappv() |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
334 > { |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
335 > 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
|
336 > echo % hg $command |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
337 > hg $command |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
338 > done |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
339 > } |
4240
943f40b4da30
Tests for qapplied/qunapplied fixes (417c2068cb92 and ce6c364ebb2a)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4133
diff
changeset
|
340 |
11896
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
341 $ hg qpop -a |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
342 popping c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
343 patch queue now empty |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
344 $ hg qguard -l |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
345 new.patch: +1 +2 -3 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
346 b.patch: +2 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
347 c.patch: unguarded |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
348 d.patch: +2 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
349 $ qappunappv |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
350 % hg qapplied |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
351 % hg qapplied -v |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
352 % hg qunapplied |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
353 c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
354 % hg qunapplied -v |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
355 0 G new.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
356 1 G b.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
357 2 U c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
358 3 G d.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
359 $ hg qselect 1 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
360 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
|
361 $ qappunappv |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
362 % hg qapplied |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
363 % hg qapplied -v |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
364 % hg qunapplied |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
365 new.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
366 c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
367 % hg qunapplied -v |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
368 0 U new.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
369 1 G b.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
370 2 U c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
371 3 G d.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
372 $ hg qpush -a |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
373 applying new.patch |
14464
00256f689f9c
mq: print "'foo' 'bar'", not "['foo', 'bar']" when showing guards
Martin Geisler <mg@aragost.com>
parents:
13987
diff
changeset
|
374 skipping b.patch - guarded by '+2' |
11896
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
375 applying c.patch |
14464
00256f689f9c
mq: print "'foo' 'bar'", not "['foo', 'bar']" when showing guards
Martin Geisler <mg@aragost.com>
parents:
13987
diff
changeset
|
376 skipping d.patch - guarded by '+2' |
11896
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
377 now at: c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
378 $ qappunappv |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
379 % hg qapplied |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
380 new.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
381 c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
382 % hg qapplied -v |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
383 0 A new.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
384 1 G b.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
385 2 A c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
386 % hg qunapplied |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
387 % hg qunapplied -v |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
388 3 G d.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
389 $ hg qselect 2 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
390 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
|
391 number of guarded, applied patches has changed from 1 to 0 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
392 $ qappunappv |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
393 % hg qapplied |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
394 new.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
395 c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
396 % hg qapplied -v |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
397 0 A new.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
398 1 U b.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
399 2 A c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
400 % hg qunapplied |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
401 d.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
402 % hg qunapplied -v |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
403 3 U d.patch |
4240
943f40b4da30
Tests for qapplied/qunapplied fixes (417c2068cb92 and ce6c364ebb2a)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4133
diff
changeset
|
404 |
11896
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
405 $ for patch in `hg qseries`; do |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
406 > echo % hg qapplied $patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
407 > hg qapplied $patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
408 > echo % hg qunapplied $patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
409 > hg qunapplied $patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
410 > done |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
411 % hg qapplied new.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
412 new.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
413 % hg qunapplied new.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
414 b.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
415 d.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
416 % hg qapplied b.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
417 new.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
418 % hg qunapplied b.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
419 d.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
420 % hg qapplied c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
421 new.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
422 c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
423 % hg qunapplied c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
424 d.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
425 % hg qapplied d.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
426 new.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
427 c.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
428 % hg qunapplied d.patch |
4240
943f40b4da30
Tests for qapplied/qunapplied fixes (417c2068cb92 and ce6c364ebb2a)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4133
diff
changeset
|
429 |
11896
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
430 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
431 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
|
432 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
|
433 |
11896
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
434 $ hg qdelete -k b.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
435 $ hg qseries -m |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
436 b.patch |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
437 |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
438 hg qseries -m with color |
286693eaba47
tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11819
diff
changeset
|
439 |
13987
e0f07847f8de
color: add support for terminfo-based attributes and color
Danek Duvall <duvall@comfychair.org>
parents:
12942
diff
changeset
|
440 $ 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
|
441 \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
|
442 |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
443 |
21024
7731a2281cf0
spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents:
16064
diff
changeset
|
444 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
|
445 |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
446 $ hg qpop -a |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
447 popping c.patch |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
448 popping new.patch |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
449 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
|
450 $ 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
|
451 $ 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
|
452 $ 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
|
453 $ hg qpush -a |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
454 applying new.patch |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
455 applying c.patch |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
456 applying d.patch |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
457 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
|
458 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
|
459 $ hg qguard -l |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
460 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
|
461 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
|
462 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
|
463 $ 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
|
464 popping guarded patches |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
465 popping d.patch |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
466 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
|
467 reapplying unguarded patches |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
468 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
|
469 $ hg qser -v |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
470 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
|
471 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
|
472 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
|
473 $ 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
|
474 guards deactivated |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
475 $ hg qpush |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
476 applying d.patch |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
477 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
|
478 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
|
479 $ hg qser -v |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
480 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
|
481 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
|
482 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
|
483 $ 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
|
484 popping guarded patches |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
485 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
|
486 popping c.patch |
8caf7a757afa
mq: fix corner cases for handling of patch 0 in qselect
Mads Kiilerich <mads@kiilerich.com>
parents:
15245
diff
changeset
|
487 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
|
488 reapplying unguarded patches |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
489 applying d.patch |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
490 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
|
491 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
|
492 $ hg qser -v |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
493 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
|
494 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
|
495 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
|
496 $ 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
|
497 popping guarded patches |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
498 popping d.patch |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
499 popping new.patch |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
500 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
|
501 reapplying unguarded patches |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
502 applying c.patch |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
503 applying d.patch |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
504 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
|
505 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
|
506 $ hg qser -v |
aa2c35057f47
tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents:
14464
diff
changeset
|
507 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
|
508 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
|
509 2 A d.patch |