Mercurial > hg-stable
view tests/test-mq-qpush-fail @ 11609:890ad9d6a169
log: slowpath: do not read the full changelog
When in the slowpath, we are examining _all_ changesets in revs.
We need to order reads so they happen increasingly for I/O performance.
Increasing windows were used to read changelog backwards in a windowed manner,
reading the changelog forward inside each window. But since no revision range
was specified, it was equivalent to reading the full changelog, even if a
single revision was passed to the commandline.
When --removed is used, we _need_ to scan all changesets, but if we're only
looking for file patterns, this is not necessary and we can stick to
the revspec that was given to us.
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Sun, 04 Jul 2010 18:07:30 +0900 |
parents | 8cb81d75730c |
children |
line wrap: on
line source
#!/bin/sh # Test that qpush cleans things up if it doesn't complete echo "[extensions]" >> $HGRCPATH echo "mq=" >> $HGRCPATH hg init repo cd repo echo foo > foo hg ci -Am 'add foo' touch untracked-file echo 'syntax: glob' > .hgignore echo '.hgignore' >> .hgignore hg qinit echo '% test qpush on empty series' hg qpush hg qnew patch1 echo >> foo hg qrefresh -m 'patch 1' hg qnew patch2 echo bar > bar hg add bar hg qrefresh -m 'patch 2' hg qnew --config 'mq.plain=true' bad-patch echo >> foo hg qrefresh hg qpop -a python -c 'print "\xe9"' > message cat .hg/patches/bad-patch >> message mv message .hg/patches/bad-patch hg qpush -a && echo 'qpush succeded?!' hg parents echo '% bar should be gone; other unknown/ignored files should still be around' hg status -A echo '% preparing qpush of a missing patch' hg qpop -a hg qpush rm .hg/patches/patch2 echo '% now we expect the push to fail, but it should NOT complain about patch1' hg qpush echo '% preparing qpush of missing patch with no patch applied' hg qpop -a rm .hg/patches/patch1 echo '% qpush should fail the same way as below' hg qpush true # happy ending