Show More
@@ -1,154 +1,156 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | echo "[extensions]" >> $HGRCPATH |
|
4 | 4 | echo "mq=" >> $HGRCPATH |
|
5 | 5 | |
|
6 | 6 | hg init |
|
7 | 7 | hg qinit |
|
8 | 8 | |
|
9 | 9 | echo x > x |
|
10 | 10 | hg ci -Ama |
|
11 | 11 | |
|
12 | 12 | hg qnew a.patch |
|
13 | 13 | echo a > a |
|
14 | 14 | hg add a |
|
15 | 15 | hg qrefresh |
|
16 | 16 | |
|
17 | 17 | hg qnew b.patch |
|
18 | 18 | echo b > b |
|
19 | 19 | hg add b |
|
20 | 20 | hg qrefresh |
|
21 | 21 | |
|
22 | 22 | hg qnew c.patch |
|
23 | 23 | echo c > c |
|
24 | 24 | hg add c |
|
25 | 25 | hg qrefresh |
|
26 | 26 | |
|
27 | 27 | hg qpop -a |
|
28 | 28 | |
|
29 | 29 | echo % should fail |
|
30 | 30 | hg qguard does-not-exist.patch +bleh |
|
31 | 31 | |
|
32 | 32 | echo % should fail |
|
33 | 33 | hg qguard +fail |
|
34 | 34 | |
|
35 | 35 | hg qpush |
|
36 | 36 | echo % should guard a.patch |
|
37 | 37 | hg qguard +a |
|
38 | 38 | echo % should print +a |
|
39 | 39 | hg qguard |
|
40 | 40 | hg qpop |
|
41 | 41 | |
|
42 | 42 | hg qguard a.patch |
|
43 | 43 | echo % should push b.patch |
|
44 | 44 | hg qpush |
|
45 | 45 | |
|
46 | 46 | hg qpop |
|
47 | 47 | hg qselect a |
|
48 | 48 | echo % should push a.patch |
|
49 | 49 | hg qpush |
|
50 | 50 | |
|
51 | 51 | hg qguard c.patch -a |
|
52 | 52 | echo % should print -a |
|
53 | 53 | hg qguard c.patch |
|
54 | 54 | |
|
55 | 55 | echo % should skip c.patch |
|
56 | 56 | hg qpush -a |
|
57 | echo % should display b.patch | |
|
58 | hg qtop | |
|
57 | 59 | |
|
58 | 60 | hg qguard -n c.patch |
|
59 | 61 | echo % should push c.patch |
|
60 | 62 | hg qpush -a |
|
61 | 63 | |
|
62 | 64 | hg qpop -a |
|
63 | 65 | hg qselect -n |
|
64 | 66 | echo % should push all |
|
65 | 67 | hg qpush -a |
|
66 | 68 | |
|
67 | 69 | hg qpop -a |
|
68 | 70 | hg qguard a.patch +1 |
|
69 | 71 | hg qguard b.patch +2 |
|
70 | 72 | hg qselect 1 |
|
71 | 73 | echo % should push a.patch, not b.patch |
|
72 | 74 | hg qpush |
|
73 | 75 | hg qpush |
|
74 | 76 | hg qpop -a |
|
75 | 77 | |
|
76 | 78 | hg qselect 2 |
|
77 | 79 | echo % should push b.patch |
|
78 | 80 | hg qpush |
|
79 | 81 | hg qpush -a |
|
80 | 82 | # Used to be an issue with holes in the patch sequence |
|
81 | 83 | # So, put one hole on the base and ask for topmost patch. |
|
82 | 84 | hg qtop |
|
83 | 85 | hg qpop -a |
|
84 | 86 | |
|
85 | 87 | hg qselect 1 2 |
|
86 | 88 | echo % should push a.patch, b.patch |
|
87 | 89 | hg qpush |
|
88 | 90 | hg qpush |
|
89 | 91 | hg qpop -a |
|
90 | 92 | |
|
91 | 93 | hg qguard a.patch +1 +2 -3 |
|
92 | 94 | hg qselect 1 2 3 |
|
93 | 95 | echo % list patches and guards |
|
94 | 96 | hg qguard -l |
|
95 | 97 | echo % list series |
|
96 | 98 | hg qseries -v |
|
97 | 99 | echo % list guards |
|
98 | 100 | hg qselect |
|
99 | 101 | echo % should push b.patch |
|
100 | 102 | hg qpush |
|
101 | 103 | |
|
102 | 104 | hg qpush -a |
|
103 | 105 | hg qselect -n --reapply |
|
104 | 106 | echo % guards in series file: +1 +2 -3 |
|
105 | 107 | hg qselect -s |
|
106 | 108 | echo % should show c.patch |
|
107 | 109 | hg qapplied |
|
108 | 110 | |
|
109 | 111 | hg qrename a.patch new.patch |
|
110 | 112 | echo % should show : |
|
111 | 113 | echo % new.patch: +1 +2 -3 |
|
112 | 114 | echo % b.patch: +2 |
|
113 | 115 | echo % c.patch: unguarded |
|
114 | 116 | hg qguard -l |
|
115 | 117 | |
|
116 | 118 | hg qnew d.patch |
|
117 | 119 | hg qpop |
|
118 | 120 | echo % should show new.patch and b.patch as Guarded, c.patch as Applied |
|
119 | 121 | echo % and d.patch as Unapplied |
|
120 | 122 | hg qseries -v |
|
121 | 123 | |
|
122 | 124 | hg qguard d.patch +2 |
|
123 | 125 | echo % new.patch, b.patch: Guarded. c.patch: Applied. d.patch: Guarded. |
|
124 | 126 | hg qseries -v |
|
125 | 127 | |
|
126 | 128 | qappunappv() |
|
127 | 129 | ( |
|
128 | 130 | for command in qapplied "qapplied -v" qunapplied "qunapplied -v"; do |
|
129 | 131 | echo % hg $command |
|
130 | 132 | hg $command |
|
131 | 133 | done |
|
132 | 134 | ) |
|
133 | 135 | |
|
134 | 136 | hg qpop -a |
|
135 | 137 | hg qguard -l |
|
136 | 138 | qappunappv |
|
137 | 139 | hg qselect 1 |
|
138 | 140 | qappunappv |
|
139 | 141 | hg qpush -a |
|
140 | 142 | qappunappv |
|
141 | 143 | hg qselect 2 |
|
142 | 144 | qappunappv |
|
143 | 145 | |
|
144 | 146 | for patch in `hg qseries`; do |
|
145 | 147 | echo % hg qapplied $patch |
|
146 | 148 | hg qapplied $patch |
|
147 | 149 | echo % hg qunapplied $patch |
|
148 | 150 | hg qunapplied $patch |
|
149 | 151 | done |
|
150 | 152 | |
|
151 | 153 | echo % hg qseries -m: only b.patch should be shown |
|
152 | 154 | echo the guards file was not ignored in the past |
|
153 | 155 | hg qdelete -k b.patch |
|
154 | 156 | hg qseries -m |
@@ -1,182 +1,184 b'' | |||
|
1 | 1 | adding x |
|
2 | 2 | Patch queue now empty |
|
3 | 3 | % should fail |
|
4 | 4 | abort: no patch named does-not-exist.patch |
|
5 | 5 | % should fail |
|
6 | 6 | abort: no patches applied |
|
7 | 7 | applying a.patch |
|
8 | 8 | Now at: a.patch |
|
9 | 9 | % should guard a.patch |
|
10 | 10 | % should print +a |
|
11 | 11 | a.patch: +a |
|
12 | 12 | Patch queue now empty |
|
13 | 13 | a.patch: +a |
|
14 | 14 | % should push b.patch |
|
15 | 15 | applying b.patch |
|
16 | 16 | Now at: b.patch |
|
17 | 17 | Patch queue now empty |
|
18 | 18 | number of unguarded, unapplied patches has changed from 2 to 3 |
|
19 | 19 | % should push a.patch |
|
20 | 20 | applying a.patch |
|
21 | 21 | Now at: a.patch |
|
22 | 22 | % should print -a |
|
23 | 23 | c.patch: -a |
|
24 | 24 | % should skip c.patch |
|
25 | 25 | applying b.patch |
|
26 | 26 | skipping c.patch - guarded by '-a' |
|
27 | 27 | Now at: b.patch |
|
28 | % should display b.patch | |
|
29 | b.patch | |
|
28 | 30 | % should push c.patch |
|
29 | 31 | applying c.patch |
|
30 | 32 | Now at: c.patch |
|
31 | 33 | Patch queue now empty |
|
32 | 34 | guards deactivated |
|
33 | 35 | number of unguarded, unapplied patches has changed from 3 to 2 |
|
34 | 36 | % should push all |
|
35 | 37 | applying b.patch |
|
36 | 38 | applying c.patch |
|
37 | 39 | Now at: c.patch |
|
38 | 40 | Patch queue now empty |
|
39 | 41 | number of unguarded, unapplied patches has changed from 1 to 2 |
|
40 | 42 | % should push a.patch, not b.patch |
|
41 | 43 | applying a.patch |
|
42 | 44 | Now at: a.patch |
|
43 | 45 | applying c.patch |
|
44 | 46 | Now at: c.patch |
|
45 | 47 | Patch queue now empty |
|
46 | 48 | % should push b.patch |
|
47 | 49 | applying b.patch |
|
48 | 50 | Now at: b.patch |
|
49 | 51 | applying c.patch |
|
50 | 52 | Now at: c.patch |
|
51 | 53 | c.patch |
|
52 | 54 | Patch queue now empty |
|
53 | 55 | number of unguarded, unapplied patches has changed from 2 to 3 |
|
54 | 56 | % should push a.patch, b.patch |
|
55 | 57 | applying a.patch |
|
56 | 58 | Now at: a.patch |
|
57 | 59 | applying b.patch |
|
58 | 60 | Now at: b.patch |
|
59 | 61 | Patch queue now empty |
|
60 | 62 | number of unguarded, unapplied patches has changed from 3 to 2 |
|
61 | 63 | % list patches and guards |
|
62 | 64 | a.patch: +1 +2 -3 |
|
63 | 65 | b.patch: +2 |
|
64 | 66 | c.patch: unguarded |
|
65 | 67 | % list series |
|
66 | 68 | 0 G a.patch |
|
67 | 69 | 1 U b.patch |
|
68 | 70 | 2 U c.patch |
|
69 | 71 | % list guards |
|
70 | 72 | 1 |
|
71 | 73 | 2 |
|
72 | 74 | 3 |
|
73 | 75 | % should push b.patch |
|
74 | 76 | applying b.patch |
|
75 | 77 | Now at: b.patch |
|
76 | 78 | applying c.patch |
|
77 | 79 | Now at: c.patch |
|
78 | 80 | guards deactivated |
|
79 | 81 | popping guarded patches |
|
80 | 82 | Patch queue now empty |
|
81 | 83 | reapplying unguarded patches |
|
82 | 84 | applying c.patch |
|
83 | 85 | Now at: c.patch |
|
84 | 86 | % guards in series file: +1 +2 -3 |
|
85 | 87 | +1 |
|
86 | 88 | +2 |
|
87 | 89 | -3 |
|
88 | 90 | % should show c.patch |
|
89 | 91 | c.patch |
|
90 | 92 | % should show : |
|
91 | 93 | % new.patch: +1 +2 -3 |
|
92 | 94 | % b.patch: +2 |
|
93 | 95 | % c.patch: unguarded |
|
94 | 96 | new.patch: +1 +2 -3 |
|
95 | 97 | b.patch: +2 |
|
96 | 98 | c.patch: unguarded |
|
97 | 99 | Now at: c.patch |
|
98 | 100 | % should show new.patch and b.patch as Guarded, c.patch as Applied |
|
99 | 101 | % and d.patch as Unapplied |
|
100 | 102 | 0 G new.patch |
|
101 | 103 | 1 G b.patch |
|
102 | 104 | 2 A c.patch |
|
103 | 105 | 3 U d.patch |
|
104 | 106 | % new.patch, b.patch: Guarded. c.patch: Applied. d.patch: Guarded. |
|
105 | 107 | 0 G new.patch |
|
106 | 108 | 1 G b.patch |
|
107 | 109 | 2 A c.patch |
|
108 | 110 | 3 G d.patch |
|
109 | 111 | Patch queue now empty |
|
110 | 112 | new.patch: +1 +2 -3 |
|
111 | 113 | b.patch: +2 |
|
112 | 114 | c.patch: unguarded |
|
113 | 115 | d.patch: +2 |
|
114 | 116 | % hg qapplied |
|
115 | 117 | % hg qapplied -v |
|
116 | 118 | % hg qunapplied |
|
117 | 119 | c.patch |
|
118 | 120 | % hg qunapplied -v |
|
119 | 121 | 0 G new.patch |
|
120 | 122 | 1 G b.patch |
|
121 | 123 | 2 U c.patch |
|
122 | 124 | 3 G d.patch |
|
123 | 125 | number of unguarded, unapplied patches has changed from 1 to 2 |
|
124 | 126 | % hg qapplied |
|
125 | 127 | % hg qapplied -v |
|
126 | 128 | % hg qunapplied |
|
127 | 129 | new.patch |
|
128 | 130 | c.patch |
|
129 | 131 | % hg qunapplied -v |
|
130 | 132 | 0 U new.patch |
|
131 | 133 | 1 G b.patch |
|
132 | 134 | 2 U c.patch |
|
133 | 135 | 3 G d.patch |
|
134 | 136 | applying new.patch |
|
135 | 137 | skipping b.patch - guarded by ['+2'] |
|
136 | 138 | applying c.patch |
|
137 | 139 | skipping d.patch - guarded by ['+2'] |
|
138 | 140 | Now at: c.patch |
|
139 | 141 | % hg qapplied |
|
140 | 142 | new.patch |
|
141 | 143 | c.patch |
|
142 | 144 | % hg qapplied -v |
|
143 | 145 | 0 A new.patch |
|
144 | 146 | 1 G b.patch |
|
145 | 147 | 2 A c.patch |
|
146 | 148 | % hg qunapplied |
|
147 | 149 | % hg qunapplied -v |
|
148 | 150 | 3 G d.patch |
|
149 | 151 | number of unguarded, unapplied patches has changed from 0 to 1 |
|
150 | 152 | number of guarded, applied patches has changed from 1 to 0 |
|
151 | 153 | % hg qapplied |
|
152 | 154 | new.patch |
|
153 | 155 | c.patch |
|
154 | 156 | % hg qapplied -v |
|
155 | 157 | 0 A new.patch |
|
156 | 158 | 1 U b.patch |
|
157 | 159 | 2 A c.patch |
|
158 | 160 | % hg qunapplied |
|
159 | 161 | d.patch |
|
160 | 162 | % hg qunapplied -v |
|
161 | 163 | 3 U d.patch |
|
162 | 164 | % hg qapplied new.patch |
|
163 | 165 | new.patch |
|
164 | 166 | % hg qunapplied new.patch |
|
165 | 167 | b.patch |
|
166 | 168 | d.patch |
|
167 | 169 | % hg qapplied b.patch |
|
168 | 170 | new.patch |
|
169 | 171 | % hg qunapplied b.patch |
|
170 | 172 | d.patch |
|
171 | 173 | % hg qapplied c.patch |
|
172 | 174 | new.patch |
|
173 | 175 | c.patch |
|
174 | 176 | % hg qunapplied c.patch |
|
175 | 177 | d.patch |
|
176 | 178 | % hg qapplied d.patch |
|
177 | 179 | new.patch |
|
178 | 180 | c.patch |
|
179 | 181 | % hg qunapplied d.patch |
|
180 | 182 | % hg qseries -m: only b.patch should be shown |
|
181 | 183 | the guards file was not ignored in the past |
|
182 | 184 | b.patch |
General Comments 0
You need to be logged in to leave comments.
Login now