Show More
@@ -1,339 +1,379 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | echo "[extensions]" >> $HGRCPATH |
|
4 | 4 | echo "mq=" >> $HGRCPATH |
|
5 | 5 | |
|
6 | 6 | echo % help |
|
7 | 7 | hg help mq |
|
8 | 8 | |
|
9 | 9 | hg init a |
|
10 | 10 | cd a |
|
11 | 11 | echo a > a |
|
12 | 12 | hg ci -Ama |
|
13 | 13 | |
|
14 | 14 | hg clone . ../k |
|
15 | 15 | |
|
16 | 16 | mkdir b |
|
17 | 17 | echo z > b/z |
|
18 | 18 | hg ci -Ama |
|
19 | 19 | |
|
20 | 20 | echo % qinit |
|
21 | 21 | |
|
22 | 22 | hg qinit |
|
23 | 23 | |
|
24 | 24 | cd .. |
|
25 | 25 | hg init b |
|
26 | 26 | |
|
27 | 27 | echo % -R qinit |
|
28 | 28 | |
|
29 | 29 | hg -R b qinit |
|
30 | 30 | |
|
31 | 31 | hg init c |
|
32 | 32 | |
|
33 | 33 | echo % qinit -c |
|
34 | 34 | |
|
35 | 35 | hg --cwd c qinit -c |
|
36 | 36 | hg -R c/.hg/patches st |
|
37 | 37 | |
|
38 | 38 | echo % qnew implies add |
|
39 | 39 | |
|
40 | 40 | hg -R c qnew test.patch |
|
41 | 41 | hg -R c/.hg/patches st |
|
42 | 42 | |
|
43 | 43 | echo '% qinit; qinit -c' |
|
44 | 44 | hg init d |
|
45 | 45 | cd d |
|
46 | 46 | hg qinit |
|
47 | 47 | hg qinit -c |
|
48 | 48 | # qinit -c should create both files if they don't exist |
|
49 | 49 | echo ' .hgignore:' |
|
50 | 50 | cat .hg/patches/.hgignore |
|
51 | 51 | echo ' series:' |
|
52 | 52 | cat .hg/patches/series |
|
53 | 53 | hg qinit -c 2>&1 | sed -e 's/repository.*already/repository already/' |
|
54 | 54 | cd .. |
|
55 | 55 | |
|
56 | 56 | echo '% qinit; <stuff>; qinit -c' |
|
57 | 57 | hg init e |
|
58 | 58 | cd e |
|
59 | 59 | hg qnew A |
|
60 | 60 | echo foo > foo |
|
61 | 61 | hg add foo |
|
62 | 62 | hg qrefresh |
|
63 | 63 | hg qnew B |
|
64 | 64 | echo >> foo |
|
65 | 65 | hg qrefresh |
|
66 | 66 | echo status >> .hg/patches/.hgignore |
|
67 | 67 | echo bleh >> .hg/patches/.hgignore |
|
68 | 68 | hg qinit -c |
|
69 | 69 | hg -R .hg/patches status |
|
70 | 70 | # qinit -c shouldn't touch these files if they already exist |
|
71 | 71 | echo ' .hgignore:' |
|
72 | 72 | cat .hg/patches/.hgignore |
|
73 | 73 | echo ' series:' |
|
74 | 74 | cat .hg/patches/series |
|
75 | 75 | cd .. |
|
76 | 76 | |
|
77 | 77 | cd a |
|
78 | 78 | |
|
79 | 79 | echo % qnew -m |
|
80 | 80 | |
|
81 | 81 | hg qnew -m 'foo bar' test.patch |
|
82 | 82 | cat .hg/patches/test.patch |
|
83 | 83 | |
|
84 | 84 | echo % qrefresh |
|
85 | 85 | |
|
86 | 86 | echo a >> a |
|
87 | 87 | hg qrefresh |
|
88 | 88 | sed -e "s/^\(diff -r \)\([a-f0-9]* \)/\1 x/" \ |
|
89 | 89 | -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
90 | 90 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/test.patch |
|
91 | 91 | |
|
92 | 92 | echo % qpop |
|
93 | 93 | |
|
94 | 94 | hg qpop |
|
95 | 95 | |
|
96 | 96 | echo % qpush |
|
97 | 97 | |
|
98 | 98 | hg qpush |
|
99 | 99 | |
|
100 | 100 | cd .. |
|
101 | 101 | |
|
102 | 102 | echo % pop/push outside repo |
|
103 | 103 | |
|
104 | 104 | hg -R a qpop |
|
105 | 105 | hg -R a qpush |
|
106 | 106 | |
|
107 | 107 | cd a |
|
108 | 108 | hg qnew test2.patch |
|
109 | 109 | |
|
110 | 110 | echo % qrefresh in subdir |
|
111 | 111 | |
|
112 | 112 | cd b |
|
113 | 113 | echo a > a |
|
114 | 114 | hg add a |
|
115 | 115 | hg qrefresh |
|
116 | 116 | |
|
117 | 117 | echo % pop/push -a in subdir |
|
118 | 118 | |
|
119 | 119 | hg qpop -a |
|
120 | 120 | hg --traceback qpush -a |
|
121 | 121 | |
|
122 | 122 | echo % qseries |
|
123 | 123 | hg qseries |
|
124 | 124 | hg qpop |
|
125 | 125 | hg qseries -vs |
|
126 | 126 | hg qpush |
|
127 | 127 | |
|
128 | 128 | echo % qapplied |
|
129 | 129 | hg qapplied |
|
130 | 130 | |
|
131 | 131 | echo % qtop |
|
132 | 132 | hg qtop |
|
133 | 133 | |
|
134 | 134 | echo % qprev |
|
135 | 135 | hg qprev |
|
136 | 136 | |
|
137 | 137 | echo % qnext |
|
138 | 138 | hg qnext |
|
139 | 139 | |
|
140 | 140 | echo % pop, qnext, qprev, qapplied |
|
141 | 141 | hg qpop |
|
142 | 142 | hg qnext |
|
143 | 143 | hg qprev |
|
144 | 144 | hg qapplied |
|
145 | 145 | |
|
146 | 146 | echo % commit should fail |
|
147 | 147 | hg commit |
|
148 | 148 | |
|
149 | 149 | echo % push should fail |
|
150 | 150 | hg push ../../k |
|
151 | 151 | |
|
152 | 152 | echo % qunapplied |
|
153 | 153 | hg qunapplied |
|
154 | 154 | |
|
155 | 155 | echo % qpush/qpop with index |
|
156 | 156 | hg qnew test1b.patch |
|
157 | 157 | echo 1b > 1b |
|
158 | 158 | hg add 1b |
|
159 | 159 | hg qrefresh |
|
160 | 160 | hg qpush 2 |
|
161 | 161 | hg qpop 0 |
|
162 | 162 | hg qpush test.patch+1 |
|
163 | 163 | hg qpush test.patch+2 |
|
164 | 164 | hg qpop test2.patch-1 |
|
165 | 165 | hg qpop test2.patch-2 |
|
166 | 166 | hg qpush test1b.patch+1 |
|
167 | 167 | |
|
168 | 168 | echo % push should succeed |
|
169 | 169 | hg qpop -a |
|
170 | 170 | hg push ../../k |
|
171 | 171 | |
|
172 | echo % qpush/qpop error codes | |
|
173 | errorcode() | |
|
174 | { | |
|
175 | hg "$@" && echo " $@ succeeds" || echo " $@ fails" | |
|
176 | } | |
|
177 | ||
|
178 | # we want to start with some patches applied | |
|
179 | hg qpush -a | |
|
180 | echo " % pops all patches and succeeds" | |
|
181 | errorcode qpop -a | |
|
182 | echo " % does nothing and succeeds" | |
|
183 | errorcode qpop -a | |
|
184 | echo " % fails - nothing else to pop" | |
|
185 | errorcode qpop | |
|
186 | echo " % pushes a patch and succeeds" | |
|
187 | errorcode qpush | |
|
188 | echo " % pops a patch and succeeds" | |
|
189 | errorcode qpop | |
|
190 | echo " % pushes up to test1b.patch and succeeds" | |
|
191 | errorcode qpush test1b.patch | |
|
192 | echo " % does nothing and succeeds" | |
|
193 | errorcode qpush test1b.patch | |
|
194 | echo " % does nothing and succeeds" | |
|
195 | errorcode qpop test1b.patch | |
|
196 | echo " % fails - can't push to this patch" | |
|
197 | errorcode qpush test.patch | |
|
198 | echo " % fails - can't pop to this patch" | |
|
199 | errorcode qpop test2.patch | |
|
200 | echo " % pops up to test.patch and succeeds" | |
|
201 | errorcode qpop test.patch | |
|
202 | echo " % pushes all patches and succeeds" | |
|
203 | errorcode qpush -a | |
|
204 | echo " % does nothing and succeeds" | |
|
205 | errorcode qpush -a | |
|
206 | echo " % fails - nothing else to push" | |
|
207 | errorcode qpush | |
|
208 | echo " % does nothing and succeeds" | |
|
209 | errorcode qpush test2.patch | |
|
210 | ||
|
211 | ||
|
172 | 212 | echo % strip |
|
173 | 213 | cd ../../b |
|
174 | 214 | echo x>x |
|
175 | 215 | hg ci -Ama |
|
176 | 216 | hg strip tip 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
177 | 217 | hg unbundle .hg/strip-backup/* |
|
178 | 218 | |
|
179 | 219 | echo '% cd b; hg qrefresh' |
|
180 | 220 | hg init refresh |
|
181 | 221 | cd refresh |
|
182 | 222 | echo a > a |
|
183 | 223 | hg ci -Ama -d'0 0' |
|
184 | 224 | hg qnew -mfoo foo |
|
185 | 225 | echo a >> a |
|
186 | 226 | hg qrefresh |
|
187 | 227 | mkdir b |
|
188 | 228 | cd b |
|
189 | 229 | echo f > f |
|
190 | 230 | hg add f |
|
191 | 231 | hg qrefresh |
|
192 | 232 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
193 | 233 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo |
|
194 | 234 | echo % hg qrefresh . |
|
195 | 235 | hg qrefresh . |
|
196 | 236 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
197 | 237 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo |
|
198 | 238 | hg status |
|
199 | 239 | |
|
200 | 240 | echo % qpush failure |
|
201 | 241 | cd .. |
|
202 | 242 | hg qrefresh |
|
203 | 243 | hg qnew -mbar bar |
|
204 | 244 | echo foo > foo |
|
205 | 245 | echo bar > bar |
|
206 | 246 | hg add foo bar |
|
207 | 247 | hg qrefresh |
|
208 | 248 | hg qpop -a |
|
209 | 249 | echo bar > foo |
|
210 | 250 | hg qpush -a |
|
211 | 251 | hg st |
|
212 | 252 | |
|
213 | 253 | cat >>$HGRCPATH <<EOF |
|
214 | 254 | [diff] |
|
215 | 255 | git = True |
|
216 | 256 | EOF |
|
217 | 257 | cd .. |
|
218 | 258 | hg init git |
|
219 | 259 | cd git |
|
220 | 260 | hg qinit |
|
221 | 261 | |
|
222 | 262 | hg qnew -m'new file' new |
|
223 | 263 | echo foo > new |
|
224 | 264 | chmod +x new |
|
225 | 265 | hg add new |
|
226 | 266 | hg qrefresh |
|
227 | 267 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
228 | 268 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/new |
|
229 | 269 | |
|
230 | 270 | hg qnew -m'copy file' copy |
|
231 | 271 | hg cp new copy |
|
232 | 272 | hg qrefresh |
|
233 | 273 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
234 | 274 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/copy |
|
235 | 275 | |
|
236 | 276 | hg qpop |
|
237 | 277 | hg qpush |
|
238 | 278 | hg qdiff |
|
239 | 279 | cat >>$HGRCPATH <<EOF |
|
240 | 280 | [diff] |
|
241 | 281 | git = False |
|
242 | 282 | EOF |
|
243 | 283 | hg qdiff --git |
|
244 | 284 | |
|
245 | 285 | cd .. |
|
246 | 286 | hg init slow |
|
247 | 287 | cd slow |
|
248 | 288 | hg qinit |
|
249 | 289 | echo foo > foo |
|
250 | 290 | hg add foo |
|
251 | 291 | hg ci -m 'add foo' |
|
252 | 292 | hg qnew bar |
|
253 | 293 | echo bar > bar |
|
254 | 294 | hg add bar |
|
255 | 295 | hg mv foo baz |
|
256 | 296 | hg qrefresh --git |
|
257 | 297 | hg up -C 0 |
|
258 | 298 | echo >> foo |
|
259 | 299 | hg ci -m 'change foo' |
|
260 | 300 | hg up -C 1 |
|
261 | 301 | hg qrefresh --git 2>&1 | grep -v 'saving bundle' |
|
262 | 302 | cat .hg/patches/bar |
|
263 | 303 | hg log -vC --template '{rev} {file_copies%filecopy}\n' -r . |
|
264 | 304 | hg qrefresh --git |
|
265 | 305 | cat .hg/patches/bar |
|
266 | 306 | hg log -vC --template '{rev} {file_copies%filecopy}\n' -r . |
|
267 | 307 | |
|
268 | 308 | echo |
|
269 | 309 | hg up -C 1 |
|
270 | 310 | echo >> foo |
|
271 | 311 | hg ci -m 'change foo again' |
|
272 | 312 | hg up -C 2 |
|
273 | 313 | hg mv bar quux |
|
274 | 314 | hg mv baz bleh |
|
275 | 315 | hg qrefresh --git 2>&1 | grep -v 'saving bundle' |
|
276 | 316 | cat .hg/patches/bar |
|
277 | 317 | hg log -vC --template '{rev} {file_copies%filecopy}\n' -r . |
|
278 | 318 | hg mv quux fred |
|
279 | 319 | hg mv bleh barney |
|
280 | 320 | hg qrefresh --git |
|
281 | 321 | cat .hg/patches/bar |
|
282 | 322 | hg log -vC --template '{rev} {file_copies%filecopy}\n' -r . |
|
283 | 323 | |
|
284 | 324 | echo '% strip again' |
|
285 | 325 | cd .. |
|
286 | 326 | hg init strip |
|
287 | 327 | cd strip |
|
288 | 328 | touch foo |
|
289 | 329 | hg add foo |
|
290 | 330 | hg ci -m 'add foo' -d '0 0' |
|
291 | 331 | echo >> foo |
|
292 | 332 | hg ci -m 'change foo 1' -d '0 0' |
|
293 | 333 | hg up -C 0 |
|
294 | 334 | echo 1 >> foo |
|
295 | 335 | hg ci -m 'change foo 2' -d '0 0' |
|
296 | 336 | HGMERGE=true hg merge |
|
297 | 337 | hg ci -m merge -d '0 0' |
|
298 | 338 | hg log |
|
299 | 339 | hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
300 | 340 | hg log |
|
301 | 341 | cd .. |
|
302 | 342 | |
|
303 | 343 | echo '% qclone' |
|
304 | 344 | qlog() |
|
305 | 345 | { |
|
306 | 346 | echo 'main repo:' |
|
307 | 347 | hg log --template ' rev {rev}: {desc}\n' |
|
308 | 348 | echo 'patch repo:' |
|
309 | 349 | hg -R .hg/patches log --template ' rev {rev}: {desc}\n' |
|
310 | 350 | } |
|
311 | 351 | hg init qclonesource |
|
312 | 352 | cd qclonesource |
|
313 | 353 | echo foo > foo |
|
314 | 354 | hg add foo |
|
315 | 355 | hg ci -m 'add foo' |
|
316 | 356 | hg qinit -c |
|
317 | 357 | hg qnew patch1 |
|
318 | 358 | echo bar >> foo |
|
319 | 359 | hg qrefresh -m 'change foo' |
|
320 | 360 | hg qci -m checkpoint |
|
321 | 361 | qlog |
|
322 | 362 | cd .. |
|
323 | 363 | |
|
324 | 364 | # repo with patches applied |
|
325 | 365 | hg qclone qclonesource qclonedest |
|
326 | 366 | cd qclonedest |
|
327 | 367 | qlog |
|
328 | 368 | cd .. |
|
329 | 369 | |
|
330 | 370 | # repo with patches unapplied |
|
331 | 371 | cd qclonesource |
|
332 | 372 | hg qpop -a |
|
333 | 373 | qlog |
|
334 | 374 | cd .. |
|
335 | 375 | hg qclone qclonesource qclonedest2 |
|
336 | 376 | cd qclonedest2 |
|
337 | 377 | qlog |
|
338 | 378 | cd .. |
|
339 | 379 |
@@ -1,358 +1,413 b'' | |||
|
1 | 1 | % help |
|
2 | 2 | mq extension - patch management and development |
|
3 | 3 | |
|
4 | 4 | This extension lets you work with a stack of patches in a Mercurial |
|
5 | 5 | repository. It manages two stacks of patches - all known patches, and |
|
6 | 6 | applied patches (subset of known patches). |
|
7 | 7 | |
|
8 | 8 | Known patches are represented as patch files in the .hg/patches |
|
9 | 9 | directory. Applied patches are both patch files and changesets. |
|
10 | 10 | |
|
11 | 11 | Common tasks (use "hg help command" for more details): |
|
12 | 12 | |
|
13 | 13 | prepare repository to work with patches qinit |
|
14 | 14 | create new patch qnew |
|
15 | 15 | import existing patch qimport |
|
16 | 16 | |
|
17 | 17 | print patch series qseries |
|
18 | 18 | print applied patches qapplied |
|
19 | 19 | print name of top applied patch qtop |
|
20 | 20 | |
|
21 | 21 | add known patch to applied stack qpush |
|
22 | 22 | remove patch from applied stack qpop |
|
23 | 23 | refresh contents of top applied patch qrefresh |
|
24 | 24 | |
|
25 | 25 | list of commands (use "hg help -v mq" to show aliases and global options): |
|
26 | 26 | |
|
27 | 27 | qapplied print the patches already applied |
|
28 | 28 | qclone clone main and patch repository at same time |
|
29 | 29 | qcommit commit changes in the queue repository |
|
30 | 30 | qdelete remove patches from queue |
|
31 | 31 | qdiff diff of the current patch |
|
32 | 32 | qfold fold the named patches into the current patch |
|
33 | 33 | qguard set or print guards for a patch |
|
34 | 34 | qheader Print the header of the topmost or specified patch |
|
35 | 35 | qimport import a patch |
|
36 | 36 | qinit init a new queue repository |
|
37 | 37 | qnew create a new patch |
|
38 | 38 | qnext print the name of the next patch |
|
39 | 39 | qpop pop the current patch off the stack |
|
40 | 40 | qprev print the name of the previous patch |
|
41 | 41 | qpush push the next patch onto the stack |
|
42 | 42 | qrefresh update the current patch |
|
43 | 43 | qrename rename a patch |
|
44 | 44 | qrestore restore the queue state saved by a rev |
|
45 | 45 | qsave save current queue state |
|
46 | 46 | qselect set or print guarded patches to push |
|
47 | 47 | qseries print the entire series file |
|
48 | 48 | qtop print the name of the current patch |
|
49 | 49 | qunapplied print the patches not yet applied |
|
50 | 50 | strip strip a revision and all later revs on the same branch |
|
51 | 51 | adding a |
|
52 | 52 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
53 | 53 | adding b/z |
|
54 | 54 | % qinit |
|
55 | 55 | % -R qinit |
|
56 | 56 | % qinit -c |
|
57 | 57 | A .hgignore |
|
58 | 58 | A series |
|
59 | 59 | % qnew implies add |
|
60 | 60 | A .hgignore |
|
61 | 61 | A series |
|
62 | 62 | A test.patch |
|
63 | 63 | % qinit; qinit -c |
|
64 | 64 | .hgignore: |
|
65 | 65 | syntax: glob |
|
66 | 66 | status |
|
67 | 67 | guards |
|
68 | 68 | series: |
|
69 | 69 | abort: repository already exists! |
|
70 | 70 | % qinit; <stuff>; qinit -c |
|
71 | 71 | adding A |
|
72 | 72 | adding B |
|
73 | 73 | A .hgignore |
|
74 | 74 | A A |
|
75 | 75 | A B |
|
76 | 76 | A series |
|
77 | 77 | .hgignore: |
|
78 | 78 | status |
|
79 | 79 | bleh |
|
80 | 80 | series: |
|
81 | 81 | A |
|
82 | 82 | B |
|
83 | 83 | % qnew -m |
|
84 | 84 | foo bar |
|
85 | 85 | % qrefresh |
|
86 | 86 | foo bar |
|
87 | 87 | |
|
88 | 88 | diff -r xa |
|
89 | 89 | --- a/a |
|
90 | 90 | +++ b/a |
|
91 | 91 | @@ -1,1 +1,2 @@ a |
|
92 | 92 | a |
|
93 | 93 | +a |
|
94 | 94 | % qpop |
|
95 | 95 | Patch queue now empty |
|
96 | 96 | % qpush |
|
97 | 97 | applying test.patch |
|
98 | 98 | Now at: test.patch |
|
99 | 99 | % pop/push outside repo |
|
100 | 100 | Patch queue now empty |
|
101 | 101 | applying test.patch |
|
102 | 102 | Now at: test.patch |
|
103 | 103 | % qrefresh in subdir |
|
104 | 104 | % pop/push -a in subdir |
|
105 | 105 | Patch queue now empty |
|
106 | 106 | applying test.patch |
|
107 | 107 | applying test2.patch |
|
108 | 108 | Now at: test2.patch |
|
109 | 109 | % qseries |
|
110 | 110 | test.patch |
|
111 | 111 | test2.patch |
|
112 | 112 | Now at: test.patch |
|
113 | 113 | 0 A test.patch: foo bar |
|
114 | 114 | 1 U test2.patch: |
|
115 | 115 | applying test2.patch |
|
116 | 116 | Now at: test2.patch |
|
117 | 117 | % qapplied |
|
118 | 118 | test.patch |
|
119 | 119 | test2.patch |
|
120 | 120 | % qtop |
|
121 | 121 | test2.patch |
|
122 | 122 | % qprev |
|
123 | 123 | test.patch |
|
124 | 124 | % qnext |
|
125 | 125 | All patches applied |
|
126 | 126 | % pop, qnext, qprev, qapplied |
|
127 | 127 | Now at: test.patch |
|
128 | 128 | test2.patch |
|
129 | 129 | Only one patch applied |
|
130 | 130 | test.patch |
|
131 | 131 | % commit should fail |
|
132 | 132 | abort: cannot commit over an applied mq patch |
|
133 | 133 | % push should fail |
|
134 | 134 | pushing to ../../k |
|
135 | 135 | abort: source has mq patches applied |
|
136 | 136 | % qunapplied |
|
137 | 137 | test2.patch |
|
138 | 138 | % qpush/qpop with index |
|
139 | 139 | applying test2.patch |
|
140 | 140 | Now at: test2.patch |
|
141 | 141 | Now at: test.patch |
|
142 | 142 | applying test1b.patch |
|
143 | 143 | Now at: test1b.patch |
|
144 | 144 | applying test2.patch |
|
145 | 145 | Now at: test2.patch |
|
146 | 146 | Now at: test1b.patch |
|
147 | 147 | Now at: test.patch |
|
148 | 148 | applying test1b.patch |
|
149 | 149 | applying test2.patch |
|
150 | 150 | Now at: test2.patch |
|
151 | 151 | % push should succeed |
|
152 | 152 | Patch queue now empty |
|
153 | 153 | pushing to ../../k |
|
154 | 154 | searching for changes |
|
155 | 155 | adding changesets |
|
156 | 156 | adding manifests |
|
157 | 157 | adding file changes |
|
158 | 158 | added 1 changesets with 1 changes to 1 files |
|
159 | % qpush/qpop error codes | |
|
160 | applying test.patch | |
|
161 | applying test1b.patch | |
|
162 | applying test2.patch | |
|
163 | Now at: test2.patch | |
|
164 | % pops all patches and succeeds | |
|
165 | Patch queue now empty | |
|
166 | qpop -a succeeds | |
|
167 | % does nothing and succeeds | |
|
168 | no patches applied | |
|
169 | qpop -a succeeds | |
|
170 | % fails - nothing else to pop | |
|
171 | no patches applied | |
|
172 | qpop fails | |
|
173 | % pushes a patch and succeeds | |
|
174 | applying test.patch | |
|
175 | Now at: test.patch | |
|
176 | qpush succeeds | |
|
177 | % pops a patch and succeeds | |
|
178 | Patch queue now empty | |
|
179 | qpop succeeds | |
|
180 | % pushes up to test1b.patch and succeeds | |
|
181 | applying test.patch | |
|
182 | applying test1b.patch | |
|
183 | Now at: test1b.patch | |
|
184 | qpush test1b.patch succeeds | |
|
185 | % does nothing and succeeds | |
|
186 | qpush: test1b.patch is already at the top | |
|
187 | qpush test1b.patch succeeds | |
|
188 | % does nothing and succeeds | |
|
189 | qpop: test1b.patch is already at the top | |
|
190 | qpop test1b.patch succeeds | |
|
191 | % fails - can't push to this patch | |
|
192 | abort: cannot push to a previous patch: test.patch | |
|
193 | qpush test.patch fails | |
|
194 | % fails - can't pop to this patch | |
|
195 | abort: patch test2.patch is not applied | |
|
196 | qpop test2.patch fails | |
|
197 | % pops up to test.patch and succeeds | |
|
198 | Now at: test.patch | |
|
199 | qpop test.patch succeeds | |
|
200 | % pushes all patches and succeeds | |
|
201 | applying test1b.patch | |
|
202 | applying test2.patch | |
|
203 | Now at: test2.patch | |
|
204 | qpush -a succeeds | |
|
205 | % does nothing and succeeds | |
|
206 | all patches are currently applied | |
|
207 | qpush -a succeeds | |
|
208 | % fails - nothing else to push | |
|
209 | patch series already fully applied | |
|
210 | qpush fails | |
|
211 | % does nothing and succeeds | |
|
212 | all patches are currently applied | |
|
213 | qpush test2.patch succeeds | |
|
159 | 214 | % strip |
|
160 | 215 | adding x |
|
161 | 216 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
162 | 217 | saving bundle to |
|
163 | 218 | adding changesets |
|
164 | 219 | adding manifests |
|
165 | 220 | adding file changes |
|
166 | 221 | added 1 changesets with 1 changes to 1 files |
|
167 | 222 | (run 'hg update' to get a working copy) |
|
168 | 223 | % cd b; hg qrefresh |
|
169 | 224 | adding a |
|
170 | 225 | foo |
|
171 | 226 | |
|
172 | 227 | diff -r cb9a9f314b8b a |
|
173 | 228 | --- a/a |
|
174 | 229 | +++ b/a |
|
175 | 230 | @@ -1,1 +1,2 @@ a |
|
176 | 231 | a |
|
177 | 232 | +a |
|
178 | 233 | diff -r cb9a9f314b8b b/f |
|
179 | 234 | --- /dev/null |
|
180 | 235 | +++ b/b/f |
|
181 | 236 | @@ -0,0 +1,1 @@ |
|
182 | 237 | +f |
|
183 | 238 | % hg qrefresh . |
|
184 | 239 | foo |
|
185 | 240 | |
|
186 | 241 | diff -r cb9a9f314b8b b/f |
|
187 | 242 | --- /dev/null |
|
188 | 243 | +++ b/b/f |
|
189 | 244 | @@ -0,0 +1,1 @@ |
|
190 | 245 | +f |
|
191 | 246 | M a |
|
192 | 247 | % qpush failure |
|
193 | 248 | Patch queue now empty |
|
194 | 249 | applying foo |
|
195 | 250 | applying bar |
|
196 | 251 | 1 out of 1 hunk ignored -- saving rejects to file foo.rej |
|
197 | 252 | patch failed, unable to continue (try -v) |
|
198 | 253 | patch failed, rejects left in working dir |
|
199 | 254 | Errors during apply, please fix and refresh bar |
|
200 | 255 | ? foo |
|
201 | 256 | ? foo.rej |
|
202 | 257 | new file |
|
203 | 258 | |
|
204 | 259 | diff --git a/new b/new |
|
205 | 260 | new file mode 100755 |
|
206 | 261 | --- /dev/null |
|
207 | 262 | +++ b/new |
|
208 | 263 | @@ -0,0 +1,1 @@ |
|
209 | 264 | +foo |
|
210 | 265 | copy file |
|
211 | 266 | |
|
212 | 267 | diff --git a/new b/copy |
|
213 | 268 | copy from new |
|
214 | 269 | copy to copy |
|
215 | 270 | Now at: new |
|
216 | 271 | applying copy |
|
217 | 272 | Now at: copy |
|
218 | 273 | diff --git a/new b/copy |
|
219 | 274 | copy from new |
|
220 | 275 | copy to copy |
|
221 | 276 | diff --git a/new b/copy |
|
222 | 277 | copy from new |
|
223 | 278 | copy to copy |
|
224 | 279 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
225 | 280 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
226 | 281 | adding branch |
|
227 | 282 | adding changesets |
|
228 | 283 | adding manifests |
|
229 | 284 | adding file changes |
|
230 | 285 | added 1 changesets with 1 changes to 1 files |
|
231 | 286 | (run 'hg update' to get a working copy) |
|
232 | 287 | Patch queue now empty |
|
233 | 288 | applying bar |
|
234 | 289 | Now at: bar |
|
235 | 290 | diff --git a/bar b/bar |
|
236 | 291 | new file mode 100644 |
|
237 | 292 | --- /dev/null |
|
238 | 293 | +++ b/bar |
|
239 | 294 | @@ -0,0 +1,1 @@ |
|
240 | 295 | +bar |
|
241 | 296 | diff --git a/foo b/baz |
|
242 | 297 | rename from foo |
|
243 | 298 | rename to baz |
|
244 | 299 | 2 baz (foo) |
|
245 | 300 | diff --git a/bar b/bar |
|
246 | 301 | new file mode 100644 |
|
247 | 302 | --- /dev/null |
|
248 | 303 | +++ b/bar |
|
249 | 304 | @@ -0,0 +1,1 @@ |
|
250 | 305 | +bar |
|
251 | 306 | diff --git a/foo b/baz |
|
252 | 307 | rename from foo |
|
253 | 308 | rename to baz |
|
254 | 309 | 2 baz (foo) |
|
255 | 310 | |
|
256 | 311 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
257 | 312 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
258 | 313 | adding branch |
|
259 | 314 | adding changesets |
|
260 | 315 | adding manifests |
|
261 | 316 | adding file changes |
|
262 | 317 | added 1 changesets with 1 changes to 1 files |
|
263 | 318 | (run 'hg update' to get a working copy) |
|
264 | 319 | Patch queue now empty |
|
265 | 320 | applying bar |
|
266 | 321 | Now at: bar |
|
267 | 322 | diff --git a/foo b/bleh |
|
268 | 323 | rename from foo |
|
269 | 324 | rename to bleh |
|
270 | 325 | diff --git a/quux b/quux |
|
271 | 326 | new file mode 100644 |
|
272 | 327 | --- /dev/null |
|
273 | 328 | +++ b/quux |
|
274 | 329 | @@ -0,0 +1,1 @@ |
|
275 | 330 | +bar |
|
276 | 331 | 3 bleh (foo) |
|
277 | 332 | diff --git a/foo b/barney |
|
278 | 333 | rename from foo |
|
279 | 334 | rename to barney |
|
280 | 335 | diff --git a/fred b/fred |
|
281 | 336 | new file mode 100644 |
|
282 | 337 | --- /dev/null |
|
283 | 338 | +++ b/fred |
|
284 | 339 | @@ -0,0 +1,1 @@ |
|
285 | 340 | +bar |
|
286 | 341 | 3 barney (foo) |
|
287 | 342 | % strip again |
|
288 | 343 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
289 | 344 | merging foo |
|
290 | 345 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
291 | 346 | (branch merge, don't forget to commit) |
|
292 | 347 | changeset: 3:99615015637b |
|
293 | 348 | tag: tip |
|
294 | 349 | parent: 2:20cbbe65cff7 |
|
295 | 350 | parent: 1:d2871fc282d4 |
|
296 | 351 | user: test |
|
297 | 352 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
298 | 353 | summary: merge |
|
299 | 354 | |
|
300 | 355 | changeset: 2:20cbbe65cff7 |
|
301 | 356 | parent: 0:53245c60e682 |
|
302 | 357 | user: test |
|
303 | 358 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
304 | 359 | summary: change foo 2 |
|
305 | 360 | |
|
306 | 361 | changeset: 1:d2871fc282d4 |
|
307 | 362 | user: test |
|
308 | 363 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
309 | 364 | summary: change foo 1 |
|
310 | 365 | |
|
311 | 366 | changeset: 0:53245c60e682 |
|
312 | 367 | user: test |
|
313 | 368 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
314 | 369 | summary: add foo |
|
315 | 370 | |
|
316 | 371 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
317 | 372 | saving bundle to |
|
318 | 373 | saving bundle to |
|
319 | 374 | adding branch |
|
320 | 375 | adding changesets |
|
321 | 376 | adding manifests |
|
322 | 377 | adding file changes |
|
323 | 378 | added 1 changesets with 1 changes to 1 files |
|
324 | 379 | (run 'hg update' to get a working copy) |
|
325 | 380 | changeset: 1:20cbbe65cff7 |
|
326 | 381 | tag: tip |
|
327 | 382 | user: test |
|
328 | 383 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
329 | 384 | summary: change foo 2 |
|
330 | 385 | |
|
331 | 386 | changeset: 0:53245c60e682 |
|
332 | 387 | user: test |
|
333 | 388 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
334 | 389 | summary: add foo |
|
335 | 390 | |
|
336 | 391 | % qclone |
|
337 | 392 | main repo: |
|
338 | 393 | rev 1: change foo |
|
339 | 394 | rev 0: add foo |
|
340 | 395 | patch repo: |
|
341 | 396 | rev 0: checkpoint |
|
342 | 397 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
343 | 398 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
344 | 399 | main repo: |
|
345 | 400 | rev 0: add foo |
|
346 | 401 | patch repo: |
|
347 | 402 | rev 0: checkpoint |
|
348 | 403 | Patch queue now empty |
|
349 | 404 | main repo: |
|
350 | 405 | rev 0: add foo |
|
351 | 406 | patch repo: |
|
352 | 407 | rev 0: checkpoint |
|
353 | 408 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
354 | 409 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
355 | 410 | main repo: |
|
356 | 411 | rev 0: add foo |
|
357 | 412 | patch repo: |
|
358 | 413 | rev 0: checkpoint |
General Comments 0
You need to be logged in to leave comments.
Login now