##// END OF EJS Templates
subrepo: calculate _relpath for hgsubrepo based on self instead of parent...
subrepo: calculate _relpath for hgsubrepo based on self instead of parent Prior to 105758d1b37b, the subrelpath() (now _relpath) for hgsubrepo was calculated by removing the root path of the outermost repo from the root path of the subrepo. Since the root paths use platform specific separators, and the relative path is printed by various commands, the output of these commands require a glob (and check-code.py enforces this). In an effort to be generic to all subrepos, 105758d1b37b started calculating this path based on the parent repo, and then joining the subrepo path in .hgsub. One of the tests in test-subrepo.t creates a subrepo inside a directory, so the path being joined contained '/' instead of '\'. This made the test fail with a '~' status, because the glob is unnecessary[1]. Removing them made the test work, but then check-code complains. We can't just drop the check-code rule, because sub-subrepos are still joined with '\'. Presumably the other subrepo types have this issue as well, but there likely isn't a test with git or svn repos inside a subdirectory. This simply restores the exact _relpath value (and output) for hgsubrepos prior to 105758d1b37b. [1] http://www.selenic.com/pipermail/mercurial-devel/2015-April/068720.html

File last commit:

r16913:f2719b38 default
r24786:56e15db9 default
Show More
test-mq-qdelete.t
197 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
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913 $ cd ..