Show More
@@ -1,620 +1,620 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | checkundo() |
|
3 | checkundo() | |
4 | { |
|
4 | { | |
5 | if [ -f .hg/store/undo ]; then |
|
5 | if [ -f .hg/store/undo ]; then | |
6 | echo ".hg/store/undo still exists after $1" |
|
6 | echo ".hg/store/undo still exists after $1" | |
7 | fi |
|
7 | fi | |
8 | } |
|
8 | } | |
9 |
|
9 | |||
10 | echo "[extensions]" >> $HGRCPATH |
|
10 | echo "[extensions]" >> $HGRCPATH | |
11 | echo "mq=" >> $HGRCPATH |
|
11 | echo "mq=" >> $HGRCPATH | |
12 |
|
12 | |||
13 | echo "[mq]" >> $HGRCPATH |
|
13 | echo "[mq]" >> $HGRCPATH | |
14 | echo "plain=true" >> $HGRCPATH |
|
14 | echo "plain=true" >> $HGRCPATH | |
15 |
|
15 | |||
16 | echo % help |
|
16 | echo % help | |
17 | hg help mq |
|
17 | hg help mq | |
18 |
|
18 | |||
19 | hg init a |
|
19 | hg init a | |
20 | cd a |
|
20 | cd a | |
21 | echo a > a |
|
21 | echo a > a | |
22 | hg ci -Ama |
|
22 | hg ci -Ama | |
23 |
|
23 | |||
24 | hg clone . ../k |
|
24 | hg clone . ../k | |
25 |
|
25 | |||
26 | mkdir b |
|
26 | mkdir b | |
27 | echo z > b/z |
|
27 | echo z > b/z | |
28 | hg ci -Ama |
|
28 | hg ci -Ama | |
29 |
|
29 | |||
30 | echo % qinit |
|
30 | echo % qinit | |
31 |
|
31 | |||
32 | hg qinit |
|
32 | hg qinit | |
33 |
|
33 | |||
34 | cd .. |
|
34 | cd .. | |
35 | hg init b |
|
35 | hg init b | |
36 |
|
36 | |||
37 | echo % -R qinit |
|
37 | echo % -R qinit | |
38 |
|
38 | |||
39 | hg -R b qinit |
|
39 | hg -R b qinit | |
40 |
|
40 | |||
41 | hg init c |
|
41 | hg init c | |
42 |
|
42 | |||
43 | echo % qinit -c |
|
43 | echo % qinit -c | |
44 |
|
44 | |||
45 | hg --cwd c qinit -c |
|
45 | hg --cwd c qinit -c | |
46 | hg -R c/.hg/patches st |
|
46 | hg -R c/.hg/patches st | |
47 |
|
47 | |||
48 | echo '% qinit; qinit -c' |
|
48 | echo '% qinit; qinit -c' | |
49 | hg init d |
|
49 | hg init d | |
50 | cd d |
|
50 | cd d | |
51 | hg qinit |
|
51 | hg qinit | |
52 | hg qinit -c |
|
52 | hg qinit -c | |
53 | # qinit -c should create both files if they don't exist |
|
53 | # qinit -c should create both files if they don't exist | |
54 | echo ' .hgignore:' |
|
54 | echo ' .hgignore:' | |
55 | cat .hg/patches/.hgignore |
|
55 | cat .hg/patches/.hgignore | |
56 | echo ' series:' |
|
56 | echo ' series:' | |
57 | cat .hg/patches/series |
|
57 | cat .hg/patches/series | |
58 | hg qinit -c 2>&1 | sed -e 's/repository.*already/repository already/' |
|
58 | hg qinit -c 2>&1 | sed -e 's/repository.*already/repository already/' | |
59 | cd .. |
|
59 | cd .. | |
60 |
|
60 | |||
61 | echo '% qinit; <stuff>; qinit -c' |
|
61 | echo '% qinit; <stuff>; qinit -c' | |
62 | hg init e |
|
62 | hg init e | |
63 | cd e |
|
63 | cd e | |
64 | hg qnew A |
|
64 | hg qnew A | |
65 | checkundo qnew |
|
65 | checkundo qnew | |
66 | echo foo > foo |
|
66 | echo foo > foo | |
67 | hg add foo |
|
67 | hg add foo | |
68 | hg qrefresh |
|
68 | hg qrefresh | |
69 | hg qnew B |
|
69 | hg qnew B | |
70 | echo >> foo |
|
70 | echo >> foo | |
71 | hg qrefresh |
|
71 | hg qrefresh | |
72 | echo status >> .hg/patches/.hgignore |
|
72 | echo status >> .hg/patches/.hgignore | |
73 | echo bleh >> .hg/patches/.hgignore |
|
73 | echo bleh >> .hg/patches/.hgignore | |
74 | hg qinit -c |
|
74 | hg qinit -c | |
75 | hg -R .hg/patches status |
|
75 | hg -R .hg/patches status | |
76 | # qinit -c shouldn't touch these files if they already exist |
|
76 | # qinit -c shouldn't touch these files if they already exist | |
77 | echo ' .hgignore:' |
|
77 | echo ' .hgignore:' | |
78 | cat .hg/patches/.hgignore |
|
78 | cat .hg/patches/.hgignore | |
79 | echo ' series:' |
|
79 | echo ' series:' | |
80 | cat .hg/patches/series |
|
80 | cat .hg/patches/series | |
81 | cd .. |
|
81 | cd .. | |
82 |
|
82 | |||
83 | echo '% init --mq without repo' |
|
83 | echo '% init --mq without repo' | |
84 | mkdir f |
|
84 | mkdir f | |
85 | cd f |
|
85 | cd f | |
86 | hg init --mq |
|
86 | hg init --mq | |
87 | cd .. |
|
87 | cd .. | |
88 |
|
88 | |||
89 | echo '% init --mq with repo path' |
|
89 | echo '% init --mq with repo path' | |
90 | hg init g |
|
90 | hg init g | |
91 | hg init --mq g |
|
91 | hg init --mq g | |
92 | test -d g/.hg/patches/.hg && echo "ok" || echo "failed" |
|
92 | test -d g/.hg/patches/.hg && echo "ok" || echo "failed" | |
93 |
|
93 | |||
94 | echo '% init --mq with nonexistent directory' |
|
94 | echo '% init --mq with nonexistent directory' | |
95 | hg init --mq nonexistentdir |
|
95 | hg init --mq nonexistentdir | |
96 |
|
96 | |||
97 | echo '% init --mq with bundle (non "local")' |
|
97 | echo '% init --mq with bundle (non "local")' | |
98 | hg -R a bundle --all a.bundle >/dev/null |
|
98 | hg -R a bundle --all a.bundle >/dev/null | |
99 | hg init --mq a.bundle |
|
99 | hg init --mq a.bundle | |
100 |
|
100 | |||
101 | cd a |
|
101 | cd a | |
102 |
|
102 | |||
103 | hg qnew -m 'foo bar' test.patch |
|
103 | hg qnew -m 'foo bar' test.patch | |
104 |
|
104 | |||
105 | echo % qrefresh |
|
105 | echo % qrefresh | |
106 |
|
106 | |||
107 | echo a >> a |
|
107 | echo a >> a | |
108 | hg qrefresh |
|
108 | hg qrefresh | |
109 | sed -e "s/^\(diff -r \)\([a-f0-9]* \)/\1 x/" \ |
|
109 | sed -e "s/^\(diff -r \)\([a-f0-9]* \)/\1 x/" \ | |
110 | -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
110 | -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |
111 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/test.patch |
|
111 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/test.patch | |
112 |
|
112 | |||
113 | echo % empty qrefresh |
|
113 | echo % empty qrefresh | |
114 |
|
114 | |||
115 | hg qrefresh -X a |
|
115 | hg qrefresh -X a | |
116 | echo 'revision:' |
|
116 | echo 'revision:' | |
117 | hg diff -r -2 -r -1 |
|
117 | hg diff -r -2 -r -1 | |
118 | echo 'patch:' |
|
118 | echo 'patch:' | |
119 | cat .hg/patches/test.patch |
|
119 | cat .hg/patches/test.patch | |
120 | echo 'working dir diff:' |
|
120 | echo 'working dir diff:' | |
121 | hg diff --nodates -q |
|
121 | hg diff --nodates -q | |
122 | # restore things |
|
122 | # restore things | |
123 | hg qrefresh |
|
123 | hg qrefresh | |
124 | checkundo qrefresh |
|
124 | checkundo qrefresh | |
125 |
|
125 | |||
126 | echo % qpop |
|
126 | echo % qpop | |
127 |
|
127 | |||
128 | hg qpop |
|
128 | hg qpop | |
129 | checkundo qpop |
|
129 | checkundo qpop | |
130 |
|
130 | |||
131 | echo % qpush with dump of tag cache |
|
131 | echo % qpush with dump of tag cache | |
132 |
|
132 | |||
133 | # Dump the tag cache to ensure that it has exactly one head after qpush. |
|
133 | # Dump the tag cache to ensure that it has exactly one head after qpush. | |
134 | rm -f .hg/tags.cache |
|
134 | rm -f .hg/tags.cache | |
135 | hg tags > /dev/null |
|
135 | hg tags > /dev/null | |
136 | echo ".hg/tags.cache (pre qpush):" |
|
136 | echo ".hg/tags.cache (pre qpush):" | |
137 | sed 's/ [0-9a-f]*//' .hg/tags.cache |
|
137 | sed 's/ [0-9a-f]*//' .hg/tags.cache | |
138 | hg qpush |
|
138 | hg qpush | |
139 | hg tags > /dev/null |
|
139 | hg tags > /dev/null | |
140 | echo ".hg/tags.cache (post qpush):" |
|
140 | echo ".hg/tags.cache (post qpush):" | |
141 | sed 's/ [0-9a-f]*//' .hg/tags.cache |
|
141 | sed 's/ [0-9a-f]*//' .hg/tags.cache | |
142 |
|
142 | |||
143 | checkundo qpush |
|
143 | checkundo qpush | |
144 |
|
144 | |||
145 | cd .. |
|
145 | cd .. | |
146 |
|
146 | |||
147 | echo % pop/push outside repo |
|
147 | echo % pop/push outside repo | |
148 |
|
148 | |||
149 | hg -R a qpop |
|
149 | hg -R a qpop | |
150 | hg -R a qpush |
|
150 | hg -R a qpush | |
151 |
|
151 | |||
152 | cd a |
|
152 | cd a | |
153 | hg qnew test2.patch |
|
153 | hg qnew test2.patch | |
154 |
|
154 | |||
155 | echo % qrefresh in subdir |
|
155 | echo % qrefresh in subdir | |
156 |
|
156 | |||
157 | cd b |
|
157 | cd b | |
158 | echo a > a |
|
158 | echo a > a | |
159 | hg add a |
|
159 | hg add a | |
160 | hg qrefresh |
|
160 | hg qrefresh | |
161 |
|
161 | |||
162 | echo % pop/push -a in subdir |
|
162 | echo % pop/push -a in subdir | |
163 |
|
163 | |||
164 | hg qpop -a |
|
164 | hg qpop -a | |
165 | hg --traceback qpush -a |
|
165 | hg --traceback qpush -a | |
166 |
|
166 | |||
167 | # setting columns & interactive tests truncating (issue1912) |
|
167 | # setting columns & interactive tests truncating (issue1912) | |
168 | echo % qseries |
|
168 | echo % qseries | |
169 | COLUMNS=4 hg qseries --config ui.interactive=true |
|
169 | COLUMNS=4 hg qseries --config ui.interactive=true | |
170 | COLUMNS=20 hg qseries --config ui.interactive=true -vs |
|
170 | COLUMNS=20 hg qseries --config ui.interactive=true -vs | |
171 | hg qpop |
|
171 | hg qpop | |
172 | hg qseries -vs |
|
172 | hg qseries -vs | |
173 | hg sum |
|
173 | hg sum | grep mq | |
174 | hg qpush |
|
174 | hg qpush | |
175 | hg sum |
|
175 | hg sum | grep mq | |
176 |
|
176 | |||
177 | echo % qapplied |
|
177 | echo % qapplied | |
178 | hg qapplied |
|
178 | hg qapplied | |
179 |
|
179 | |||
180 | echo % qtop |
|
180 | echo % qtop | |
181 | hg qtop |
|
181 | hg qtop | |
182 |
|
182 | |||
183 | echo % prev |
|
183 | echo % prev | |
184 | hg qapp -1 |
|
184 | hg qapp -1 | |
185 |
|
185 | |||
186 | echo % next |
|
186 | echo % next | |
187 | hg qunapp -1 |
|
187 | hg qunapp -1 | |
188 |
|
188 | |||
189 | hg qpop |
|
189 | hg qpop | |
190 | echo % commit should fail |
|
190 | echo % commit should fail | |
191 | hg commit |
|
191 | hg commit | |
192 |
|
192 | |||
193 | echo % push should fail |
|
193 | echo % push should fail | |
194 | hg push ../../k |
|
194 | hg push ../../k | |
195 |
|
195 | |||
196 | echo % import should fail |
|
196 | echo % import should fail | |
197 | hg st . |
|
197 | hg st . | |
198 | echo foo >> ../a |
|
198 | echo foo >> ../a | |
199 | hg diff > ../../import.diff |
|
199 | hg diff > ../../import.diff | |
200 | hg revert --no-backup ../a |
|
200 | hg revert --no-backup ../a | |
201 | hg import ../../import.diff |
|
201 | hg import ../../import.diff | |
202 | hg st |
|
202 | hg st | |
203 | echo % import --no-commit should succeed |
|
203 | echo % import --no-commit should succeed | |
204 | hg import --no-commit ../../import.diff |
|
204 | hg import --no-commit ../../import.diff | |
205 | hg st |
|
205 | hg st | |
206 | hg revert --no-backup ../a |
|
206 | hg revert --no-backup ../a | |
207 |
|
207 | |||
208 | echo % qunapplied |
|
208 | echo % qunapplied | |
209 | hg qunapplied |
|
209 | hg qunapplied | |
210 |
|
210 | |||
211 | echo % qpush/qpop with index |
|
211 | echo % qpush/qpop with index | |
212 | hg qnew test1b.patch |
|
212 | hg qnew test1b.patch | |
213 | echo 1b > 1b |
|
213 | echo 1b > 1b | |
214 | hg add 1b |
|
214 | hg add 1b | |
215 | hg qrefresh |
|
215 | hg qrefresh | |
216 | hg qpush 2 |
|
216 | hg qpush 2 | |
217 | hg qpop 0 |
|
217 | hg qpop 0 | |
218 | hg qpush test.patch+1 |
|
218 | hg qpush test.patch+1 | |
219 | hg qpush test.patch+2 |
|
219 | hg qpush test.patch+2 | |
220 | hg qpop test2.patch-1 |
|
220 | hg qpop test2.patch-1 | |
221 | hg qpop test2.patch-2 |
|
221 | hg qpop test2.patch-2 | |
222 | hg qpush test1b.patch+1 |
|
222 | hg qpush test1b.patch+1 | |
223 |
|
223 | |||
224 | echo % qpush --move |
|
224 | echo % qpush --move | |
225 | hg qpop -a |
|
225 | hg qpop -a | |
226 | hg qpush --move test2.patch # move to front |
|
226 | hg qpush --move test2.patch # move to front | |
227 | hg qpush --move test1b.patch |
|
227 | hg qpush --move test1b.patch | |
228 | hg qpush --move test.patch # noop move |
|
228 | hg qpush --move test.patch # noop move | |
229 | hg qseries -v |
|
229 | hg qseries -v | |
230 | hg qpop -a |
|
230 | hg qpop -a | |
231 | hg qpush --move test.patch # cleaning up |
|
231 | hg qpush --move test.patch # cleaning up | |
232 | hg qpush --move test1b.patch |
|
232 | hg qpush --move test1b.patch | |
233 | hg qpush --move bogus # nonexistent patch |
|
233 | hg qpush --move bogus # nonexistent patch | |
234 | hg qpush --move test.patch # already applied |
|
234 | hg qpush --move test.patch # already applied | |
235 | hg qpush |
|
235 | hg qpush | |
236 |
|
236 | |||
237 | echo % pop, qapplied, qunapplied |
|
237 | echo % pop, qapplied, qunapplied | |
238 | hg qseries -v |
|
238 | hg qseries -v | |
239 | echo % qapplied -1 test.patch |
|
239 | echo % qapplied -1 test.patch | |
240 | hg qapplied -1 test.patch |
|
240 | hg qapplied -1 test.patch | |
241 | echo % qapplied -1 test1b.patch |
|
241 | echo % qapplied -1 test1b.patch | |
242 | hg qapplied -1 test1b.patch |
|
242 | hg qapplied -1 test1b.patch | |
243 | echo % qapplied -1 test2.patch |
|
243 | echo % qapplied -1 test2.patch | |
244 | hg qapplied -1 test2.patch |
|
244 | hg qapplied -1 test2.patch | |
245 | echo % qapplied -1 |
|
245 | echo % qapplied -1 | |
246 | hg qapplied -1 |
|
246 | hg qapplied -1 | |
247 | echo % qapplied |
|
247 | echo % qapplied | |
248 | hg qapplied |
|
248 | hg qapplied | |
249 | echo % qapplied test1b.patch |
|
249 | echo % qapplied test1b.patch | |
250 | hg qapplied test1b.patch |
|
250 | hg qapplied test1b.patch | |
251 | echo % qunapplied -1 |
|
251 | echo % qunapplied -1 | |
252 | hg qunapplied -1 |
|
252 | hg qunapplied -1 | |
253 | echo % qunapplied |
|
253 | echo % qunapplied | |
254 | hg qunapplied |
|
254 | hg qunapplied | |
255 | echo % popping |
|
255 | echo % popping | |
256 | hg qpop |
|
256 | hg qpop | |
257 | echo % qunapplied -1 |
|
257 | echo % qunapplied -1 | |
258 | hg qunapplied -1 |
|
258 | hg qunapplied -1 | |
259 | echo % qunapplied |
|
259 | echo % qunapplied | |
260 | hg qunapplied |
|
260 | hg qunapplied | |
261 | echo % qunapplied test2.patch |
|
261 | echo % qunapplied test2.patch | |
262 | hg qunapplied test2.patch |
|
262 | hg qunapplied test2.patch | |
263 | echo % qunapplied -1 test2.patch |
|
263 | echo % qunapplied -1 test2.patch | |
264 | hg qunapplied -1 test2.patch |
|
264 | hg qunapplied -1 test2.patch | |
265 | echo % popping -a |
|
265 | echo % popping -a | |
266 | hg qpop -a |
|
266 | hg qpop -a | |
267 | echo % qapplied |
|
267 | echo % qapplied | |
268 | hg qapplied |
|
268 | hg qapplied | |
269 | echo % qapplied -1 |
|
269 | echo % qapplied -1 | |
270 | hg qapplied -1 |
|
270 | hg qapplied -1 | |
271 | hg qpush |
|
271 | hg qpush | |
272 |
|
272 | |||
273 | echo % push should succeed |
|
273 | echo % push should succeed | |
274 | hg qpop -a |
|
274 | hg qpop -a | |
275 | hg push ../../k |
|
275 | hg push ../../k | |
276 |
|
276 | |||
277 | echo % qpush/qpop error codes |
|
277 | echo % qpush/qpop error codes | |
278 | errorcode() |
|
278 | errorcode() | |
279 | { |
|
279 | { | |
280 | hg "$@" && echo " $@ succeeds" || echo " $@ fails" |
|
280 | hg "$@" && echo " $@ succeeds" || echo " $@ fails" | |
281 | } |
|
281 | } | |
282 |
|
282 | |||
283 | # we want to start with some patches applied |
|
283 | # we want to start with some patches applied | |
284 | hg qpush -a |
|
284 | hg qpush -a | |
285 | echo " % pops all patches and succeeds" |
|
285 | echo " % pops all patches and succeeds" | |
286 | errorcode qpop -a |
|
286 | errorcode qpop -a | |
287 | echo " % does nothing and succeeds" |
|
287 | echo " % does nothing and succeeds" | |
288 | errorcode qpop -a |
|
288 | errorcode qpop -a | |
289 | echo " % fails - nothing else to pop" |
|
289 | echo " % fails - nothing else to pop" | |
290 | errorcode qpop |
|
290 | errorcode qpop | |
291 | echo " % pushes a patch and succeeds" |
|
291 | echo " % pushes a patch and succeeds" | |
292 | errorcode qpush |
|
292 | errorcode qpush | |
293 | echo " % pops a patch and succeeds" |
|
293 | echo " % pops a patch and succeeds" | |
294 | errorcode qpop |
|
294 | errorcode qpop | |
295 | echo " % pushes up to test1b.patch and succeeds" |
|
295 | echo " % pushes up to test1b.patch and succeeds" | |
296 | errorcode qpush test1b.patch |
|
296 | errorcode qpush test1b.patch | |
297 | echo " % does nothing and succeeds" |
|
297 | echo " % does nothing and succeeds" | |
298 | errorcode qpush test1b.patch |
|
298 | errorcode qpush test1b.patch | |
299 | echo " % does nothing and succeeds" |
|
299 | echo " % does nothing and succeeds" | |
300 | errorcode qpop test1b.patch |
|
300 | errorcode qpop test1b.patch | |
301 | echo " % fails - can't push to this patch" |
|
301 | echo " % fails - can't push to this patch" | |
302 | errorcode qpush test.patch |
|
302 | errorcode qpush test.patch | |
303 | echo " % fails - can't pop to this patch" |
|
303 | echo " % fails - can't pop to this patch" | |
304 | errorcode qpop test2.patch |
|
304 | errorcode qpop test2.patch | |
305 | echo " % pops up to test.patch and succeeds" |
|
305 | echo " % pops up to test.patch and succeeds" | |
306 | errorcode qpop test.patch |
|
306 | errorcode qpop test.patch | |
307 | echo " % pushes all patches and succeeds" |
|
307 | echo " % pushes all patches and succeeds" | |
308 | errorcode qpush -a |
|
308 | errorcode qpush -a | |
309 | echo " % does nothing and succeeds" |
|
309 | echo " % does nothing and succeeds" | |
310 | errorcode qpush -a |
|
310 | errorcode qpush -a | |
311 | echo " % fails - nothing else to push" |
|
311 | echo " % fails - nothing else to push" | |
312 | errorcode qpush |
|
312 | errorcode qpush | |
313 | echo " % does nothing and succeeds" |
|
313 | echo " % does nothing and succeeds" | |
314 | errorcode qpush test2.patch |
|
314 | errorcode qpush test2.patch | |
315 |
|
315 | |||
316 |
|
316 | |||
317 | echo % strip |
|
317 | echo % strip | |
318 | cd ../../b |
|
318 | cd ../../b | |
319 | echo x>x |
|
319 | echo x>x | |
320 | hg ci -Ama |
|
320 | hg ci -Ama | |
321 | hg strip tip 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
321 | hg strip tip 2>&1 | sed 's/\(saving bundle to \).*/\1/' | |
322 | hg unbundle .hg/strip-backup/* |
|
322 | hg unbundle .hg/strip-backup/* | |
323 |
|
323 | |||
324 | echo % strip with local changes, should complain |
|
324 | echo % strip with local changes, should complain | |
325 | hg up |
|
325 | hg up | |
326 | echo y>y |
|
326 | echo y>y | |
327 | hg add y |
|
327 | hg add y | |
328 | hg strip tip | sed 's/\(saving bundle to \).*/\1/' |
|
328 | hg strip tip | sed 's/\(saving bundle to \).*/\1/' | |
329 | echo % --force strip with local changes |
|
329 | echo % --force strip with local changes | |
330 | hg strip -f tip 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
330 | hg strip -f tip 2>&1 | sed 's/\(saving bundle to \).*/\1/' | |
331 |
|
331 | |||
332 | echo '% cd b; hg qrefresh' |
|
332 | echo '% cd b; hg qrefresh' | |
333 | hg init refresh |
|
333 | hg init refresh | |
334 | cd refresh |
|
334 | cd refresh | |
335 | echo a > a |
|
335 | echo a > a | |
336 | hg ci -Ama |
|
336 | hg ci -Ama | |
337 | hg qnew -mfoo foo |
|
337 | hg qnew -mfoo foo | |
338 | echo a >> a |
|
338 | echo a >> a | |
339 | hg qrefresh |
|
339 | hg qrefresh | |
340 | mkdir b |
|
340 | mkdir b | |
341 | cd b |
|
341 | cd b | |
342 | echo f > f |
|
342 | echo f > f | |
343 | hg add f |
|
343 | hg add f | |
344 | hg qrefresh |
|
344 | hg qrefresh | |
345 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
345 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |
346 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo |
|
346 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo | |
347 | echo % hg qrefresh . |
|
347 | echo % hg qrefresh . | |
348 | hg qrefresh . |
|
348 | hg qrefresh . | |
349 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
349 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |
350 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo |
|
350 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo | |
351 | hg status |
|
351 | hg status | |
352 |
|
352 | |||
353 | echo % qpush failure |
|
353 | echo % qpush failure | |
354 | cd .. |
|
354 | cd .. | |
355 | hg qrefresh |
|
355 | hg qrefresh | |
356 | hg qnew -mbar bar |
|
356 | hg qnew -mbar bar | |
357 | echo foo > foo |
|
357 | echo foo > foo | |
358 | echo bar > bar |
|
358 | echo bar > bar | |
359 | hg add foo bar |
|
359 | hg add foo bar | |
360 | hg qrefresh |
|
360 | hg qrefresh | |
361 | hg qpop -a |
|
361 | hg qpop -a | |
362 | echo bar > foo |
|
362 | echo bar > foo | |
363 | hg qpush -a |
|
363 | hg qpush -a | |
364 | hg st |
|
364 | hg st | |
365 |
|
365 | |||
366 | echo % mq tags |
|
366 | echo % mq tags | |
367 | hg log --template '{rev} {tags}\n' -r qparent:qtip |
|
367 | hg log --template '{rev} {tags}\n' -r qparent:qtip | |
368 |
|
368 | |||
369 | echo % bad node in status |
|
369 | echo % bad node in status | |
370 | hg qpop |
|
370 | hg qpop | |
371 | hg strip -qn tip |
|
371 | hg strip -qn tip | |
372 | hg tip 2>&1 | sed -e 's/unknown node .*/unknown node/' |
|
372 | hg tip 2>&1 | sed -e 's/unknown node .*/unknown node/' | |
373 | hg branches 2>&1 | sed -e 's/unknown node .*/unknown node/' |
|
373 | hg branches 2>&1 | sed -e 's/unknown node .*/unknown node/' | |
374 | hg qpop 2>&1 | sed -e 's/unknown node .*/unknown node/' |
|
374 | hg qpop 2>&1 | sed -e 's/unknown node .*/unknown node/' | |
375 |
|
375 | |||
376 | cat >>$HGRCPATH <<EOF |
|
376 | cat >>$HGRCPATH <<EOF | |
377 | [diff] |
|
377 | [diff] | |
378 | git = True |
|
378 | git = True | |
379 | EOF |
|
379 | EOF | |
380 | cd .. |
|
380 | cd .. | |
381 | hg init git |
|
381 | hg init git | |
382 | cd git |
|
382 | cd git | |
383 | hg qinit |
|
383 | hg qinit | |
384 |
|
384 | |||
385 | hg qnew -m'new file' new |
|
385 | hg qnew -m'new file' new | |
386 | echo foo > new |
|
386 | echo foo > new | |
387 | chmod +x new |
|
387 | chmod +x new | |
388 | hg add new |
|
388 | hg add new | |
389 | hg qrefresh |
|
389 | hg qrefresh | |
390 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
390 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |
391 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/new |
|
391 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/new | |
392 |
|
392 | |||
393 | hg qnew -m'copy file' copy |
|
393 | hg qnew -m'copy file' copy | |
394 | hg cp new copy |
|
394 | hg cp new copy | |
395 | hg qrefresh |
|
395 | hg qrefresh | |
396 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
396 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |
397 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/copy |
|
397 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/copy | |
398 |
|
398 | |||
399 | hg qpop |
|
399 | hg qpop | |
400 | hg qpush |
|
400 | hg qpush | |
401 | hg qdiff |
|
401 | hg qdiff | |
402 | cat >>$HGRCPATH <<EOF |
|
402 | cat >>$HGRCPATH <<EOF | |
403 | [diff] |
|
403 | [diff] | |
404 | git = False |
|
404 | git = False | |
405 | EOF |
|
405 | EOF | |
406 | hg qdiff --git |
|
406 | hg qdiff --git | |
407 | cd .. |
|
407 | cd .. | |
408 |
|
408 | |||
409 | echo % test file addition in slow path |
|
409 | echo % test file addition in slow path | |
410 | hg init slow |
|
410 | hg init slow | |
411 | cd slow |
|
411 | cd slow | |
412 | hg qinit |
|
412 | hg qinit | |
413 | echo foo > foo |
|
413 | echo foo > foo | |
414 | hg add foo |
|
414 | hg add foo | |
415 | hg ci -m 'add foo' |
|
415 | hg ci -m 'add foo' | |
416 | hg qnew bar |
|
416 | hg qnew bar | |
417 | echo bar > bar |
|
417 | echo bar > bar | |
418 | hg add bar |
|
418 | hg add bar | |
419 | hg mv foo baz |
|
419 | hg mv foo baz | |
420 | hg qrefresh --git |
|
420 | hg qrefresh --git | |
421 | hg up -C 0 |
|
421 | hg up -C 0 | |
422 | echo >> foo |
|
422 | echo >> foo | |
423 | hg ci -m 'change foo' |
|
423 | hg ci -m 'change foo' | |
424 | hg up -C 1 |
|
424 | hg up -C 1 | |
425 | hg qrefresh --git 2>&1 | grep -v 'saving bundle' |
|
425 | hg qrefresh --git 2>&1 | grep -v 'saving bundle' | |
426 | cat .hg/patches/bar |
|
426 | cat .hg/patches/bar | |
427 | hg log -v --template '{rev} {file_copies}\n' -r . |
|
427 | hg log -v --template '{rev} {file_copies}\n' -r . | |
428 | hg qrefresh --git |
|
428 | hg qrefresh --git | |
429 | cat .hg/patches/bar |
|
429 | cat .hg/patches/bar | |
430 | hg log -v --template '{rev} {file_copies}\n' -r . |
|
430 | hg log -v --template '{rev} {file_copies}\n' -r . | |
431 | hg qrefresh |
|
431 | hg qrefresh | |
432 | grep 'diff --git' .hg/patches/bar |
|
432 | grep 'diff --git' .hg/patches/bar | |
433 |
|
433 | |||
434 | echo % test file move chains in the slow path |
|
434 | echo % test file move chains in the slow path | |
435 | hg up -C 1 |
|
435 | hg up -C 1 | |
436 | echo >> foo |
|
436 | echo >> foo | |
437 | hg ci -m 'change foo again' |
|
437 | hg ci -m 'change foo again' | |
438 | hg up -C 2 |
|
438 | hg up -C 2 | |
439 | hg mv bar quux |
|
439 | hg mv bar quux | |
440 | hg mv baz bleh |
|
440 | hg mv baz bleh | |
441 | hg qrefresh --git 2>&1 | grep -v 'saving bundle' |
|
441 | hg qrefresh --git 2>&1 | grep -v 'saving bundle' | |
442 | cat .hg/patches/bar |
|
442 | cat .hg/patches/bar | |
443 | hg log -v --template '{rev} {file_copies}\n' -r . |
|
443 | hg log -v --template '{rev} {file_copies}\n' -r . | |
444 | hg mv quux fred |
|
444 | hg mv quux fred | |
445 | hg mv bleh barney |
|
445 | hg mv bleh barney | |
446 | hg qrefresh --git |
|
446 | hg qrefresh --git | |
447 | cat .hg/patches/bar |
|
447 | cat .hg/patches/bar | |
448 | hg log -v --template '{rev} {file_copies}\n' -r . |
|
448 | hg log -v --template '{rev} {file_copies}\n' -r . | |
449 |
|
449 | |||
450 | echo % refresh omitting an added file |
|
450 | echo % refresh omitting an added file | |
451 | hg qnew baz |
|
451 | hg qnew baz | |
452 | echo newfile > newfile |
|
452 | echo newfile > newfile | |
453 | hg add newfile |
|
453 | hg add newfile | |
454 | hg qrefresh |
|
454 | hg qrefresh | |
455 | hg st -A newfile |
|
455 | hg st -A newfile | |
456 | hg qrefresh -X newfile |
|
456 | hg qrefresh -X newfile | |
457 | hg st -A newfile |
|
457 | hg st -A newfile | |
458 | hg revert newfile |
|
458 | hg revert newfile | |
459 | rm newfile |
|
459 | rm newfile | |
460 | hg qpop |
|
460 | hg qpop | |
461 | hg qdel baz |
|
461 | hg qdel baz | |
462 |
|
462 | |||
463 | echo % create a git patch |
|
463 | echo % create a git patch | |
464 | echo a > alexander |
|
464 | echo a > alexander | |
465 | hg add alexander |
|
465 | hg add alexander | |
466 | hg qnew -f --git addalexander |
|
466 | hg qnew -f --git addalexander | |
467 | grep diff .hg/patches/addalexander |
|
467 | grep diff .hg/patches/addalexander | |
468 |
|
468 | |||
469 | echo % create a git binary patch |
|
469 | echo % create a git binary patch | |
470 | cat > writebin.py <<EOF |
|
470 | cat > writebin.py <<EOF | |
471 | import sys |
|
471 | import sys | |
472 | path = sys.argv[1] |
|
472 | path = sys.argv[1] | |
473 | open(path, 'wb').write('BIN\x00ARY') |
|
473 | open(path, 'wb').write('BIN\x00ARY') | |
474 | EOF |
|
474 | EOF | |
475 | python writebin.py bucephalus |
|
475 | python writebin.py bucephalus | |
476 |
|
476 | |||
477 | python "$TESTDIR/md5sum.py" bucephalus |
|
477 | python "$TESTDIR/md5sum.py" bucephalus | |
478 | hg add bucephalus |
|
478 | hg add bucephalus | |
479 | hg qnew -f --git addbucephalus |
|
479 | hg qnew -f --git addbucephalus | |
480 | grep diff .hg/patches/addbucephalus |
|
480 | grep diff .hg/patches/addbucephalus | |
481 |
|
481 | |||
482 | echo % check binary patches can be popped and pushed |
|
482 | echo % check binary patches can be popped and pushed | |
483 | hg qpop |
|
483 | hg qpop | |
484 | test -f bucephalus && echo % bucephalus should not be there |
|
484 | test -f bucephalus && echo % bucephalus should not be there | |
485 | hg qpush |
|
485 | hg qpush | |
486 | test -f bucephalus || echo % bucephalus should be there |
|
486 | test -f bucephalus || echo % bucephalus should be there | |
487 | python "$TESTDIR/md5sum.py" bucephalus |
|
487 | python "$TESTDIR/md5sum.py" bucephalus | |
488 |
|
488 | |||
489 |
|
489 | |||
490 | echo '% strip again' |
|
490 | echo '% strip again' | |
491 | cd .. |
|
491 | cd .. | |
492 | hg init strip |
|
492 | hg init strip | |
493 | cd strip |
|
493 | cd strip | |
494 | touch foo |
|
494 | touch foo | |
495 | hg add foo |
|
495 | hg add foo | |
496 | hg ci -m 'add foo' |
|
496 | hg ci -m 'add foo' | |
497 | echo >> foo |
|
497 | echo >> foo | |
498 | hg ci -m 'change foo 1' |
|
498 | hg ci -m 'change foo 1' | |
499 | hg up -C 0 |
|
499 | hg up -C 0 | |
500 | echo 1 >> foo |
|
500 | echo 1 >> foo | |
501 | hg ci -m 'change foo 2' |
|
501 | hg ci -m 'change foo 2' | |
502 | HGMERGE=true hg merge |
|
502 | HGMERGE=true hg merge | |
503 | hg ci -m merge |
|
503 | hg ci -m merge | |
504 | hg log |
|
504 | hg log | |
505 | hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
505 | hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/' | |
506 | checkundo strip |
|
506 | checkundo strip | |
507 | hg log |
|
507 | hg log | |
508 | cd .. |
|
508 | cd .. | |
509 |
|
509 | |||
510 | echo '% qclone' |
|
510 | echo '% qclone' | |
511 | qlog() |
|
511 | qlog() | |
512 | { |
|
512 | { | |
513 | echo 'main repo:' |
|
513 | echo 'main repo:' | |
514 | hg log --template ' rev {rev}: {desc}\n' |
|
514 | hg log --template ' rev {rev}: {desc}\n' | |
515 | echo 'patch repo:' |
|
515 | echo 'patch repo:' | |
516 | hg -R .hg/patches log --template ' rev {rev}: {desc}\n' |
|
516 | hg -R .hg/patches log --template ' rev {rev}: {desc}\n' | |
517 | } |
|
517 | } | |
518 | hg init qclonesource |
|
518 | hg init qclonesource | |
519 | cd qclonesource |
|
519 | cd qclonesource | |
520 | echo foo > foo |
|
520 | echo foo > foo | |
521 | hg add foo |
|
521 | hg add foo | |
522 | hg ci -m 'add foo' |
|
522 | hg ci -m 'add foo' | |
523 | hg qinit |
|
523 | hg qinit | |
524 | hg qnew patch1 |
|
524 | hg qnew patch1 | |
525 | echo bar >> foo |
|
525 | echo bar >> foo | |
526 | hg qrefresh -m 'change foo' |
|
526 | hg qrefresh -m 'change foo' | |
527 | cd .. |
|
527 | cd .. | |
528 |
|
528 | |||
529 | # repo with unversioned patch dir |
|
529 | # repo with unversioned patch dir | |
530 | hg qclone qclonesource failure |
|
530 | hg qclone qclonesource failure | |
531 |
|
531 | |||
532 | cd qclonesource |
|
532 | cd qclonesource | |
533 | hg qinit -c |
|
533 | hg qinit -c | |
534 | hg qci -m checkpoint |
|
534 | hg qci -m checkpoint | |
535 | qlog |
|
535 | qlog | |
536 | cd .. |
|
536 | cd .. | |
537 |
|
537 | |||
538 | # repo with patches applied |
|
538 | # repo with patches applied | |
539 | hg qclone qclonesource qclonedest |
|
539 | hg qclone qclonesource qclonedest | |
540 | cd qclonedest |
|
540 | cd qclonedest | |
541 | qlog |
|
541 | qlog | |
542 | cd .. |
|
542 | cd .. | |
543 |
|
543 | |||
544 | # repo with patches unapplied |
|
544 | # repo with patches unapplied | |
545 | cd qclonesource |
|
545 | cd qclonesource | |
546 | hg qpop -a |
|
546 | hg qpop -a | |
547 | qlog |
|
547 | qlog | |
548 | cd .. |
|
548 | cd .. | |
549 | hg qclone qclonesource qclonedest2 |
|
549 | hg qclone qclonesource qclonedest2 | |
550 | cd qclonedest2 |
|
550 | cd qclonedest2 | |
551 | qlog |
|
551 | qlog | |
552 | cd .. |
|
552 | cd .. | |
553 |
|
553 | |||
554 | echo % 'test applying on an empty file (issue 1033)' |
|
554 | echo % 'test applying on an empty file (issue 1033)' | |
555 | hg init empty |
|
555 | hg init empty | |
556 | cd empty |
|
556 | cd empty | |
557 | touch a |
|
557 | touch a | |
558 | hg ci -Am addempty |
|
558 | hg ci -Am addempty | |
559 | echo a > a |
|
559 | echo a > a | |
560 | hg qnew -f -e changea |
|
560 | hg qnew -f -e changea | |
561 | hg qpop |
|
561 | hg qpop | |
562 | hg qpush |
|
562 | hg qpush | |
563 | cd .. |
|
563 | cd .. | |
564 |
|
564 | |||
565 | echo % test qpush with --force, issue1087 |
|
565 | echo % test qpush with --force, issue1087 | |
566 | hg init forcepush |
|
566 | hg init forcepush | |
567 | cd forcepush |
|
567 | cd forcepush | |
568 | echo hello > hello.txt |
|
568 | echo hello > hello.txt | |
569 | echo bye > bye.txt |
|
569 | echo bye > bye.txt | |
570 | hg ci -Ama |
|
570 | hg ci -Ama | |
571 | hg qnew -d '0 0' empty |
|
571 | hg qnew -d '0 0' empty | |
572 | hg qpop |
|
572 | hg qpop | |
573 | echo world >> hello.txt |
|
573 | echo world >> hello.txt | |
574 |
|
574 | |||
575 | echo % qpush should fail, local changes |
|
575 | echo % qpush should fail, local changes | |
576 | hg qpush |
|
576 | hg qpush | |
577 |
|
577 | |||
578 | echo % apply force, should not discard changes with empty patch |
|
578 | echo % apply force, should not discard changes with empty patch | |
579 | hg qpush -f 2>&1 | sed 's,^.*/patch,patch,g' |
|
579 | hg qpush -f 2>&1 | sed 's,^.*/patch,patch,g' | |
580 | hg diff --config diff.nodates=True |
|
580 | hg diff --config diff.nodates=True | |
581 | hg qdiff --config diff.nodates=True |
|
581 | hg qdiff --config diff.nodates=True | |
582 | hg log -l1 -p |
|
582 | hg log -l1 -p | |
583 | hg qref -d '0 0' |
|
583 | hg qref -d '0 0' | |
584 | hg qpop |
|
584 | hg qpop | |
585 | echo universe >> hello.txt |
|
585 | echo universe >> hello.txt | |
586 | echo universe >> bye.txt |
|
586 | echo universe >> bye.txt | |
587 |
|
587 | |||
588 | echo % qpush should fail, local changes |
|
588 | echo % qpush should fail, local changes | |
589 | hg qpush |
|
589 | hg qpush | |
590 |
|
590 | |||
591 | echo % apply force, should discard changes in hello, but not bye |
|
591 | echo % apply force, should discard changes in hello, but not bye | |
592 | hg qpush -f |
|
592 | hg qpush -f | |
593 | hg st |
|
593 | hg st | |
594 | hg diff --config diff.nodates=True |
|
594 | hg diff --config diff.nodates=True | |
595 | hg qdiff --config diff.nodates=True |
|
595 | hg qdiff --config diff.nodates=True | |
596 |
|
596 | |||
597 | echo % test popping revisions not in working dir ancestry |
|
597 | echo % test popping revisions not in working dir ancestry | |
598 | hg qseries -v |
|
598 | hg qseries -v | |
599 | hg up qparent |
|
599 | hg up qparent | |
600 | hg qpop |
|
600 | hg qpop | |
601 |
|
601 | |||
602 | cd .. |
|
602 | cd .. | |
603 | hg init deletion-order |
|
603 | hg init deletion-order | |
604 | cd deletion-order |
|
604 | cd deletion-order | |
605 |
|
605 | |||
606 | touch a |
|
606 | touch a | |
607 | hg ci -Aqm0 |
|
607 | hg ci -Aqm0 | |
608 |
|
608 | |||
609 | hg qnew rename-dir |
|
609 | hg qnew rename-dir | |
610 | hg rm a |
|
610 | hg rm a | |
611 | hg qrefresh |
|
611 | hg qrefresh | |
612 |
|
612 | |||
613 | mkdir a b |
|
613 | mkdir a b | |
614 | touch a/a b/b |
|
614 | touch a/a b/b | |
615 | hg add -q a b |
|
615 | hg add -q a b | |
616 | hg qrefresh |
|
616 | hg qrefresh | |
617 |
|
617 | |||
618 | echo % test popping must remove files added in subdirectories first |
|
618 | echo % test popping must remove files added in subdirectories first | |
619 | hg qpop |
|
619 | hg qpop | |
620 | cd .. |
|
620 | cd .. |
@@ -1,661 +1,651 b'' | |||||
1 | % help |
|
1 | % help | |
2 | mq extension - manage a stack of patches |
|
2 | mq extension - manage a stack of patches | |
3 |
|
3 | |||
4 | This extension lets you work with a stack of patches in a Mercurial |
|
4 | This extension lets you work with a stack of patches in a Mercurial | |
5 | repository. It manages two stacks of patches - all known patches, and applied |
|
5 | repository. It manages two stacks of patches - all known patches, and applied | |
6 | patches (subset of known patches). |
|
6 | patches (subset of known patches). | |
7 |
|
7 | |||
8 | Known patches are represented as patch files in the .hg/patches directory. |
|
8 | Known patches are represented as patch files in the .hg/patches directory. | |
9 | Applied patches are both patch files and changesets. |
|
9 | Applied patches are both patch files and changesets. | |
10 |
|
10 | |||
11 | Common tasks (use "hg help command" for more details): |
|
11 | Common tasks (use "hg help command" for more details): | |
12 |
|
12 | |||
13 | create new patch qnew |
|
13 | create new patch qnew | |
14 | import existing patch qimport |
|
14 | import existing patch qimport | |
15 |
|
15 | |||
16 | print patch series qseries |
|
16 | print patch series qseries | |
17 | print applied patches qapplied |
|
17 | print applied patches qapplied | |
18 |
|
18 | |||
19 | add known patch to applied stack qpush |
|
19 | add known patch to applied stack qpush | |
20 | remove patch from applied stack qpop |
|
20 | remove patch from applied stack qpop | |
21 | refresh contents of top applied patch qrefresh |
|
21 | refresh contents of top applied patch qrefresh | |
22 |
|
22 | |||
23 | By default, mq will automatically use git patches when required to avoid |
|
23 | By default, mq will automatically use git patches when required to avoid | |
24 | losing file mode changes, copy records, binary files or empty files creations |
|
24 | losing file mode changes, copy records, binary files or empty files creations | |
25 | or deletions. This behaviour can be configured with: |
|
25 | or deletions. This behaviour can be configured with: | |
26 |
|
26 | |||
27 | [mq] |
|
27 | [mq] | |
28 | git = auto/keep/yes/no |
|
28 | git = auto/keep/yes/no | |
29 |
|
29 | |||
30 | If set to 'keep', mq will obey the [diff] section configuration while |
|
30 | If set to 'keep', mq will obey the [diff] section configuration while | |
31 | preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq |
|
31 | preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq | |
32 | will override the [diff] section and always generate git or regular patches, |
|
32 | will override the [diff] section and always generate git or regular patches, | |
33 | possibly losing data in the second case. |
|
33 | possibly losing data in the second case. | |
34 |
|
34 | |||
35 | list of commands: |
|
35 | list of commands: | |
36 |
|
36 | |||
37 | qapplied print the patches already applied |
|
37 | qapplied print the patches already applied | |
38 | qclone clone main and patch repository at same time |
|
38 | qclone clone main and patch repository at same time | |
39 | qdelete remove patches from queue |
|
39 | qdelete remove patches from queue | |
40 | qdiff diff of the current patch and subsequent modifications |
|
40 | qdiff diff of the current patch and subsequent modifications | |
41 | qfinish move applied patches into repository history |
|
41 | qfinish move applied patches into repository history | |
42 | qfold fold the named patches into the current patch |
|
42 | qfold fold the named patches into the current patch | |
43 | qgoto push or pop patches until named patch is at top of stack |
|
43 | qgoto push or pop patches until named patch is at top of stack | |
44 | qguard set or print guards for a patch |
|
44 | qguard set or print guards for a patch | |
45 | qheader print the header of the topmost or specified patch |
|
45 | qheader print the header of the topmost or specified patch | |
46 | qimport import a patch |
|
46 | qimport import a patch | |
47 | qnew create a new patch |
|
47 | qnew create a new patch | |
48 | qnext print the name of the next patch |
|
48 | qnext print the name of the next patch | |
49 | qpop pop the current patch off the stack |
|
49 | qpop pop the current patch off the stack | |
50 | qprev print the name of the previous patch |
|
50 | qprev print the name of the previous patch | |
51 | qpush push the next patch onto the stack |
|
51 | qpush push the next patch onto the stack | |
52 | qrefresh update the current patch |
|
52 | qrefresh update the current patch | |
53 | qrename rename a patch |
|
53 | qrename rename a patch | |
54 | qselect set or print guarded patches to push |
|
54 | qselect set or print guarded patches to push | |
55 | qseries print the entire series file |
|
55 | qseries print the entire series file | |
56 | qtop print the name of the current patch |
|
56 | qtop print the name of the current patch | |
57 | qunapplied print the patches not yet applied |
|
57 | qunapplied print the patches not yet applied | |
58 | strip strip a changeset and all its descendants from the repository |
|
58 | strip strip a changeset and all its descendants from the repository | |
59 |
|
59 | |||
60 | use "hg -v help mq" to show aliases and global options |
|
60 | use "hg -v help mq" to show aliases and global options | |
61 | adding a |
|
61 | adding a | |
62 | updating to branch default |
|
62 | updating to branch default | |
63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
64 | adding b/z |
|
64 | adding b/z | |
65 | % qinit |
|
65 | % qinit | |
66 | % -R qinit |
|
66 | % -R qinit | |
67 | % qinit -c |
|
67 | % qinit -c | |
68 | A .hgignore |
|
68 | A .hgignore | |
69 | A series |
|
69 | A series | |
70 | % qinit; qinit -c |
|
70 | % qinit; qinit -c | |
71 | .hgignore: |
|
71 | .hgignore: | |
72 | ^\.hg |
|
72 | ^\.hg | |
73 | ^\.mq |
|
73 | ^\.mq | |
74 | syntax: glob |
|
74 | syntax: glob | |
75 | status |
|
75 | status | |
76 | guards |
|
76 | guards | |
77 | series: |
|
77 | series: | |
78 | abort: repository already exists! |
|
78 | abort: repository already exists! | |
79 | % qinit; <stuff>; qinit -c |
|
79 | % qinit; <stuff>; qinit -c | |
80 | adding .hg/patches/A |
|
80 | adding .hg/patches/A | |
81 | adding .hg/patches/B |
|
81 | adding .hg/patches/B | |
82 | A .hgignore |
|
82 | A .hgignore | |
83 | A A |
|
83 | A A | |
84 | A B |
|
84 | A B | |
85 | A series |
|
85 | A series | |
86 | .hgignore: |
|
86 | .hgignore: | |
87 | status |
|
87 | status | |
88 | bleh |
|
88 | bleh | |
89 | series: |
|
89 | series: | |
90 | A |
|
90 | A | |
91 | B |
|
91 | B | |
92 | % init --mq without repo |
|
92 | % init --mq without repo | |
93 | abort: There is no Mercurial repository here (.hg not found) |
|
93 | abort: There is no Mercurial repository here (.hg not found) | |
94 | % init --mq with repo path |
|
94 | % init --mq with repo path | |
95 | ok |
|
95 | ok | |
96 | % init --mq with nonexistent directory |
|
96 | % init --mq with nonexistent directory | |
97 | abort: repository nonexistentdir not found! |
|
97 | abort: repository nonexistentdir not found! | |
98 | % init --mq with bundle (non "local") |
|
98 | % init --mq with bundle (non "local") | |
99 | abort: only a local queue repository may be initialized |
|
99 | abort: only a local queue repository may be initialized | |
100 | % qrefresh |
|
100 | % qrefresh | |
101 | foo bar |
|
101 | foo bar | |
102 |
|
102 | |||
103 | diff -r xa |
|
103 | diff -r xa | |
104 | --- a/a |
|
104 | --- a/a | |
105 | +++ b/a |
|
105 | +++ b/a | |
106 | @@ -1,1 +1,2 @@ |
|
106 | @@ -1,1 +1,2 @@ | |
107 | a |
|
107 | a | |
108 | +a |
|
108 | +a | |
109 | % empty qrefresh |
|
109 | % empty qrefresh | |
110 | revision: |
|
110 | revision: | |
111 | patch: |
|
111 | patch: | |
112 | foo bar |
|
112 | foo bar | |
113 |
|
113 | |||
114 | working dir diff: |
|
114 | working dir diff: | |
115 | --- a/a |
|
115 | --- a/a | |
116 | +++ b/a |
|
116 | +++ b/a | |
117 | @@ -1,1 +1,2 @@ |
|
117 | @@ -1,1 +1,2 @@ | |
118 | a |
|
118 | a | |
119 | +a |
|
119 | +a | |
120 | % qpop |
|
120 | % qpop | |
121 | popping test.patch |
|
121 | popping test.patch | |
122 | patch queue now empty |
|
122 | patch queue now empty | |
123 | % qpush with dump of tag cache |
|
123 | % qpush with dump of tag cache | |
124 | .hg/tags.cache (pre qpush): |
|
124 | .hg/tags.cache (pre qpush): | |
125 | 1 |
|
125 | 1 | |
126 |
|
126 | |||
127 | applying test.patch |
|
127 | applying test.patch | |
128 | now at: test.patch |
|
128 | now at: test.patch | |
129 | .hg/tags.cache (post qpush): |
|
129 | .hg/tags.cache (post qpush): | |
130 | 2 |
|
130 | 2 | |
131 |
|
131 | |||
132 | % pop/push outside repo |
|
132 | % pop/push outside repo | |
133 | popping test.patch |
|
133 | popping test.patch | |
134 | patch queue now empty |
|
134 | patch queue now empty | |
135 | applying test.patch |
|
135 | applying test.patch | |
136 | now at: test.patch |
|
136 | now at: test.patch | |
137 | % qrefresh in subdir |
|
137 | % qrefresh in subdir | |
138 | % pop/push -a in subdir |
|
138 | % pop/push -a in subdir | |
139 | popping test2.patch |
|
139 | popping test2.patch | |
140 | popping test.patch |
|
140 | popping test.patch | |
141 | patch queue now empty |
|
141 | patch queue now empty | |
142 | applying test.patch |
|
142 | applying test.patch | |
143 | applying test2.patch |
|
143 | applying test2.patch | |
144 | now at: test2.patch |
|
144 | now at: test2.patch | |
145 | % qseries |
|
145 | % qseries | |
146 | test.patch |
|
146 | test.patch | |
147 | test2.patch |
|
147 | test2.patch | |
148 | 0 A test.patch: f... |
|
148 | 0 A test.patch: f... | |
149 | 1 A test2.patch: |
|
149 | 1 A test2.patch: | |
150 | popping test2.patch |
|
150 | popping test2.patch | |
151 | now at: test.patch |
|
151 | now at: test.patch | |
152 | 0 A test.patch: foo bar |
|
152 | 0 A test.patch: foo bar | |
153 | 1 U test2.patch: |
|
153 | 1 U test2.patch: | |
154 | parent: 2:1d611e5a7244 qbase qtip test.patch tip |
|
|||
155 | foo bar |
|
|||
156 | branch: default |
|
|||
157 | commit: (clean) |
|
|||
158 | update: (current) |
|
|||
159 | mq: 1 applied, 1 unapplied |
|
154 | mq: 1 applied, 1 unapplied | |
160 | applying test2.patch |
|
155 | applying test2.patch | |
161 | now at: test2.patch |
|
156 | now at: test2.patch | |
162 | parent: 3:333b5cb98635 qtip test2.patch tip |
|
|||
163 | imported patch test2.patch |
|
|||
164 | branch: default |
|
|||
165 | commit: (clean) |
|
|||
166 | update: (current) |
|
|||
167 | mq: 2 applied |
|
157 | mq: 2 applied | |
168 | % qapplied |
|
158 | % qapplied | |
169 | test.patch |
|
159 | test.patch | |
170 | test2.patch |
|
160 | test2.patch | |
171 | % qtop |
|
161 | % qtop | |
172 | test2.patch |
|
162 | test2.patch | |
173 | % prev |
|
163 | % prev | |
174 | test.patch |
|
164 | test.patch | |
175 | % next |
|
165 | % next | |
176 | all patches applied |
|
166 | all patches applied | |
177 | popping test2.patch |
|
167 | popping test2.patch | |
178 | now at: test.patch |
|
168 | now at: test.patch | |
179 | % commit should fail |
|
169 | % commit should fail | |
180 | abort: cannot commit over an applied mq patch |
|
170 | abort: cannot commit over an applied mq patch | |
181 | % push should fail |
|
171 | % push should fail | |
182 | pushing to ../../k |
|
172 | pushing to ../../k | |
183 | abort: source has mq patches applied |
|
173 | abort: source has mq patches applied | |
184 | % import should fail |
|
174 | % import should fail | |
185 | abort: cannot import over an applied patch |
|
175 | abort: cannot import over an applied patch | |
186 | % import --no-commit should succeed |
|
176 | % import --no-commit should succeed | |
187 | applying ../../import.diff |
|
177 | applying ../../import.diff | |
188 | M a |
|
178 | M a | |
189 | % qunapplied |
|
179 | % qunapplied | |
190 | test2.patch |
|
180 | test2.patch | |
191 | % qpush/qpop with index |
|
181 | % qpush/qpop with index | |
192 | applying test2.patch |
|
182 | applying test2.patch | |
193 | now at: test2.patch |
|
183 | now at: test2.patch | |
194 | popping test2.patch |
|
184 | popping test2.patch | |
195 | popping test1b.patch |
|
185 | popping test1b.patch | |
196 | now at: test.patch |
|
186 | now at: test.patch | |
197 | applying test1b.patch |
|
187 | applying test1b.patch | |
198 | now at: test1b.patch |
|
188 | now at: test1b.patch | |
199 | applying test2.patch |
|
189 | applying test2.patch | |
200 | now at: test2.patch |
|
190 | now at: test2.patch | |
201 | popping test2.patch |
|
191 | popping test2.patch | |
202 | now at: test1b.patch |
|
192 | now at: test1b.patch | |
203 | popping test1b.patch |
|
193 | popping test1b.patch | |
204 | now at: test.patch |
|
194 | now at: test.patch | |
205 | applying test1b.patch |
|
195 | applying test1b.patch | |
206 | applying test2.patch |
|
196 | applying test2.patch | |
207 | now at: test2.patch |
|
197 | now at: test2.patch | |
208 | % qpush --move |
|
198 | % qpush --move | |
209 | popping test2.patch |
|
199 | popping test2.patch | |
210 | popping test1b.patch |
|
200 | popping test1b.patch | |
211 | popping test.patch |
|
201 | popping test.patch | |
212 | patch queue now empty |
|
202 | patch queue now empty | |
213 | applying test2.patch |
|
203 | applying test2.patch | |
214 | now at: test2.patch |
|
204 | now at: test2.patch | |
215 | applying test1b.patch |
|
205 | applying test1b.patch | |
216 | now at: test1b.patch |
|
206 | now at: test1b.patch | |
217 | applying test.patch |
|
207 | applying test.patch | |
218 | now at: test.patch |
|
208 | now at: test.patch | |
219 | 0 A test2.patch |
|
209 | 0 A test2.patch | |
220 | 1 A test1b.patch |
|
210 | 1 A test1b.patch | |
221 | 2 A test.patch |
|
211 | 2 A test.patch | |
222 | popping test.patch |
|
212 | popping test.patch | |
223 | popping test1b.patch |
|
213 | popping test1b.patch | |
224 | popping test2.patch |
|
214 | popping test2.patch | |
225 | patch queue now empty |
|
215 | patch queue now empty | |
226 | applying test.patch |
|
216 | applying test.patch | |
227 | now at: test.patch |
|
217 | now at: test.patch | |
228 | applying test1b.patch |
|
218 | applying test1b.patch | |
229 | now at: test1b.patch |
|
219 | now at: test1b.patch | |
230 | abort: patch bogus not in series |
|
220 | abort: patch bogus not in series | |
231 | abort: cannot push to a previous patch: test.patch |
|
221 | abort: cannot push to a previous patch: test.patch | |
232 | applying test2.patch |
|
222 | applying test2.patch | |
233 | now at: test2.patch |
|
223 | now at: test2.patch | |
234 | % pop, qapplied, qunapplied |
|
224 | % pop, qapplied, qunapplied | |
235 | 0 A test.patch |
|
225 | 0 A test.patch | |
236 | 1 A test1b.patch |
|
226 | 1 A test1b.patch | |
237 | 2 A test2.patch |
|
227 | 2 A test2.patch | |
238 | % qapplied -1 test.patch |
|
228 | % qapplied -1 test.patch | |
239 | only one patch applied |
|
229 | only one patch applied | |
240 | % qapplied -1 test1b.patch |
|
230 | % qapplied -1 test1b.patch | |
241 | test.patch |
|
231 | test.patch | |
242 | % qapplied -1 test2.patch |
|
232 | % qapplied -1 test2.patch | |
243 | test1b.patch |
|
233 | test1b.patch | |
244 | % qapplied -1 |
|
234 | % qapplied -1 | |
245 | test1b.patch |
|
235 | test1b.patch | |
246 | % qapplied |
|
236 | % qapplied | |
247 | test.patch |
|
237 | test.patch | |
248 | test1b.patch |
|
238 | test1b.patch | |
249 | test2.patch |
|
239 | test2.patch | |
250 | % qapplied test1b.patch |
|
240 | % qapplied test1b.patch | |
251 | test.patch |
|
241 | test.patch | |
252 | test1b.patch |
|
242 | test1b.patch | |
253 | % qunapplied -1 |
|
243 | % qunapplied -1 | |
254 | all patches applied |
|
244 | all patches applied | |
255 | % qunapplied |
|
245 | % qunapplied | |
256 | % popping |
|
246 | % popping | |
257 | popping test2.patch |
|
247 | popping test2.patch | |
258 | now at: test1b.patch |
|
248 | now at: test1b.patch | |
259 | % qunapplied -1 |
|
249 | % qunapplied -1 | |
260 | test2.patch |
|
250 | test2.patch | |
261 | % qunapplied |
|
251 | % qunapplied | |
262 | test2.patch |
|
252 | test2.patch | |
263 | % qunapplied test2.patch |
|
253 | % qunapplied test2.patch | |
264 | % qunapplied -1 test2.patch |
|
254 | % qunapplied -1 test2.patch | |
265 | all patches applied |
|
255 | all patches applied | |
266 | % popping -a |
|
256 | % popping -a | |
267 | popping test1b.patch |
|
257 | popping test1b.patch | |
268 | popping test.patch |
|
258 | popping test.patch | |
269 | patch queue now empty |
|
259 | patch queue now empty | |
270 | % qapplied |
|
260 | % qapplied | |
271 | % qapplied -1 |
|
261 | % qapplied -1 | |
272 | no patches applied |
|
262 | no patches applied | |
273 | applying test.patch |
|
263 | applying test.patch | |
274 | now at: test.patch |
|
264 | now at: test.patch | |
275 | % push should succeed |
|
265 | % push should succeed | |
276 | popping test.patch |
|
266 | popping test.patch | |
277 | patch queue now empty |
|
267 | patch queue now empty | |
278 | pushing to ../../k |
|
268 | pushing to ../../k | |
279 | searching for changes |
|
269 | searching for changes | |
280 | adding changesets |
|
270 | adding changesets | |
281 | adding manifests |
|
271 | adding manifests | |
282 | adding file changes |
|
272 | adding file changes | |
283 | added 1 changesets with 1 changes to 1 files |
|
273 | added 1 changesets with 1 changes to 1 files | |
284 | % qpush/qpop error codes |
|
274 | % qpush/qpop error codes | |
285 | applying test.patch |
|
275 | applying test.patch | |
286 | applying test1b.patch |
|
276 | applying test1b.patch | |
287 | applying test2.patch |
|
277 | applying test2.patch | |
288 | now at: test2.patch |
|
278 | now at: test2.patch | |
289 | % pops all patches and succeeds |
|
279 | % pops all patches and succeeds | |
290 | popping test2.patch |
|
280 | popping test2.patch | |
291 | popping test1b.patch |
|
281 | popping test1b.patch | |
292 | popping test.patch |
|
282 | popping test.patch | |
293 | patch queue now empty |
|
283 | patch queue now empty | |
294 | qpop -a succeeds |
|
284 | qpop -a succeeds | |
295 | % does nothing and succeeds |
|
285 | % does nothing and succeeds | |
296 | no patches applied |
|
286 | no patches applied | |
297 | qpop -a succeeds |
|
287 | qpop -a succeeds | |
298 | % fails - nothing else to pop |
|
288 | % fails - nothing else to pop | |
299 | no patches applied |
|
289 | no patches applied | |
300 | qpop fails |
|
290 | qpop fails | |
301 | % pushes a patch and succeeds |
|
291 | % pushes a patch and succeeds | |
302 | applying test.patch |
|
292 | applying test.patch | |
303 | now at: test.patch |
|
293 | now at: test.patch | |
304 | qpush succeeds |
|
294 | qpush succeeds | |
305 | % pops a patch and succeeds |
|
295 | % pops a patch and succeeds | |
306 | popping test.patch |
|
296 | popping test.patch | |
307 | patch queue now empty |
|
297 | patch queue now empty | |
308 | qpop succeeds |
|
298 | qpop succeeds | |
309 | % pushes up to test1b.patch and succeeds |
|
299 | % pushes up to test1b.patch and succeeds | |
310 | applying test.patch |
|
300 | applying test.patch | |
311 | applying test1b.patch |
|
301 | applying test1b.patch | |
312 | now at: test1b.patch |
|
302 | now at: test1b.patch | |
313 | qpush test1b.patch succeeds |
|
303 | qpush test1b.patch succeeds | |
314 | % does nothing and succeeds |
|
304 | % does nothing and succeeds | |
315 | qpush: test1b.patch is already at the top |
|
305 | qpush: test1b.patch is already at the top | |
316 | qpush test1b.patch succeeds |
|
306 | qpush test1b.patch succeeds | |
317 | % does nothing and succeeds |
|
307 | % does nothing and succeeds | |
318 | qpop: test1b.patch is already at the top |
|
308 | qpop: test1b.patch is already at the top | |
319 | qpop test1b.patch succeeds |
|
309 | qpop test1b.patch succeeds | |
320 | % fails - can't push to this patch |
|
310 | % fails - can't push to this patch | |
321 | abort: cannot push to a previous patch: test.patch |
|
311 | abort: cannot push to a previous patch: test.patch | |
322 | qpush test.patch fails |
|
312 | qpush test.patch fails | |
323 | % fails - can't pop to this patch |
|
313 | % fails - can't pop to this patch | |
324 | abort: patch test2.patch is not applied |
|
314 | abort: patch test2.patch is not applied | |
325 | qpop test2.patch fails |
|
315 | qpop test2.patch fails | |
326 | % pops up to test.patch and succeeds |
|
316 | % pops up to test.patch and succeeds | |
327 | popping test1b.patch |
|
317 | popping test1b.patch | |
328 | now at: test.patch |
|
318 | now at: test.patch | |
329 | qpop test.patch succeeds |
|
319 | qpop test.patch succeeds | |
330 | % pushes all patches and succeeds |
|
320 | % pushes all patches and succeeds | |
331 | applying test1b.patch |
|
321 | applying test1b.patch | |
332 | applying test2.patch |
|
322 | applying test2.patch | |
333 | now at: test2.patch |
|
323 | now at: test2.patch | |
334 | qpush -a succeeds |
|
324 | qpush -a succeeds | |
335 | % does nothing and succeeds |
|
325 | % does nothing and succeeds | |
336 | all patches are currently applied |
|
326 | all patches are currently applied | |
337 | qpush -a succeeds |
|
327 | qpush -a succeeds | |
338 | % fails - nothing else to push |
|
328 | % fails - nothing else to push | |
339 | patch series already fully applied |
|
329 | patch series already fully applied | |
340 | qpush fails |
|
330 | qpush fails | |
341 | % does nothing and succeeds |
|
331 | % does nothing and succeeds | |
342 | qpush: test2.patch is already at the top |
|
332 | qpush: test2.patch is already at the top | |
343 | qpush test2.patch succeeds |
|
333 | qpush test2.patch succeeds | |
344 | % strip |
|
334 | % strip | |
345 | adding x |
|
335 | adding x | |
346 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
336 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
347 | saving bundle to |
|
337 | saving bundle to | |
348 | adding changesets |
|
338 | adding changesets | |
349 | adding manifests |
|
339 | adding manifests | |
350 | adding file changes |
|
340 | adding file changes | |
351 | added 1 changesets with 1 changes to 1 files |
|
341 | added 1 changesets with 1 changes to 1 files | |
352 | (run 'hg update' to get a working copy) |
|
342 | (run 'hg update' to get a working copy) | |
353 | % strip with local changes, should complain |
|
343 | % strip with local changes, should complain | |
354 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
344 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
355 | abort: local changes found |
|
345 | abort: local changes found | |
356 | % --force strip with local changes |
|
346 | % --force strip with local changes | |
357 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
347 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
358 | saving bundle to |
|
348 | saving bundle to | |
359 | % cd b; hg qrefresh |
|
349 | % cd b; hg qrefresh | |
360 | adding a |
|
350 | adding a | |
361 | foo |
|
351 | foo | |
362 |
|
352 | |||
363 | diff -r cb9a9f314b8b a |
|
353 | diff -r cb9a9f314b8b a | |
364 | --- a/a |
|
354 | --- a/a | |
365 | +++ b/a |
|
355 | +++ b/a | |
366 | @@ -1,1 +1,2 @@ |
|
356 | @@ -1,1 +1,2 @@ | |
367 | a |
|
357 | a | |
368 | +a |
|
358 | +a | |
369 | diff -r cb9a9f314b8b b/f |
|
359 | diff -r cb9a9f314b8b b/f | |
370 | --- /dev/null |
|
360 | --- /dev/null | |
371 | +++ b/b/f |
|
361 | +++ b/b/f | |
372 | @@ -0,0 +1,1 @@ |
|
362 | @@ -0,0 +1,1 @@ | |
373 | +f |
|
363 | +f | |
374 | % hg qrefresh . |
|
364 | % hg qrefresh . | |
375 | foo |
|
365 | foo | |
376 |
|
366 | |||
377 | diff -r cb9a9f314b8b b/f |
|
367 | diff -r cb9a9f314b8b b/f | |
378 | --- /dev/null |
|
368 | --- /dev/null | |
379 | +++ b/b/f |
|
369 | +++ b/b/f | |
380 | @@ -0,0 +1,1 @@ |
|
370 | @@ -0,0 +1,1 @@ | |
381 | +f |
|
371 | +f | |
382 | M a |
|
372 | M a | |
383 | % qpush failure |
|
373 | % qpush failure | |
384 | popping bar |
|
374 | popping bar | |
385 | popping foo |
|
375 | popping foo | |
386 | patch queue now empty |
|
376 | patch queue now empty | |
387 | applying foo |
|
377 | applying foo | |
388 | applying bar |
|
378 | applying bar | |
389 | file foo already exists |
|
379 | file foo already exists | |
390 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
380 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej | |
391 | patch failed, unable to continue (try -v) |
|
381 | patch failed, unable to continue (try -v) | |
392 | patch failed, rejects left in working dir |
|
382 | patch failed, rejects left in working dir | |
393 | errors during apply, please fix and refresh bar |
|
383 | errors during apply, please fix and refresh bar | |
394 | ? foo |
|
384 | ? foo | |
395 | ? foo.rej |
|
385 | ? foo.rej | |
396 | % mq tags |
|
386 | % mq tags | |
397 | 0 qparent |
|
387 | 0 qparent | |
398 | 1 foo qbase |
|
388 | 1 foo qbase | |
399 | 2 bar qtip tip |
|
389 | 2 bar qtip tip | |
400 | % bad node in status |
|
390 | % bad node in status | |
401 | popping bar |
|
391 | popping bar | |
402 | now at: foo |
|
392 | now at: foo | |
403 | changeset: 0:cb9a9f314b8b |
|
393 | changeset: 0:cb9a9f314b8b | |
404 | mq status file refers to unknown node |
|
394 | mq status file refers to unknown node | |
405 | tag: tip |
|
395 | tag: tip | |
406 | user: test |
|
396 | user: test | |
407 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
397 | date: Thu Jan 01 00:00:00 1970 +0000 | |
408 | summary: a |
|
398 | summary: a | |
409 |
|
399 | |||
410 | mq status file refers to unknown node |
|
400 | mq status file refers to unknown node | |
411 | default 0:cb9a9f314b8b |
|
401 | default 0:cb9a9f314b8b | |
412 | abort: trying to pop unknown node |
|
402 | abort: trying to pop unknown node | |
413 | new file |
|
403 | new file | |
414 |
|
404 | |||
415 | diff --git a/new b/new |
|
405 | diff --git a/new b/new | |
416 | new file mode 100755 |
|
406 | new file mode 100755 | |
417 | --- /dev/null |
|
407 | --- /dev/null | |
418 | +++ b/new |
|
408 | +++ b/new | |
419 | @@ -0,0 +1,1 @@ |
|
409 | @@ -0,0 +1,1 @@ | |
420 | +foo |
|
410 | +foo | |
421 | copy file |
|
411 | copy file | |
422 |
|
412 | |||
423 | diff --git a/new b/copy |
|
413 | diff --git a/new b/copy | |
424 | copy from new |
|
414 | copy from new | |
425 | copy to copy |
|
415 | copy to copy | |
426 | popping copy |
|
416 | popping copy | |
427 | now at: new |
|
417 | now at: new | |
428 | applying copy |
|
418 | applying copy | |
429 | now at: copy |
|
419 | now at: copy | |
430 | diff --git a/new b/copy |
|
420 | diff --git a/new b/copy | |
431 | copy from new |
|
421 | copy from new | |
432 | copy to copy |
|
422 | copy to copy | |
433 | diff --git a/new b/copy |
|
423 | diff --git a/new b/copy | |
434 | copy from new |
|
424 | copy from new | |
435 | copy to copy |
|
425 | copy to copy | |
436 | % test file addition in slow path |
|
426 | % test file addition in slow path | |
437 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
427 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
438 | created new head |
|
428 | created new head | |
439 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
429 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
440 | adding branch |
|
430 | adding branch | |
441 | adding changesets |
|
431 | adding changesets | |
442 | adding manifests |
|
432 | adding manifests | |
443 | adding file changes |
|
433 | adding file changes | |
444 | added 1 changesets with 1 changes to 1 files |
|
434 | added 1 changesets with 1 changes to 1 files | |
445 | diff --git a/bar b/bar |
|
435 | diff --git a/bar b/bar | |
446 | new file mode 100644 |
|
436 | new file mode 100644 | |
447 | --- /dev/null |
|
437 | --- /dev/null | |
448 | +++ b/bar |
|
438 | +++ b/bar | |
449 | @@ -0,0 +1,1 @@ |
|
439 | @@ -0,0 +1,1 @@ | |
450 | +bar |
|
440 | +bar | |
451 | diff --git a/foo b/baz |
|
441 | diff --git a/foo b/baz | |
452 | rename from foo |
|
442 | rename from foo | |
453 | rename to baz |
|
443 | rename to baz | |
454 | 2 baz (foo) |
|
444 | 2 baz (foo) | |
455 | diff --git a/bar b/bar |
|
445 | diff --git a/bar b/bar | |
456 | new file mode 100644 |
|
446 | new file mode 100644 | |
457 | --- /dev/null |
|
447 | --- /dev/null | |
458 | +++ b/bar |
|
448 | +++ b/bar | |
459 | @@ -0,0 +1,1 @@ |
|
449 | @@ -0,0 +1,1 @@ | |
460 | +bar |
|
450 | +bar | |
461 | diff --git a/foo b/baz |
|
451 | diff --git a/foo b/baz | |
462 | rename from foo |
|
452 | rename from foo | |
463 | rename to baz |
|
453 | rename to baz | |
464 | 2 baz (foo) |
|
454 | 2 baz (foo) | |
465 | diff --git a/bar b/bar |
|
455 | diff --git a/bar b/bar | |
466 | diff --git a/foo b/baz |
|
456 | diff --git a/foo b/baz | |
467 | % test file move chains in the slow path |
|
457 | % test file move chains in the slow path | |
468 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
458 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
469 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
459 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
470 | adding branch |
|
460 | adding branch | |
471 | adding changesets |
|
461 | adding changesets | |
472 | adding manifests |
|
462 | adding manifests | |
473 | adding file changes |
|
463 | adding file changes | |
474 | added 1 changesets with 1 changes to 1 files |
|
464 | added 1 changesets with 1 changes to 1 files | |
475 | diff --git a/foo b/bleh |
|
465 | diff --git a/foo b/bleh | |
476 | rename from foo |
|
466 | rename from foo | |
477 | rename to bleh |
|
467 | rename to bleh | |
478 | diff --git a/quux b/quux |
|
468 | diff --git a/quux b/quux | |
479 | new file mode 100644 |
|
469 | new file mode 100644 | |
480 | --- /dev/null |
|
470 | --- /dev/null | |
481 | +++ b/quux |
|
471 | +++ b/quux | |
482 | @@ -0,0 +1,1 @@ |
|
472 | @@ -0,0 +1,1 @@ | |
483 | +bar |
|
473 | +bar | |
484 | 3 bleh (foo) |
|
474 | 3 bleh (foo) | |
485 | diff --git a/foo b/barney |
|
475 | diff --git a/foo b/barney | |
486 | rename from foo |
|
476 | rename from foo | |
487 | rename to barney |
|
477 | rename to barney | |
488 | diff --git a/fred b/fred |
|
478 | diff --git a/fred b/fred | |
489 | new file mode 100644 |
|
479 | new file mode 100644 | |
490 | --- /dev/null |
|
480 | --- /dev/null | |
491 | +++ b/fred |
|
481 | +++ b/fred | |
492 | @@ -0,0 +1,1 @@ |
|
482 | @@ -0,0 +1,1 @@ | |
493 | +bar |
|
483 | +bar | |
494 | 3 barney (foo) |
|
484 | 3 barney (foo) | |
495 | % refresh omitting an added file |
|
485 | % refresh omitting an added file | |
496 | C newfile |
|
486 | C newfile | |
497 | A newfile |
|
487 | A newfile | |
498 | popping baz |
|
488 | popping baz | |
499 | now at: bar |
|
489 | now at: bar | |
500 | % create a git patch |
|
490 | % create a git patch | |
501 | diff --git a/alexander b/alexander |
|
491 | diff --git a/alexander b/alexander | |
502 | % create a git binary patch |
|
492 | % create a git binary patch | |
503 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
493 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | |
504 | diff --git a/bucephalus b/bucephalus |
|
494 | diff --git a/bucephalus b/bucephalus | |
505 | % check binary patches can be popped and pushed |
|
495 | % check binary patches can be popped and pushed | |
506 | popping addbucephalus |
|
496 | popping addbucephalus | |
507 | now at: addalexander |
|
497 | now at: addalexander | |
508 | applying addbucephalus |
|
498 | applying addbucephalus | |
509 | now at: addbucephalus |
|
499 | now at: addbucephalus | |
510 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
500 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | |
511 | % strip again |
|
501 | % strip again | |
512 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
502 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
513 | created new head |
|
503 | created new head | |
514 | merging foo |
|
504 | merging foo | |
515 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
505 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
516 | (branch merge, don't forget to commit) |
|
506 | (branch merge, don't forget to commit) | |
517 | changeset: 3:99615015637b |
|
507 | changeset: 3:99615015637b | |
518 | tag: tip |
|
508 | tag: tip | |
519 | parent: 2:20cbbe65cff7 |
|
509 | parent: 2:20cbbe65cff7 | |
520 | parent: 1:d2871fc282d4 |
|
510 | parent: 1:d2871fc282d4 | |
521 | user: test |
|
511 | user: test | |
522 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
512 | date: Thu Jan 01 00:00:00 1970 +0000 | |
523 | summary: merge |
|
513 | summary: merge | |
524 |
|
514 | |||
525 | changeset: 2:20cbbe65cff7 |
|
515 | changeset: 2:20cbbe65cff7 | |
526 | parent: 0:53245c60e682 |
|
516 | parent: 0:53245c60e682 | |
527 | user: test |
|
517 | user: test | |
528 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
518 | date: Thu Jan 01 00:00:00 1970 +0000 | |
529 | summary: change foo 2 |
|
519 | summary: change foo 2 | |
530 |
|
520 | |||
531 | changeset: 1:d2871fc282d4 |
|
521 | changeset: 1:d2871fc282d4 | |
532 | user: test |
|
522 | user: test | |
533 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
523 | date: Thu Jan 01 00:00:00 1970 +0000 | |
534 | summary: change foo 1 |
|
524 | summary: change foo 1 | |
535 |
|
525 | |||
536 | changeset: 0:53245c60e682 |
|
526 | changeset: 0:53245c60e682 | |
537 | user: test |
|
527 | user: test | |
538 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
528 | date: Thu Jan 01 00:00:00 1970 +0000 | |
539 | summary: add foo |
|
529 | summary: add foo | |
540 |
|
530 | |||
541 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
531 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
542 | saving bundle to |
|
532 | saving bundle to | |
543 | saving bundle to |
|
533 | saving bundle to | |
544 | adding branch |
|
534 | adding branch | |
545 | adding changesets |
|
535 | adding changesets | |
546 | adding manifests |
|
536 | adding manifests | |
547 | adding file changes |
|
537 | adding file changes | |
548 | added 1 changesets with 1 changes to 1 files |
|
538 | added 1 changesets with 1 changes to 1 files | |
549 | changeset: 1:20cbbe65cff7 |
|
539 | changeset: 1:20cbbe65cff7 | |
550 | tag: tip |
|
540 | tag: tip | |
551 | user: test |
|
541 | user: test | |
552 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
542 | date: Thu Jan 01 00:00:00 1970 +0000 | |
553 | summary: change foo 2 |
|
543 | summary: change foo 2 | |
554 |
|
544 | |||
555 | changeset: 0:53245c60e682 |
|
545 | changeset: 0:53245c60e682 | |
556 | user: test |
|
546 | user: test | |
557 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
547 | date: Thu Jan 01 00:00:00 1970 +0000 | |
558 | summary: add foo |
|
548 | summary: add foo | |
559 |
|
549 | |||
560 | % qclone |
|
550 | % qclone | |
561 | abort: versioned patch repository not found (see init --mq) |
|
551 | abort: versioned patch repository not found (see init --mq) | |
562 | adding .hg/patches/patch1 |
|
552 | adding .hg/patches/patch1 | |
563 | main repo: |
|
553 | main repo: | |
564 | rev 1: change foo |
|
554 | rev 1: change foo | |
565 | rev 0: add foo |
|
555 | rev 0: add foo | |
566 | patch repo: |
|
556 | patch repo: | |
567 | rev 0: checkpoint |
|
557 | rev 0: checkpoint | |
568 | updating to branch default |
|
558 | updating to branch default | |
569 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
559 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
570 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
560 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
571 | main repo: |
|
561 | main repo: | |
572 | rev 0: add foo |
|
562 | rev 0: add foo | |
573 | patch repo: |
|
563 | patch repo: | |
574 | rev 0: checkpoint |
|
564 | rev 0: checkpoint | |
575 | popping patch1 |
|
565 | popping patch1 | |
576 | patch queue now empty |
|
566 | patch queue now empty | |
577 | main repo: |
|
567 | main repo: | |
578 | rev 0: add foo |
|
568 | rev 0: add foo | |
579 | patch repo: |
|
569 | patch repo: | |
580 | rev 0: checkpoint |
|
570 | rev 0: checkpoint | |
581 | updating to branch default |
|
571 | updating to branch default | |
582 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
572 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
583 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
573 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
584 | main repo: |
|
574 | main repo: | |
585 | rev 0: add foo |
|
575 | rev 0: add foo | |
586 | patch repo: |
|
576 | patch repo: | |
587 | rev 0: checkpoint |
|
577 | rev 0: checkpoint | |
588 | % test applying on an empty file (issue 1033) |
|
578 | % test applying on an empty file (issue 1033) | |
589 | adding a |
|
579 | adding a | |
590 | popping changea |
|
580 | popping changea | |
591 | patch queue now empty |
|
581 | patch queue now empty | |
592 | applying changea |
|
582 | applying changea | |
593 | now at: changea |
|
583 | now at: changea | |
594 | % test qpush with --force, issue1087 |
|
584 | % test qpush with --force, issue1087 | |
595 | adding bye.txt |
|
585 | adding bye.txt | |
596 | adding hello.txt |
|
586 | adding hello.txt | |
597 | popping empty |
|
587 | popping empty | |
598 | patch queue now empty |
|
588 | patch queue now empty | |
599 | % qpush should fail, local changes |
|
589 | % qpush should fail, local changes | |
600 | abort: local changes found, refresh first |
|
590 | abort: local changes found, refresh first | |
601 | % apply force, should not discard changes with empty patch |
|
591 | % apply force, should not discard changes with empty patch | |
602 | applying empty |
|
592 | applying empty | |
603 | patch empty is empty |
|
593 | patch empty is empty | |
604 | now at: empty |
|
594 | now at: empty | |
605 | diff -r bf5fc3f07a0a hello.txt |
|
595 | diff -r bf5fc3f07a0a hello.txt | |
606 | --- a/hello.txt |
|
596 | --- a/hello.txt | |
607 | +++ b/hello.txt |
|
597 | +++ b/hello.txt | |
608 | @@ -1,1 +1,2 @@ |
|
598 | @@ -1,1 +1,2 @@ | |
609 | hello |
|
599 | hello | |
610 | +world |
|
600 | +world | |
611 | diff -r 9ecee4f634e3 hello.txt |
|
601 | diff -r 9ecee4f634e3 hello.txt | |
612 | --- a/hello.txt |
|
602 | --- a/hello.txt | |
613 | +++ b/hello.txt |
|
603 | +++ b/hello.txt | |
614 | @@ -1,1 +1,2 @@ |
|
604 | @@ -1,1 +1,2 @@ | |
615 | hello |
|
605 | hello | |
616 | +world |
|
606 | +world | |
617 | changeset: 1:bf5fc3f07a0a |
|
607 | changeset: 1:bf5fc3f07a0a | |
618 | tag: empty |
|
608 | tag: empty | |
619 | tag: qbase |
|
609 | tag: qbase | |
620 | tag: qtip |
|
610 | tag: qtip | |
621 | tag: tip |
|
611 | tag: tip | |
622 | user: test |
|
612 | user: test | |
623 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
613 | date: Thu Jan 01 00:00:00 1970 +0000 | |
624 | summary: imported patch empty |
|
614 | summary: imported patch empty | |
625 |
|
615 | |||
626 |
|
616 | |||
627 | popping empty |
|
617 | popping empty | |
628 | patch queue now empty |
|
618 | patch queue now empty | |
629 | % qpush should fail, local changes |
|
619 | % qpush should fail, local changes | |
630 | abort: local changes found, refresh first |
|
620 | abort: local changes found, refresh first | |
631 | % apply force, should discard changes in hello, but not bye |
|
621 | % apply force, should discard changes in hello, but not bye | |
632 | applying empty |
|
622 | applying empty | |
633 | now at: empty |
|
623 | now at: empty | |
634 | M bye.txt |
|
624 | M bye.txt | |
635 | diff -r ba252371dbc1 bye.txt |
|
625 | diff -r ba252371dbc1 bye.txt | |
636 | --- a/bye.txt |
|
626 | --- a/bye.txt | |
637 | +++ b/bye.txt |
|
627 | +++ b/bye.txt | |
638 | @@ -1,1 +1,2 @@ |
|
628 | @@ -1,1 +1,2 @@ | |
639 | bye |
|
629 | bye | |
640 | +universe |
|
630 | +universe | |
641 | diff -r 9ecee4f634e3 bye.txt |
|
631 | diff -r 9ecee4f634e3 bye.txt | |
642 | --- a/bye.txt |
|
632 | --- a/bye.txt | |
643 | +++ b/bye.txt |
|
633 | +++ b/bye.txt | |
644 | @@ -1,1 +1,2 @@ |
|
634 | @@ -1,1 +1,2 @@ | |
645 | bye |
|
635 | bye | |
646 | +universe |
|
636 | +universe | |
647 | diff -r 9ecee4f634e3 hello.txt |
|
637 | diff -r 9ecee4f634e3 hello.txt | |
648 | --- a/hello.txt |
|
638 | --- a/hello.txt | |
649 | +++ b/hello.txt |
|
639 | +++ b/hello.txt | |
650 | @@ -1,1 +1,3 @@ |
|
640 | @@ -1,1 +1,3 @@ | |
651 | hello |
|
641 | hello | |
652 | +world |
|
642 | +world | |
653 | +universe |
|
643 | +universe | |
654 | % test popping revisions not in working dir ancestry |
|
644 | % test popping revisions not in working dir ancestry | |
655 | 0 A empty |
|
645 | 0 A empty | |
656 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
646 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
657 | popping empty |
|
647 | popping empty | |
658 | patch queue now empty |
|
648 | patch queue now empty | |
659 | % test popping must remove files added in subdirectories first |
|
649 | % test popping must remove files added in subdirectories first | |
660 | popping rename-dir |
|
650 | popping rename-dir | |
661 | patch queue now empty |
|
651 | patch queue now empty |
General Comments 0
You need to be logged in to leave comments.
Login now