##// END OF EJS Templates
tests: make tests work if directory contains special characters...
tests: make tests work if directory contains special characters With this quoting tests will work e.g. in "/tmp/foo bar/mercurial/".

File last commit:

r15476:7c06e9c3 default
r16350:4f795f5f stable
Show More
test-mq-qdelete.t
196 lines | 3.4 KiB | text/troff | Tads3Lexer
/ tests / test-mq-qdelete.t
Adrian Buehlmann
tests: unify some of test-mq*
r12324 $ echo "[extensions]" >> $HGRCPATH
$ echo "mq=" >> $HGRCPATH
$ hg init a
$ cd a
$ echo 'base' > base
$ hg ci -Ambase -d '1 0'
adding base
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 $ hg qnew -d '1 0' pa
$ hg qnew -d '1 0' pb
$ hg qnew -d '1 0' pc
Adrian Buehlmann
tests: unify some of test-mq*
r12324
$ hg qdel
abort: qdelete requires at least one revision or patch name
[255]
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 $ hg qdel pc
abort: cannot delete applied patch pc
Adrian Buehlmann
tests: unify some of test-mq*
r12324 [255]
$ hg qpop
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 popping pc
now at: pb
Adrian Buehlmann
tests: unify some of test-mq*
r12324
Dan Villiom Podlaski Christiansen
mq: handle deleting the same patch twice in one command (issue2427)
r12655 Delete the same patch twice in one command (issue2427)
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 $ hg qdel pc pc
Adrian Buehlmann
tests: unify some of test-mq*
r12324
$ hg qseries
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 pa
pb
Adrian Buehlmann
tests: unify some of test-mq*
r12324
$ ls .hg/patches
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 pa
pb
Adrian Buehlmann
tests: unify some of test-mq*
r12324 series
status
$ hg qpop
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 popping pb
now at: pa
Adrian Buehlmann
tests: unify some of test-mq*
r12324
$ hg qdel -k 1
$ ls .hg/patches
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 pa
pb
Adrian Buehlmann
tests: unify some of test-mq*
r12324 series
status
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 $ hg qdel -r pa
patch pa finalized without changeset message
Adrian Buehlmann
tests: unify some of test-mq*
r12324
$ hg qapplied
$ hg log --template '{rev} {desc}\n'
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 1 [mq]: pa
Adrian Buehlmann
tests: unify some of test-mq*
r12324 0 base
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 $ hg qnew pd
$ hg qnew pe
$ hg qnew pf
Adrian Buehlmann
tests: unify some of test-mq*
r12324
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 $ hg qdel -r pe
Adrian Buehlmann
tests: unify some of test-mq*
r12324 abort: cannot delete revision 3 above applied patches
[255]
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 $ hg qdel -r qbase:pe
patch pd finalized without changeset message
patch pe finalized without changeset message
Adrian Buehlmann
tests: unify some of test-mq*
r12324
$ hg qapplied
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 pf
Adrian Buehlmann
tests: unify some of test-mq*
r12324
$ hg log --template '{rev} {desc}\n'
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 4 [mq]: pf
3 [mq]: pe
2 [mq]: pd
1 [mq]: pa
Adrian Buehlmann
tests: unify some of test-mq*
r12324 0 base
$ cd ..
$ hg init b
$ cd b
$ echo 'base' > base
$ hg ci -Ambase -d '1 0'
adding base
$ hg qfinish
abort: no revisions specified
[255]
$ hg qfinish -a
no patches applied
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 $ hg qnew -d '1 0' pa
$ hg qnew -d '1 0' pb
$ hg qnew pc # XXX fails to apply by /usr/bin/patch if we put a date
Adrian Buehlmann
tests: unify some of test-mq*
r12324
$ hg qfinish 0
abort: revision 0 is not managed
[255]
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 $ hg qfinish pb
Adrian Buehlmann
tests: unify some of test-mq*
r12324 abort: cannot delete revision 2 above applied patches
[255]
$ hg qpop
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 popping pc
now at: pb
Adrian Buehlmann
tests: unify some of test-mq*
r12324
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 $ hg qfinish -a pc
abort: unknown revision 'pc'!
Adrian Buehlmann
tests: unify some of test-mq*
r12324 [255]
$ hg qpush
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 applying pc
patch pc is empty
now at: pc
Adrian Buehlmann
tests: unify some of test-mq*
r12324
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 $ hg qfinish qbase:pb
patch pa finalized without changeset message
patch pb finalized without changeset message
Adrian Buehlmann
tests: unify some of test-mq*
r12324
$ hg qapplied
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 pc
Adrian Buehlmann
tests: unify some of test-mq*
r12324
$ hg log --template '{rev} {desc}\n'
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 3 imported patch pc
2 [mq]: pb
1 [mq]: pa
Adrian Buehlmann
tests: unify some of test-mq*
r12324 0 base
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 $ hg qfinish -a pc
patch pc finalized without changeset message
Adrian Buehlmann
tests: unify some of test-mq*
r12324
$ hg qapplied
$ hg log --template '{rev} {desc}\n'
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 3 imported patch pc
2 [mq]: pb
1 [mq]: pa
Adrian Buehlmann
tests: unify some of test-mq*
r12324 0 base
$ ls .hg/patches
series
status
Dan Villiom Podlaski Christiansen
mq: silence spurious output....
r12658 qdel -k X && hg qimp -e X used to trigger spurious output with versioned queues
$ hg init --mq
$ hg qimport -r 3
$ hg qpop
popping 3.diff
patch queue now empty
$ hg qdel -k 3.diff
$ hg qimp -e 3.diff
adding 3.diff to series file
$ hg qfinish -a
no patches applied
Pierre-Yves David
mq: prevent traceback when qfinish patches not in series....
r14010
resilience to inconsistency: qfinish -a with applied patches not in series
$ hg qser
3.diff
$ hg qapplied
$ hg qpush
applying 3.diff
patch 3.diff is empty
now at: 3.diff
$ echo next >> base
$ hg qrefresh -d '1 0'
$ echo > .hg/patches/series # remove 3.diff from series to confuse mq
$ hg qfinish -a
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 revision 47dfa8501675 refers to unknown patches: 3.diff
Pierre-Yves David
mq: prevent traceback when qfinish patches not in series....
r14010
more complex state 'both known and unknown patches
$ echo hip >> base
$ hg qnew -f -d '1 0' -m 4 4.diff
$ echo hop >> base
$ hg qnew -f -d '1 0' -m 5 5.diff
$ echo > .hg/patches/series # remove 4.diff and 5.diff from series to confuse mq
$ echo hup >> base
$ hg qnew -f -d '1 0' -m 6 6.diff
Matt Mackall
mq: add a warning about uncommitted changes for qfinish
r15476 $ echo pup > base
Pierre-Yves David
mq: prevent traceback when qfinish patches not in series....
r14010 $ hg qfinish -a
Matt Mackall
mq: add a warning about uncommitted changes for qfinish
r15476 warning: uncommitted changes in the working directory
Peter Arrenbrecht
localrepo: reuse parent manifest in commitctx if no files have changed...
r14162 revision 2b1c98802260 refers to unknown patches: 5.diff
revision 33a6861311c0 refers to unknown patches: 4.diff
Pierre-Yves David
mq: prevent traceback when qfinish patches not in series....
r14010