##// END OF EJS Templates
tests: fix reported patch tool name in test-mq...
Mads Kiilerich -
r7042:0ada66dc default
parent child Browse files
Show More
@@ -1,531 +1,531 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 % help
13 echo % help
14 hg help mq
14 hg help mq
15
15
16 hg init a
16 hg init a
17 cd a
17 cd a
18 echo a > a
18 echo a > a
19 hg ci -Ama
19 hg ci -Ama
20
20
21 hg clone . ../k
21 hg clone . ../k
22
22
23 mkdir b
23 mkdir b
24 echo z > b/z
24 echo z > b/z
25 hg ci -Ama
25 hg ci -Ama
26
26
27 echo % qinit
27 echo % qinit
28
28
29 hg qinit
29 hg qinit
30
30
31 cd ..
31 cd ..
32 hg init b
32 hg init b
33
33
34 echo % -R qinit
34 echo % -R qinit
35
35
36 hg -R b qinit
36 hg -R b qinit
37
37
38 hg init c
38 hg init c
39
39
40 echo % qinit -c
40 echo % qinit -c
41
41
42 hg --cwd c qinit -c
42 hg --cwd c qinit -c
43 hg -R c/.hg/patches st
43 hg -R c/.hg/patches st
44
44
45 echo % qnew should refuse bad patch names
45 echo % qnew should refuse bad patch names
46 hg -R c qnew series
46 hg -R c qnew series
47 hg -R c qnew status
47 hg -R c qnew status
48 hg -R c qnew guards
48 hg -R c qnew guards
49 hg -R c qnew .hgignore
49 hg -R c qnew .hgignore
50
50
51 echo % qnew implies add
51 echo % qnew implies add
52
52
53 hg -R c qnew test.patch
53 hg -R c qnew test.patch
54 hg -R c/.hg/patches st
54 hg -R c/.hg/patches st
55
55
56 echo '% qinit; qinit -c'
56 echo '% qinit; qinit -c'
57 hg init d
57 hg init d
58 cd d
58 cd d
59 hg qinit
59 hg qinit
60 hg qinit -c
60 hg qinit -c
61 # qinit -c should create both files if they don't exist
61 # qinit -c should create both files if they don't exist
62 echo ' .hgignore:'
62 echo ' .hgignore:'
63 cat .hg/patches/.hgignore
63 cat .hg/patches/.hgignore
64 echo ' series:'
64 echo ' series:'
65 cat .hg/patches/series
65 cat .hg/patches/series
66 hg qinit -c 2>&1 | sed -e 's/repository.*already/repository already/'
66 hg qinit -c 2>&1 | sed -e 's/repository.*already/repository already/'
67 cd ..
67 cd ..
68
68
69 echo '% qinit; <stuff>; qinit -c'
69 echo '% qinit; <stuff>; qinit -c'
70 hg init e
70 hg init e
71 cd e
71 cd e
72 hg qnew A
72 hg qnew A
73 checkundo qnew
73 checkundo qnew
74 echo foo > foo
74 echo foo > foo
75 hg add foo
75 hg add foo
76 hg qrefresh
76 hg qrefresh
77 hg qnew B
77 hg qnew B
78 echo >> foo
78 echo >> foo
79 hg qrefresh
79 hg qrefresh
80 echo status >> .hg/patches/.hgignore
80 echo status >> .hg/patches/.hgignore
81 echo bleh >> .hg/patches/.hgignore
81 echo bleh >> .hg/patches/.hgignore
82 hg qinit -c
82 hg qinit -c
83 hg -R .hg/patches status
83 hg -R .hg/patches status
84 # qinit -c shouldn't touch these files if they already exist
84 # qinit -c shouldn't touch these files if they already exist
85 echo ' .hgignore:'
85 echo ' .hgignore:'
86 cat .hg/patches/.hgignore
86 cat .hg/patches/.hgignore
87 echo ' series:'
87 echo ' series:'
88 cat .hg/patches/series
88 cat .hg/patches/series
89 cd ..
89 cd ..
90
90
91 cd a
91 cd a
92
92
93 echo a > somefile
93 echo a > somefile
94 hg add somefile
94 hg add somefile
95
95
96 echo % qnew with uncommitted changes
96 echo % qnew with uncommitted changes
97
97
98 hg qnew uncommitted.patch
98 hg qnew uncommitted.patch
99 hg st
99 hg st
100 hg qseries
100 hg qseries
101
101
102 echo '% qnew with uncommitted changes and missing file (issue 803)'
102 echo '% qnew with uncommitted changes and missing file (issue 803)'
103
103
104 hg qnew issue803.patch someotherfile 2>&1 | \
104 hg qnew issue803.patch someotherfile 2>&1 | \
105 sed -e 's/someotherfile:.*/someotherfile: No such file or directory/'
105 sed -e 's/someotherfile:.*/someotherfile: No such file or directory/'
106 hg st
106 hg st
107 hg qseries
107 hg qseries
108 hg qpop -f
108 hg qpop -f
109 hg qdel issue803.patch
109 hg qdel issue803.patch
110
110
111 hg revert --no-backup somefile
111 hg revert --no-backup somefile
112 rm somefile
112 rm somefile
113
113
114 echo % qnew -m
114 echo % qnew -m
115
115
116 hg qnew -m 'foo bar' test.patch
116 hg qnew -m 'foo bar' test.patch
117 cat .hg/patches/test.patch
117 cat .hg/patches/test.patch
118
118
119 echo % qrefresh
119 echo % qrefresh
120
120
121 echo a >> a
121 echo a >> a
122 hg qrefresh
122 hg qrefresh
123 sed -e "s/^\(diff -r \)\([a-f0-9]* \)/\1 x/" \
123 sed -e "s/^\(diff -r \)\([a-f0-9]* \)/\1 x/" \
124 -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
124 -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
125 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/test.patch
125 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/test.patch
126
126
127 echo % empty qrefresh
127 echo % empty qrefresh
128
128
129 hg qrefresh -X a
129 hg qrefresh -X a
130 echo 'revision:'
130 echo 'revision:'
131 hg diff -r -2 -r -1
131 hg diff -r -2 -r -1
132 echo 'patch:'
132 echo 'patch:'
133 cat .hg/patches/test.patch
133 cat .hg/patches/test.patch
134 echo 'working dir diff:'
134 echo 'working dir diff:'
135 hg diff --nodates -q
135 hg diff --nodates -q
136 # restore things
136 # restore things
137 hg qrefresh
137 hg qrefresh
138 checkundo qrefresh
138 checkundo qrefresh
139
139
140 echo % qpop
140 echo % qpop
141
141
142 hg qpop
142 hg qpop
143 checkundo qpop
143 checkundo qpop
144
144
145 echo % qpush
145 echo % qpush
146
146
147 hg qpush
147 hg qpush
148 checkundo qpush
148 checkundo qpush
149
149
150 cd ..
150 cd ..
151
151
152 echo % pop/push outside repo
152 echo % pop/push outside repo
153
153
154 hg -R a qpop
154 hg -R a qpop
155 hg -R a qpush
155 hg -R a qpush
156
156
157 cd a
157 cd a
158 hg qnew test2.patch
158 hg qnew test2.patch
159
159
160 echo % qrefresh in subdir
160 echo % qrefresh in subdir
161
161
162 cd b
162 cd b
163 echo a > a
163 echo a > a
164 hg add a
164 hg add a
165 hg qrefresh
165 hg qrefresh
166
166
167 echo % pop/push -a in subdir
167 echo % pop/push -a in subdir
168
168
169 hg qpop -a
169 hg qpop -a
170 hg --traceback qpush -a
170 hg --traceback qpush -a
171
171
172 echo % qseries
172 echo % qseries
173 hg qseries
173 hg qseries
174 hg qpop
174 hg qpop
175 hg qseries -vs
175 hg qseries -vs
176 hg qpush
176 hg qpush
177
177
178 echo % qapplied
178 echo % qapplied
179 hg qapplied
179 hg qapplied
180
180
181 echo % qtop
181 echo % qtop
182 hg qtop
182 hg qtop
183
183
184 echo % qprev
184 echo % qprev
185 hg qprev
185 hg qprev
186
186
187 echo % qnext
187 echo % qnext
188 hg qnext
188 hg qnext
189
189
190 echo % pop, qnext, qprev, qapplied
190 echo % pop, qnext, qprev, qapplied
191 hg qpop
191 hg qpop
192 hg qnext
192 hg qnext
193 hg qprev
193 hg qprev
194 hg qapplied
194 hg qapplied
195
195
196 echo % commit should fail
196 echo % commit should fail
197 hg commit
197 hg commit
198
198
199 echo % push should fail
199 echo % push should fail
200 hg push ../../k
200 hg push ../../k
201
201
202 echo % qunapplied
202 echo % qunapplied
203 hg qunapplied
203 hg qunapplied
204
204
205 echo % qpush/qpop with index
205 echo % qpush/qpop with index
206 hg qnew test1b.patch
206 hg qnew test1b.patch
207 echo 1b > 1b
207 echo 1b > 1b
208 hg add 1b
208 hg add 1b
209 hg qrefresh
209 hg qrefresh
210 hg qpush 2
210 hg qpush 2
211 hg qpop 0
211 hg qpop 0
212 hg qpush test.patch+1
212 hg qpush test.patch+1
213 hg qpush test.patch+2
213 hg qpush test.patch+2
214 hg qpop test2.patch-1
214 hg qpop test2.patch-1
215 hg qpop test2.patch-2
215 hg qpop test2.patch-2
216 hg qpush test1b.patch+1
216 hg qpush test1b.patch+1
217
217
218 echo % push should succeed
218 echo % push should succeed
219 hg qpop -a
219 hg qpop -a
220 hg push ../../k
220 hg push ../../k
221
221
222 echo % qpush/qpop error codes
222 echo % qpush/qpop error codes
223 errorcode()
223 errorcode()
224 {
224 {
225 hg "$@" && echo " $@ succeeds" || echo " $@ fails"
225 hg "$@" && echo " $@ succeeds" || echo " $@ fails"
226 }
226 }
227
227
228 # we want to start with some patches applied
228 # we want to start with some patches applied
229 hg qpush -a
229 hg qpush -a
230 echo " % pops all patches and succeeds"
230 echo " % pops all patches and succeeds"
231 errorcode qpop -a
231 errorcode qpop -a
232 echo " % does nothing and succeeds"
232 echo " % does nothing and succeeds"
233 errorcode qpop -a
233 errorcode qpop -a
234 echo " % fails - nothing else to pop"
234 echo " % fails - nothing else to pop"
235 errorcode qpop
235 errorcode qpop
236 echo " % pushes a patch and succeeds"
236 echo " % pushes a patch and succeeds"
237 errorcode qpush
237 errorcode qpush
238 echo " % pops a patch and succeeds"
238 echo " % pops a patch and succeeds"
239 errorcode qpop
239 errorcode qpop
240 echo " % pushes up to test1b.patch and succeeds"
240 echo " % pushes up to test1b.patch and succeeds"
241 errorcode qpush test1b.patch
241 errorcode qpush test1b.patch
242 echo " % does nothing and succeeds"
242 echo " % does nothing and succeeds"
243 errorcode qpush test1b.patch
243 errorcode qpush test1b.patch
244 echo " % does nothing and succeeds"
244 echo " % does nothing and succeeds"
245 errorcode qpop test1b.patch
245 errorcode qpop test1b.patch
246 echo " % fails - can't push to this patch"
246 echo " % fails - can't push to this patch"
247 errorcode qpush test.patch
247 errorcode qpush test.patch
248 echo " % fails - can't pop to this patch"
248 echo " % fails - can't pop to this patch"
249 errorcode qpop test2.patch
249 errorcode qpop test2.patch
250 echo " % pops up to test.patch and succeeds"
250 echo " % pops up to test.patch and succeeds"
251 errorcode qpop test.patch
251 errorcode qpop test.patch
252 echo " % pushes all patches and succeeds"
252 echo " % pushes all patches and succeeds"
253 errorcode qpush -a
253 errorcode qpush -a
254 echo " % does nothing and succeeds"
254 echo " % does nothing and succeeds"
255 errorcode qpush -a
255 errorcode qpush -a
256 echo " % fails - nothing else to push"
256 echo " % fails - nothing else to push"
257 errorcode qpush
257 errorcode qpush
258 echo " % does nothing and succeeds"
258 echo " % does nothing and succeeds"
259 errorcode qpush test2.patch
259 errorcode qpush test2.patch
260
260
261
261
262 echo % strip
262 echo % strip
263 cd ../../b
263 cd ../../b
264 echo x>x
264 echo x>x
265 hg ci -Ama
265 hg ci -Ama
266 hg strip tip 2>&1 | sed 's/\(saving bundle to \).*/\1/'
266 hg strip tip 2>&1 | sed 's/\(saving bundle to \).*/\1/'
267 hg unbundle .hg/strip-backup/*
267 hg unbundle .hg/strip-backup/*
268
268
269 echo '% cd b; hg qrefresh'
269 echo '% cd b; hg qrefresh'
270 hg init refresh
270 hg init refresh
271 cd refresh
271 cd refresh
272 echo a > a
272 echo a > a
273 hg ci -Ama -d'0 0'
273 hg ci -Ama -d'0 0'
274 hg qnew -mfoo foo
274 hg qnew -mfoo foo
275 echo a >> a
275 echo a >> a
276 hg qrefresh
276 hg qrefresh
277 mkdir b
277 mkdir b
278 cd b
278 cd b
279 echo f > f
279 echo f > f
280 hg add f
280 hg add f
281 hg qrefresh
281 hg qrefresh
282 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
282 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
283 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo
283 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo
284 echo % hg qrefresh .
284 echo % hg qrefresh .
285 hg qrefresh .
285 hg qrefresh .
286 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
286 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
287 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo
287 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo
288 hg status
288 hg status
289
289
290 echo % qpush failure
290 echo % qpush failure
291 cd ..
291 cd ..
292 hg qrefresh
292 hg qrefresh
293 hg qnew -mbar bar
293 hg qnew -mbar bar
294 echo foo > foo
294 echo foo > foo
295 echo bar > bar
295 echo bar > bar
296 hg add foo bar
296 hg add foo bar
297 hg qrefresh
297 hg qrefresh
298 hg qpop -a
298 hg qpop -a
299 echo bar > foo
299 echo bar > foo
300 hg qpush -a
300 hg qpush -a
301 hg st
301 hg st
302
302
303 echo % mq tags
303 echo % mq tags
304 hg log --template '{rev} {tags}\n' -r qparent:qtip
304 hg log --template '{rev} {tags}\n' -r qparent:qtip
305
305
306 echo % bad node in status
306 echo % bad node in status
307 hg qpop
307 hg qpop
308 hg strip -qn tip
308 hg strip -qn tip
309 hg tip 2>&1 | sed -e 's/unknown node .*/unknown node/'
309 hg tip 2>&1 | sed -e 's/unknown node .*/unknown node/'
310 hg branches 2>&1 | sed -e 's/unknown node .*/unknown node/'
310 hg branches 2>&1 | sed -e 's/unknown node .*/unknown node/'
311 hg qpop
311 hg qpop
312
312
313 cat >>$HGRCPATH <<EOF
313 cat >>$HGRCPATH <<EOF
314 [diff]
314 [diff]
315 git = True
315 git = True
316 EOF
316 EOF
317 cd ..
317 cd ..
318 hg init git
318 hg init git
319 cd git
319 cd git
320 hg qinit
320 hg qinit
321
321
322 hg qnew -m'new file' new
322 hg qnew -m'new file' new
323 echo foo > new
323 echo foo > new
324 chmod +x new
324 chmod +x new
325 hg add new
325 hg add new
326 hg qrefresh
326 hg qrefresh
327 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
327 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
328 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/new
328 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/new
329
329
330 hg qnew -m'copy file' copy
330 hg qnew -m'copy file' copy
331 hg cp new copy
331 hg cp new copy
332 hg qrefresh
332 hg qrefresh
333 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
333 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
334 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/copy
334 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/copy
335
335
336 hg qpop
336 hg qpop
337 hg qpush
337 hg qpush
338 hg qdiff
338 hg qdiff
339 cat >>$HGRCPATH <<EOF
339 cat >>$HGRCPATH <<EOF
340 [diff]
340 [diff]
341 git = False
341 git = False
342 EOF
342 EOF
343 hg qdiff --git
343 hg qdiff --git
344
344
345 cd ..
345 cd ..
346 hg init slow
346 hg init slow
347 cd slow
347 cd slow
348 hg qinit
348 hg qinit
349 echo foo > foo
349 echo foo > foo
350 hg add foo
350 hg add foo
351 hg ci -m 'add foo'
351 hg ci -m 'add foo'
352 hg qnew bar
352 hg qnew bar
353 echo bar > bar
353 echo bar > bar
354 hg add bar
354 hg add bar
355 hg mv foo baz
355 hg mv foo baz
356 hg qrefresh --git
356 hg qrefresh --git
357 hg up -C 0
357 hg up -C 0
358 echo >> foo
358 echo >> foo
359 hg ci -m 'change foo'
359 hg ci -m 'change foo'
360 hg up -C 1
360 hg up -C 1
361 hg qrefresh --git 2>&1 | grep -v 'saving bundle'
361 hg qrefresh --git 2>&1 | grep -v 'saving bundle'
362 cat .hg/patches/bar
362 cat .hg/patches/bar
363 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
363 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
364 hg qrefresh --git
364 hg qrefresh --git
365 cat .hg/patches/bar
365 cat .hg/patches/bar
366 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
366 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
367 hg qrefresh
367 hg qrefresh
368 grep 'diff --git' .hg/patches/bar
368 grep 'diff --git' .hg/patches/bar
369
369
370 echo
370 echo
371 hg up -C 1
371 hg up -C 1
372 echo >> foo
372 echo >> foo
373 hg ci -m 'change foo again'
373 hg ci -m 'change foo again'
374 hg up -C 2
374 hg up -C 2
375 hg mv bar quux
375 hg mv bar quux
376 hg mv baz bleh
376 hg mv baz bleh
377 hg qrefresh --git 2>&1 | grep -v 'saving bundle'
377 hg qrefresh --git 2>&1 | grep -v 'saving bundle'
378 cat .hg/patches/bar
378 cat .hg/patches/bar
379 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
379 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
380 hg mv quux fred
380 hg mv quux fred
381 hg mv bleh barney
381 hg mv bleh barney
382 hg qrefresh --git
382 hg qrefresh --git
383 cat .hg/patches/bar
383 cat .hg/patches/bar
384 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
384 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
385
385
386 echo % refresh omitting an added file
386 echo % refresh omitting an added file
387 hg qnew baz
387 hg qnew baz
388 echo newfile > newfile
388 echo newfile > newfile
389 hg add newfile
389 hg add newfile
390 hg qrefresh
390 hg qrefresh
391 hg st -A newfile
391 hg st -A newfile
392 hg qrefresh -X newfile
392 hg qrefresh -X newfile
393 hg st -A newfile
393 hg st -A newfile
394 hg revert newfile
394 hg revert newfile
395 rm newfile
395 rm newfile
396 hg qpop
396 hg qpop
397 hg qdel baz
397 hg qdel baz
398
398
399 echo % create a git patch
399 echo % create a git patch
400 echo a > alexander
400 echo a > alexander
401 hg add alexander
401 hg add alexander
402 hg qnew -f --git addalexander
402 hg qnew -f --git addalexander
403 grep diff .hg/patches/addalexander
403 grep diff .hg/patches/addalexander
404
404
405 echo % create a git binary patch
405 echo % create a git binary patch
406 cat > writebin.py <<EOF
406 cat > writebin.py <<EOF
407 import sys
407 import sys
408 path = sys.argv[1]
408 path = sys.argv[1]
409 open(path, 'wb').write('BIN\x00ARY')
409 open(path, 'wb').write('BIN\x00ARY')
410 EOF
410 EOF
411 python writebin.py bucephalus
411 python writebin.py bucephalus
412
412
413 python "$TESTDIR/md5sum.py" bucephalus
413 python "$TESTDIR/md5sum.py" bucephalus
414 hg add bucephalus
414 hg add bucephalus
415 hg qnew -f --git addbucephalus
415 hg qnew -f --git addbucephalus
416 grep diff .hg/patches/addbucephalus
416 grep diff .hg/patches/addbucephalus
417
417
418 echo % check binary patches can be popped and pushed
418 echo % check binary patches can be popped and pushed
419 hg qpop
419 hg qpop
420 test -f bucephalus && echo % bucephalus should not be there
420 test -f bucephalus && echo % bucephalus should not be there
421 hg qpush
421 hg qpush
422 test -f bucephalus || echo % bucephalus should be there
422 test -f bucephalus || echo % bucephalus should be there
423 python "$TESTDIR/md5sum.py" bucephalus
423 python "$TESTDIR/md5sum.py" bucephalus
424
424
425
425
426 echo '% strip again'
426 echo '% strip again'
427 cd ..
427 cd ..
428 hg init strip
428 hg init strip
429 cd strip
429 cd strip
430 touch foo
430 touch foo
431 hg add foo
431 hg add foo
432 hg ci -m 'add foo' -d '0 0'
432 hg ci -m 'add foo' -d '0 0'
433 echo >> foo
433 echo >> foo
434 hg ci -m 'change foo 1' -d '0 0'
434 hg ci -m 'change foo 1' -d '0 0'
435 hg up -C 0
435 hg up -C 0
436 echo 1 >> foo
436 echo 1 >> foo
437 hg ci -m 'change foo 2' -d '0 0'
437 hg ci -m 'change foo 2' -d '0 0'
438 HGMERGE=true hg merge
438 HGMERGE=true hg merge
439 hg ci -m merge -d '0 0'
439 hg ci -m merge -d '0 0'
440 hg log
440 hg log
441 hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/'
441 hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/'
442 checkundo strip
442 checkundo strip
443 hg log
443 hg log
444 cd ..
444 cd ..
445
445
446 echo '% qclone'
446 echo '% qclone'
447 qlog()
447 qlog()
448 {
448 {
449 echo 'main repo:'
449 echo 'main repo:'
450 hg log --template ' rev {rev}: {desc}\n'
450 hg log --template ' rev {rev}: {desc}\n'
451 echo 'patch repo:'
451 echo 'patch repo:'
452 hg -R .hg/patches log --template ' rev {rev}: {desc}\n'
452 hg -R .hg/patches log --template ' rev {rev}: {desc}\n'
453 }
453 }
454 hg init qclonesource
454 hg init qclonesource
455 cd qclonesource
455 cd qclonesource
456 echo foo > foo
456 echo foo > foo
457 hg add foo
457 hg add foo
458 hg ci -m 'add foo'
458 hg ci -m 'add foo'
459 hg qinit
459 hg qinit
460 hg qnew patch1
460 hg qnew patch1
461 echo bar >> foo
461 echo bar >> foo
462 hg qrefresh -m 'change foo'
462 hg qrefresh -m 'change foo'
463 cd ..
463 cd ..
464
464
465 # repo with unversioned patch dir
465 # repo with unversioned patch dir
466 hg qclone qclonesource failure
466 hg qclone qclonesource failure
467
467
468 cd qclonesource
468 cd qclonesource
469 hg qinit -c
469 hg qinit -c
470 hg qci -m checkpoint
470 hg qci -m checkpoint
471 qlog
471 qlog
472 cd ..
472 cd ..
473
473
474 # repo with patches applied
474 # repo with patches applied
475 hg qclone qclonesource qclonedest
475 hg qclone qclonesource qclonedest
476 cd qclonedest
476 cd qclonedest
477 qlog
477 qlog
478 cd ..
478 cd ..
479
479
480 # repo with patches unapplied
480 # repo with patches unapplied
481 cd qclonesource
481 cd qclonesource
482 hg qpop -a
482 hg qpop -a
483 qlog
483 qlog
484 cd ..
484 cd ..
485 hg qclone qclonesource qclonedest2
485 hg qclone qclonesource qclonedest2
486 cd qclonedest2
486 cd qclonedest2
487 qlog
487 qlog
488 cd ..
488 cd ..
489
489
490 echo % 'test applying on an empty file (issue 1033)'
490 echo % 'test applying on an empty file (issue 1033)'
491 hg init empty
491 hg init empty
492 cd empty
492 cd empty
493 touch a
493 touch a
494 hg ci -Am addempty
494 hg ci -Am addempty
495 echo a > a
495 echo a > a
496 hg qnew -f -e changea
496 hg qnew -f -e changea
497 hg qpop
497 hg qpop
498 hg qpush
498 hg qpush
499 cd ..
499 cd ..
500
500
501 echo % test qpush with --force, issue1087
501 echo % test qpush with --force, issue1087
502 hg init forcepush
502 hg init forcepush
503 cd forcepush
503 cd forcepush
504 echo hello > hello.txt
504 echo hello > hello.txt
505 echo bye > bye.txt
505 echo bye > bye.txt
506 hg ci -Ama
506 hg ci -Ama
507 hg qnew -d '0 0' empty
507 hg qnew -d '0 0' empty
508 hg qpop
508 hg qpop
509 echo world >> hello.txt
509 echo world >> hello.txt
510
510
511 echo % qpush should fail, local changes
511 echo % qpush should fail, local changes
512 hg qpush
512 hg qpush
513
513
514 echo % apply force, should not discard changes with empty patch
514 echo % apply force, should not discard changes with empty patch
515 hg qpush -f
515 hg qpush -f 2>&1 | sed 's,^.*/patch,patch,g'
516 hg diff --config diff.nodates=True
516 hg diff --config diff.nodates=True
517 hg qdiff --config diff.nodates=True
517 hg qdiff --config diff.nodates=True
518 hg log -l1 -p
518 hg log -l1 -p
519 hg qref -d '0 0'
519 hg qref -d '0 0'
520 hg qpop
520 hg qpop
521 echo universe >> hello.txt
521 echo universe >> hello.txt
522 echo universe >> bye.txt
522 echo universe >> bye.txt
523
523
524 echo % qpush should fail, local changes
524 echo % qpush should fail, local changes
525 hg qpush
525 hg qpush
526
526
527 echo % apply force, should discard changes in hello, but not bye
527 echo % apply force, should discard changes in hello, but not bye
528 hg qpush -f
528 hg qpush -f
529 hg st
529 hg st
530 hg diff --config diff.nodates=True
530 hg diff --config diff.nodates=True
531 hg qdiff --config diff.nodates=True
531 hg qdiff --config diff.nodates=True
@@ -1,546 +1,546 b''
1 % help
1 % help
2 mq extension - patch management and development
2 mq extension - patch management and development
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
5 repository. It manages two stacks of patches - all known patches, and
6 applied patches (subset of known patches).
6 applied patches (subset of known patches).
7
7
8 Known patches are represented as patch files in the .hg/patches
8 Known patches are represented as patch files in the .hg/patches
9 directory. Applied patches are both patch files and changesets.
9 directory. 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 prepare repository to work with patches qinit
13 prepare repository to work with patches qinit
14 create new patch qnew
14 create new patch qnew
15 import existing patch qimport
15 import existing patch qimport
16
16
17 print patch series qseries
17 print patch series qseries
18 print applied patches qapplied
18 print applied patches qapplied
19 print name of top applied patch qtop
19 print name of top applied patch qtop
20
20
21 add known patch to applied stack qpush
21 add known patch to applied stack qpush
22 remove patch from applied stack qpop
22 remove patch from applied stack qpop
23 refresh contents of top applied patch qrefresh
23 refresh contents of top applied patch qrefresh
24
24
25 list of commands:
25 list of commands:
26
26
27 qapplied print the patches already applied
27 qapplied print the patches already applied
28 qclone clone main and patch repository at same time
28 qclone clone main and patch repository at same time
29 qcommit commit changes in the queue repository
29 qcommit commit changes in the queue repository
30 qdelete remove patches from queue
30 qdelete remove patches from queue
31 qdiff diff of the current patch and subsequent modifications
31 qdiff diff of the current patch and subsequent modifications
32 qfold fold the named patches into the current patch
32 qfold fold the named patches into the current patch
33 qgoto push or pop patches until named patch is at top of stack
33 qgoto push or pop patches until named patch is at top of stack
34 qguard set or print guards for a patch
34 qguard set or print guards for a patch
35 qheader Print the header of the topmost or specified patch
35 qheader Print the header of the topmost or specified patch
36 qimport import a patch
36 qimport import a patch
37 qinit init a new queue repository
37 qinit init a new queue repository
38 qnew create a new patch
38 qnew create a new patch
39 qnext print the name of the next patch
39 qnext print the name of the next patch
40 qpop pop the current patch off the stack
40 qpop pop the current patch off the stack
41 qprev print the name of the previous patch
41 qprev print the name of the previous patch
42 qpush push the next patch onto the stack
42 qpush push the next patch onto the stack
43 qrefresh update the current patch
43 qrefresh update the current patch
44 qrename rename a patch
44 qrename rename a patch
45 qrestore restore the queue state saved by a rev
45 qrestore restore the queue state saved by a rev
46 qsave save current queue state
46 qsave save current queue state
47 qselect set or print guarded patches to push
47 qselect set or print guarded patches to push
48 qseries print the entire series file
48 qseries print the entire series file
49 qtop print the name of the current patch
49 qtop print the name of the current patch
50 qunapplied print the patches not yet applied
50 qunapplied print the patches not yet applied
51 strip strip a revision and all its descendants from the repository
51 strip strip a revision and all its descendants from the repository
52
52
53 use "hg -v help mq" to show aliases and global options
53 use "hg -v help mq" to show aliases and global options
54 adding a
54 adding a
55 updating working directory
55 updating working directory
56 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
56 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 adding b/z
57 adding b/z
58 % qinit
58 % qinit
59 % -R qinit
59 % -R qinit
60 % qinit -c
60 % qinit -c
61 A .hgignore
61 A .hgignore
62 A series
62 A series
63 % qnew should refuse bad patch names
63 % qnew should refuse bad patch names
64 abort: "series" cannot be used as the name of a patch
64 abort: "series" cannot be used as the name of a patch
65 abort: "status" cannot be used as the name of a patch
65 abort: "status" cannot be used as the name of a patch
66 abort: "guards" cannot be used as the name of a patch
66 abort: "guards" cannot be used as the name of a patch
67 abort: ".hgignore" cannot be used as the name of a patch
67 abort: ".hgignore" cannot be used as the name of a patch
68 % qnew implies add
68 % qnew implies add
69 A .hgignore
69 A .hgignore
70 A series
70 A series
71 A test.patch
71 A test.patch
72 % qinit; qinit -c
72 % qinit; qinit -c
73 .hgignore:
73 .hgignore:
74 ^\.hg
74 ^\.hg
75 ^\.mq
75 ^\.mq
76 syntax: glob
76 syntax: glob
77 status
77 status
78 guards
78 guards
79 series:
79 series:
80 abort: repository already exists!
80 abort: repository already exists!
81 % qinit; <stuff>; qinit -c
81 % qinit; <stuff>; qinit -c
82 adding .hg/patches/A
82 adding .hg/patches/A
83 adding .hg/patches/B
83 adding .hg/patches/B
84 A .hgignore
84 A .hgignore
85 A A
85 A A
86 A B
86 A B
87 A series
87 A series
88 .hgignore:
88 .hgignore:
89 status
89 status
90 bleh
90 bleh
91 series:
91 series:
92 A
92 A
93 B
93 B
94 % qnew with uncommitted changes
94 % qnew with uncommitted changes
95 abort: local changes found, refresh first
95 abort: local changes found, refresh first
96 A somefile
96 A somefile
97 % qnew with uncommitted changes and missing file (issue 803)
97 % qnew with uncommitted changes and missing file (issue 803)
98 someotherfile: No such file or directory
98 someotherfile: No such file or directory
99 A somefile
99 A somefile
100 issue803.patch
100 issue803.patch
101 Patch queue now empty
101 Patch queue now empty
102 % qnew -m
102 % qnew -m
103 foo bar
103 foo bar
104 % qrefresh
104 % qrefresh
105 foo bar
105 foo bar
106
106
107 diff -r xa
107 diff -r xa
108 --- a/a
108 --- a/a
109 +++ b/a
109 +++ b/a
110 @@ -1,1 +1,2 @@
110 @@ -1,1 +1,2 @@
111 a
111 a
112 +a
112 +a
113 % empty qrefresh
113 % empty qrefresh
114 revision:
114 revision:
115 patch:
115 patch:
116 foo bar
116 foo bar
117
117
118 working dir diff:
118 working dir diff:
119 --- a/a
119 --- a/a
120 +++ b/a
120 +++ b/a
121 @@ -1,1 +1,2 @@
121 @@ -1,1 +1,2 @@
122 a
122 a
123 +a
123 +a
124 % qpop
124 % qpop
125 Patch queue now empty
125 Patch queue now empty
126 % qpush
126 % qpush
127 applying test.patch
127 applying test.patch
128 Now at: test.patch
128 Now at: test.patch
129 % pop/push outside repo
129 % pop/push outside repo
130 Patch queue now empty
130 Patch queue now empty
131 applying test.patch
131 applying test.patch
132 Now at: test.patch
132 Now at: test.patch
133 % qrefresh in subdir
133 % qrefresh in subdir
134 % pop/push -a in subdir
134 % pop/push -a in subdir
135 Patch queue now empty
135 Patch queue now empty
136 applying test.patch
136 applying test.patch
137 applying test2.patch
137 applying test2.patch
138 Now at: test2.patch
138 Now at: test2.patch
139 % qseries
139 % qseries
140 test.patch
140 test.patch
141 test2.patch
141 test2.patch
142 Now at: test.patch
142 Now at: test.patch
143 0 A test.patch: foo bar
143 0 A test.patch: foo bar
144 1 U test2.patch:
144 1 U test2.patch:
145 applying test2.patch
145 applying test2.patch
146 Now at: test2.patch
146 Now at: test2.patch
147 % qapplied
147 % qapplied
148 test.patch
148 test.patch
149 test2.patch
149 test2.patch
150 % qtop
150 % qtop
151 test2.patch
151 test2.patch
152 % qprev
152 % qprev
153 test.patch
153 test.patch
154 % qnext
154 % qnext
155 All patches applied
155 All patches applied
156 % pop, qnext, qprev, qapplied
156 % pop, qnext, qprev, qapplied
157 Now at: test.patch
157 Now at: test.patch
158 test2.patch
158 test2.patch
159 Only one patch applied
159 Only one patch applied
160 test.patch
160 test.patch
161 % commit should fail
161 % commit should fail
162 abort: cannot commit over an applied mq patch
162 abort: cannot commit over an applied mq patch
163 % push should fail
163 % push should fail
164 pushing to ../../k
164 pushing to ../../k
165 abort: source has mq patches applied
165 abort: source has mq patches applied
166 % qunapplied
166 % qunapplied
167 test2.patch
167 test2.patch
168 % qpush/qpop with index
168 % qpush/qpop with index
169 applying test2.patch
169 applying test2.patch
170 Now at: test2.patch
170 Now at: test2.patch
171 Now at: test.patch
171 Now at: test.patch
172 applying test1b.patch
172 applying test1b.patch
173 Now at: test1b.patch
173 Now at: test1b.patch
174 applying test2.patch
174 applying test2.patch
175 Now at: test2.patch
175 Now at: test2.patch
176 Now at: test1b.patch
176 Now at: test1b.patch
177 Now at: test.patch
177 Now at: test.patch
178 applying test1b.patch
178 applying test1b.patch
179 applying test2.patch
179 applying test2.patch
180 Now at: test2.patch
180 Now at: test2.patch
181 % push should succeed
181 % push should succeed
182 Patch queue now empty
182 Patch queue now empty
183 pushing to ../../k
183 pushing to ../../k
184 searching for changes
184 searching for changes
185 adding changesets
185 adding changesets
186 adding manifests
186 adding manifests
187 adding file changes
187 adding file changes
188 added 1 changesets with 1 changes to 1 files
188 added 1 changesets with 1 changes to 1 files
189 % qpush/qpop error codes
189 % qpush/qpop error codes
190 applying test.patch
190 applying test.patch
191 applying test1b.patch
191 applying test1b.patch
192 applying test2.patch
192 applying test2.patch
193 Now at: test2.patch
193 Now at: test2.patch
194 % pops all patches and succeeds
194 % pops all patches and succeeds
195 Patch queue now empty
195 Patch queue now empty
196 qpop -a succeeds
196 qpop -a succeeds
197 % does nothing and succeeds
197 % does nothing and succeeds
198 no patches applied
198 no patches applied
199 qpop -a succeeds
199 qpop -a succeeds
200 % fails - nothing else to pop
200 % fails - nothing else to pop
201 no patches applied
201 no patches applied
202 qpop fails
202 qpop fails
203 % pushes a patch and succeeds
203 % pushes a patch and succeeds
204 applying test.patch
204 applying test.patch
205 Now at: test.patch
205 Now at: test.patch
206 qpush succeeds
206 qpush succeeds
207 % pops a patch and succeeds
207 % pops a patch and succeeds
208 Patch queue now empty
208 Patch queue now empty
209 qpop succeeds
209 qpop succeeds
210 % pushes up to test1b.patch and succeeds
210 % pushes up to test1b.patch and succeeds
211 applying test.patch
211 applying test.patch
212 applying test1b.patch
212 applying test1b.patch
213 Now at: test1b.patch
213 Now at: test1b.patch
214 qpush test1b.patch succeeds
214 qpush test1b.patch succeeds
215 % does nothing and succeeds
215 % does nothing and succeeds
216 qpush: test1b.patch is already at the top
216 qpush: test1b.patch is already at the top
217 qpush test1b.patch succeeds
217 qpush test1b.patch succeeds
218 % does nothing and succeeds
218 % does nothing and succeeds
219 qpop: test1b.patch is already at the top
219 qpop: test1b.patch is already at the top
220 qpop test1b.patch succeeds
220 qpop test1b.patch succeeds
221 % fails - can't push to this patch
221 % fails - can't push to this patch
222 abort: cannot push to a previous patch: test.patch
222 abort: cannot push to a previous patch: test.patch
223 qpush test.patch fails
223 qpush test.patch fails
224 % fails - can't pop to this patch
224 % fails - can't pop to this patch
225 abort: patch test2.patch is not applied
225 abort: patch test2.patch is not applied
226 qpop test2.patch fails
226 qpop test2.patch fails
227 % pops up to test.patch and succeeds
227 % pops up to test.patch and succeeds
228 Now at: test.patch
228 Now at: test.patch
229 qpop test.patch succeeds
229 qpop test.patch succeeds
230 % pushes all patches and succeeds
230 % pushes all patches and succeeds
231 applying test1b.patch
231 applying test1b.patch
232 applying test2.patch
232 applying test2.patch
233 Now at: test2.patch
233 Now at: test2.patch
234 qpush -a succeeds
234 qpush -a succeeds
235 % does nothing and succeeds
235 % does nothing and succeeds
236 all patches are currently applied
236 all patches are currently applied
237 qpush -a succeeds
237 qpush -a succeeds
238 % fails - nothing else to push
238 % fails - nothing else to push
239 patch series already fully applied
239 patch series already fully applied
240 qpush fails
240 qpush fails
241 % does nothing and succeeds
241 % does nothing and succeeds
242 all patches are currently applied
242 all patches are currently applied
243 qpush test2.patch succeeds
243 qpush test2.patch succeeds
244 % strip
244 % strip
245 adding x
245 adding x
246 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
246 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
247 saving bundle to
247 saving bundle to
248 adding changesets
248 adding changesets
249 adding manifests
249 adding manifests
250 adding file changes
250 adding file changes
251 added 1 changesets with 1 changes to 1 files
251 added 1 changesets with 1 changes to 1 files
252 (run 'hg update' to get a working copy)
252 (run 'hg update' to get a working copy)
253 % cd b; hg qrefresh
253 % cd b; hg qrefresh
254 adding a
254 adding a
255 foo
255 foo
256
256
257 diff -r cb9a9f314b8b a
257 diff -r cb9a9f314b8b a
258 --- a/a
258 --- a/a
259 +++ b/a
259 +++ b/a
260 @@ -1,1 +1,2 @@
260 @@ -1,1 +1,2 @@
261 a
261 a
262 +a
262 +a
263 diff -r cb9a9f314b8b b/f
263 diff -r cb9a9f314b8b b/f
264 --- /dev/null
264 --- /dev/null
265 +++ b/b/f
265 +++ b/b/f
266 @@ -0,0 +1,1 @@
266 @@ -0,0 +1,1 @@
267 +f
267 +f
268 % hg qrefresh .
268 % hg qrefresh .
269 foo
269 foo
270
270
271 diff -r cb9a9f314b8b b/f
271 diff -r cb9a9f314b8b b/f
272 --- /dev/null
272 --- /dev/null
273 +++ b/b/f
273 +++ b/b/f
274 @@ -0,0 +1,1 @@
274 @@ -0,0 +1,1 @@
275 +f
275 +f
276 M a
276 M a
277 % qpush failure
277 % qpush failure
278 Patch queue now empty
278 Patch queue now empty
279 applying foo
279 applying foo
280 applying bar
280 applying bar
281 file foo already exists
281 file foo already exists
282 1 out of 1 hunk FAILED -- saving rejects to file foo.rej
282 1 out of 1 hunk FAILED -- saving rejects to file foo.rej
283 patch failed, unable to continue (try -v)
283 patch failed, unable to continue (try -v)
284 patch failed, rejects left in working dir
284 patch failed, rejects left in working dir
285 Errors during apply, please fix and refresh bar
285 Errors during apply, please fix and refresh bar
286 ? foo
286 ? foo
287 ? foo.rej
287 ? foo.rej
288 % mq tags
288 % mq tags
289 0 qparent
289 0 qparent
290 1 qbase foo
290 1 qbase foo
291 2 qtip bar tip
291 2 qtip bar tip
292 % bad node in status
292 % bad node in status
293 Now at: foo
293 Now at: foo
294 changeset: 0:cb9a9f314b8b
294 changeset: 0:cb9a9f314b8b
295 mq status file refers to unknown node
295 mq status file refers to unknown node
296 tag: tip
296 tag: tip
297 user: test
297 user: test
298 date: Thu Jan 01 00:00:00 1970 +0000
298 date: Thu Jan 01 00:00:00 1970 +0000
299 summary: a
299 summary: a
300
300
301 mq status file refers to unknown node
301 mq status file refers to unknown node
302 default 0:cb9a9f314b8b
302 default 0:cb9a9f314b8b
303 abort: working directory revision is not qtip
303 abort: working directory revision is not qtip
304 new file
304 new file
305
305
306 diff --git a/new b/new
306 diff --git a/new b/new
307 new file mode 100755
307 new file mode 100755
308 --- /dev/null
308 --- /dev/null
309 +++ b/new
309 +++ b/new
310 @@ -0,0 +1,1 @@
310 @@ -0,0 +1,1 @@
311 +foo
311 +foo
312 copy file
312 copy file
313
313
314 diff --git a/new b/copy
314 diff --git a/new b/copy
315 copy from new
315 copy from new
316 copy to copy
316 copy to copy
317 Now at: new
317 Now at: new
318 applying copy
318 applying copy
319 Now at: copy
319 Now at: copy
320 diff --git a/new b/copy
320 diff --git a/new b/copy
321 copy from new
321 copy from new
322 copy to copy
322 copy to copy
323 diff --git a/new b/copy
323 diff --git a/new b/copy
324 copy from new
324 copy from new
325 copy to copy
325 copy to copy
326 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
326 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
327 created new head
327 created new head
328 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
328 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
329 adding branch
329 adding branch
330 adding changesets
330 adding changesets
331 adding manifests
331 adding manifests
332 adding file changes
332 adding file changes
333 added 1 changesets with 1 changes to 1 files
333 added 1 changesets with 1 changes to 1 files
334 Patch queue now empty
334 Patch queue now empty
335 (working directory not at tip)
335 (working directory not at tip)
336 applying bar
336 applying bar
337 Now at: bar
337 Now at: bar
338 diff --git a/bar b/bar
338 diff --git a/bar b/bar
339 new file mode 100644
339 new file mode 100644
340 --- /dev/null
340 --- /dev/null
341 +++ b/bar
341 +++ b/bar
342 @@ -0,0 +1,1 @@
342 @@ -0,0 +1,1 @@
343 +bar
343 +bar
344 diff --git a/foo b/baz
344 diff --git a/foo b/baz
345 rename from foo
345 rename from foo
346 rename to baz
346 rename to baz
347 2 baz (foo)
347 2 baz (foo)
348 diff --git a/bar b/bar
348 diff --git a/bar b/bar
349 new file mode 100644
349 new file mode 100644
350 --- /dev/null
350 --- /dev/null
351 +++ b/bar
351 +++ b/bar
352 @@ -0,0 +1,1 @@
352 @@ -0,0 +1,1 @@
353 +bar
353 +bar
354 diff --git a/foo b/baz
354 diff --git a/foo b/baz
355 rename from foo
355 rename from foo
356 rename to baz
356 rename to baz
357 2 baz (foo)
357 2 baz (foo)
358 diff --git a/bar b/bar
358 diff --git a/bar b/bar
359 diff --git a/foo b/baz
359 diff --git a/foo b/baz
360
360
361 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
361 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
362 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
362 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
363 adding branch
363 adding branch
364 adding changesets
364 adding changesets
365 adding manifests
365 adding manifests
366 adding file changes
366 adding file changes
367 added 1 changesets with 1 changes to 1 files
367 added 1 changesets with 1 changes to 1 files
368 Patch queue now empty
368 Patch queue now empty
369 (working directory not at tip)
369 (working directory not at tip)
370 applying bar
370 applying bar
371 Now at: bar
371 Now at: bar
372 diff --git a/foo b/bleh
372 diff --git a/foo b/bleh
373 rename from foo
373 rename from foo
374 rename to bleh
374 rename to bleh
375 diff --git a/quux b/quux
375 diff --git a/quux b/quux
376 new file mode 100644
376 new file mode 100644
377 --- /dev/null
377 --- /dev/null
378 +++ b/quux
378 +++ b/quux
379 @@ -0,0 +1,1 @@
379 @@ -0,0 +1,1 @@
380 +bar
380 +bar
381 3 bleh (foo)
381 3 bleh (foo)
382 diff --git a/foo b/barney
382 diff --git a/foo b/barney
383 rename from foo
383 rename from foo
384 rename to barney
384 rename to barney
385 diff --git a/fred b/fred
385 diff --git a/fred b/fred
386 new file mode 100644
386 new file mode 100644
387 --- /dev/null
387 --- /dev/null
388 +++ b/fred
388 +++ b/fred
389 @@ -0,0 +1,1 @@
389 @@ -0,0 +1,1 @@
390 +bar
390 +bar
391 3 barney (foo)
391 3 barney (foo)
392 % refresh omitting an added file
392 % refresh omitting an added file
393 C newfile
393 C newfile
394 A newfile
394 A newfile
395 Now at: bar
395 Now at: bar
396 % create a git patch
396 % create a git patch
397 diff --git a/alexander b/alexander
397 diff --git a/alexander b/alexander
398 % create a git binary patch
398 % create a git binary patch
399 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
399 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
400 diff --git a/bucephalus b/bucephalus
400 diff --git a/bucephalus b/bucephalus
401 % check binary patches can be popped and pushed
401 % check binary patches can be popped and pushed
402 Now at: addalexander
402 Now at: addalexander
403 applying addbucephalus
403 applying addbucephalus
404 Now at: addbucephalus
404 Now at: addbucephalus
405 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
405 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
406 % strip again
406 % strip again
407 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
407 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
408 created new head
408 created new head
409 merging foo
409 merging foo
410 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
410 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
411 (branch merge, don't forget to commit)
411 (branch merge, don't forget to commit)
412 changeset: 3:99615015637b
412 changeset: 3:99615015637b
413 tag: tip
413 tag: tip
414 parent: 2:20cbbe65cff7
414 parent: 2:20cbbe65cff7
415 parent: 1:d2871fc282d4
415 parent: 1:d2871fc282d4
416 user: test
416 user: test
417 date: Thu Jan 01 00:00:00 1970 +0000
417 date: Thu Jan 01 00:00:00 1970 +0000
418 summary: merge
418 summary: merge
419
419
420 changeset: 2:20cbbe65cff7
420 changeset: 2:20cbbe65cff7
421 parent: 0:53245c60e682
421 parent: 0:53245c60e682
422 user: test
422 user: test
423 date: Thu Jan 01 00:00:00 1970 +0000
423 date: Thu Jan 01 00:00:00 1970 +0000
424 summary: change foo 2
424 summary: change foo 2
425
425
426 changeset: 1:d2871fc282d4
426 changeset: 1:d2871fc282d4
427 user: test
427 user: test
428 date: Thu Jan 01 00:00:00 1970 +0000
428 date: Thu Jan 01 00:00:00 1970 +0000
429 summary: change foo 1
429 summary: change foo 1
430
430
431 changeset: 0:53245c60e682
431 changeset: 0:53245c60e682
432 user: test
432 user: test
433 date: Thu Jan 01 00:00:00 1970 +0000
433 date: Thu Jan 01 00:00:00 1970 +0000
434 summary: add foo
434 summary: add foo
435
435
436 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
436 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
437 saving bundle to
437 saving bundle to
438 saving bundle to
438 saving bundle to
439 adding branch
439 adding branch
440 adding changesets
440 adding changesets
441 adding manifests
441 adding manifests
442 adding file changes
442 adding file changes
443 added 1 changesets with 1 changes to 1 files
443 added 1 changesets with 1 changes to 1 files
444 changeset: 1:20cbbe65cff7
444 changeset: 1:20cbbe65cff7
445 tag: tip
445 tag: tip
446 user: test
446 user: test
447 date: Thu Jan 01 00:00:00 1970 +0000
447 date: Thu Jan 01 00:00:00 1970 +0000
448 summary: change foo 2
448 summary: change foo 2
449
449
450 changeset: 0:53245c60e682
450 changeset: 0:53245c60e682
451 user: test
451 user: test
452 date: Thu Jan 01 00:00:00 1970 +0000
452 date: Thu Jan 01 00:00:00 1970 +0000
453 summary: add foo
453 summary: add foo
454
454
455 % qclone
455 % qclone
456 abort: versioned patch repository not found (see qinit -c)
456 abort: versioned patch repository not found (see qinit -c)
457 adding .hg/patches/patch1
457 adding .hg/patches/patch1
458 main repo:
458 main repo:
459 rev 1: change foo
459 rev 1: change foo
460 rev 0: add foo
460 rev 0: add foo
461 patch repo:
461 patch repo:
462 rev 0: checkpoint
462 rev 0: checkpoint
463 updating working directory
463 updating working directory
464 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
464 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
465 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
465 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
466 main repo:
466 main repo:
467 rev 0: add foo
467 rev 0: add foo
468 patch repo:
468 patch repo:
469 rev 0: checkpoint
469 rev 0: checkpoint
470 Patch queue now empty
470 Patch queue now empty
471 main repo:
471 main repo:
472 rev 0: add foo
472 rev 0: add foo
473 patch repo:
473 patch repo:
474 rev 0: checkpoint
474 rev 0: checkpoint
475 updating working directory
475 updating working directory
476 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
476 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
477 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
477 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
478 main repo:
478 main repo:
479 rev 0: add foo
479 rev 0: add foo
480 patch repo:
480 patch repo:
481 rev 0: checkpoint
481 rev 0: checkpoint
482 % test applying on an empty file (issue 1033)
482 % test applying on an empty file (issue 1033)
483 adding a
483 adding a
484 Patch queue now empty
484 Patch queue now empty
485 applying changea
485 applying changea
486 Now at: changea
486 Now at: changea
487 % test qpush with --force, issue1087
487 % test qpush with --force, issue1087
488 adding bye.txt
488 adding bye.txt
489 adding hello.txt
489 adding hello.txt
490 Patch queue now empty
490 Patch queue now empty
491 % qpush should fail, local changes
491 % qpush should fail, local changes
492 abort: local changes found, refresh first
492 abort: local changes found, refresh first
493 % apply force, should not discard changes with empty patch
493 % apply force, should not discard changes with empty patch
494 applying empty
494 applying empty
495 /usr/bin/patch: **** Only garbage was found in the patch input.
495 patch: **** Only garbage was found in the patch input.
496 patch failed, unable to continue (try -v)
496 patch failed, unable to continue (try -v)
497 patch empty is empty
497 patch empty is empty
498 Now at: empty
498 Now at: empty
499 diff -r bf5fc3f07a0a hello.txt
499 diff -r bf5fc3f07a0a hello.txt
500 --- a/hello.txt
500 --- a/hello.txt
501 +++ b/hello.txt
501 +++ b/hello.txt
502 @@ -1,1 +1,2 @@
502 @@ -1,1 +1,2 @@
503 hello
503 hello
504 +world
504 +world
505 diff -r 9ecee4f634e3 hello.txt
505 diff -r 9ecee4f634e3 hello.txt
506 --- a/hello.txt
506 --- a/hello.txt
507 +++ b/hello.txt
507 +++ b/hello.txt
508 @@ -1,1 +1,2 @@
508 @@ -1,1 +1,2 @@
509 hello
509 hello
510 +world
510 +world
511 changeset: 1:bf5fc3f07a0a
511 changeset: 1:bf5fc3f07a0a
512 tag: qtip
512 tag: qtip
513 tag: tip
513 tag: tip
514 tag: empty
514 tag: empty
515 tag: qbase
515 tag: qbase
516 user: test
516 user: test
517 date: Thu Jan 01 00:00:00 1970 +0000
517 date: Thu Jan 01 00:00:00 1970 +0000
518 summary: imported patch empty
518 summary: imported patch empty
519
519
520
520
521 Patch queue now empty
521 Patch queue now empty
522 % qpush should fail, local changes
522 % qpush should fail, local changes
523 abort: local changes found, refresh first
523 abort: local changes found, refresh first
524 % apply force, should discard changes in hello, but not bye
524 % apply force, should discard changes in hello, but not bye
525 applying empty
525 applying empty
526 Now at: empty
526 Now at: empty
527 M bye.txt
527 M bye.txt
528 diff -r ba252371dbc1 bye.txt
528 diff -r ba252371dbc1 bye.txt
529 --- a/bye.txt
529 --- a/bye.txt
530 +++ b/bye.txt
530 +++ b/bye.txt
531 @@ -1,1 +1,2 @@
531 @@ -1,1 +1,2 @@
532 bye
532 bye
533 +universe
533 +universe
534 diff -r 9ecee4f634e3 bye.txt
534 diff -r 9ecee4f634e3 bye.txt
535 --- a/bye.txt
535 --- a/bye.txt
536 +++ b/bye.txt
536 +++ b/bye.txt
537 @@ -1,1 +1,2 @@
537 @@ -1,1 +1,2 @@
538 bye
538 bye
539 +universe
539 +universe
540 diff -r 9ecee4f634e3 hello.txt
540 diff -r 9ecee4f634e3 hello.txt
541 --- a/hello.txt
541 --- a/hello.txt
542 +++ b/hello.txt
542 +++ b/hello.txt
543 @@ -1,1 +1,3 @@
543 @@ -1,1 +1,3 @@
544 hello
544 hello
545 +world
545 +world
546 +universe
546 +universe
General Comments 0
You need to be logged in to leave comments. Login now