##// END OF EJS Templates
httprepo: long arguments support (issue2126)...
httprepo: long arguments support (issue2126) Send the command arguments in the HTTP headers. The command is still part of the URL. If the server does not have the 'httpheader' capability, the client will send the command arguments in the URL as it did previously. Web servers typically allow more data to be placed within the headers than in the URL, so this approach will: - Avoid HTTP errors due to using a URL that is too large. - Allow Mercurial to implement a more efficient wire protocol. An alternate approach is to send the arguments as part of the request body. This approach has been rejected because it requires the use of POST requests, so it would break any existing configuration that relies on the request type for authentication or caching. Extensibility: - The header size is provided by the server, which makes it possible to introduce an hgrc setting for it. - The client ignores the capability value after the first comma, which allows more information to be included in the future.

File last commit:

r13272:5ccdca7d default
r14093:ce99d887 default
Show More
test-mq-caches.t
124 lines | 2.5 KiB | text/troff | Tads3Lexer
jfh
move tags.cache and branchheads.cache to a collected cache folder .hg/cache/...
r13272 $ branches=.hg/cache/branchheads
Nicolas Dumazet
tests: unify test-mq-caches
r11897 $ echo '[extensions]' >> $HGRCPATH
$ echo 'mq =' >> $HGRCPATH
$ show_branch_cache()
> {
> # force cache (re)generation
> hg log -r does-not-exist 2> /dev/null
> hg log -r tip --template 'tip: {rev}\n'
> if [ -f $branches ]; then
> sort $branches
> else
> echo No branch cache
> fi
> if [ "$1" = 1 ]; then
> for b in foo bar; do
> hg log -r $b --template "branch $b: "'{rev}\n'
> done
> fi
> }
$ hg init a
$ cd a
$ hg qinit -c
mq patch on an empty repo
$ hg qnew p1
$ show_branch_cache
tip: 0
No branch cache
$ echo > pfile
$ hg add pfile
$ hg qrefresh -m 'patch 1'
$ show_branch_cache
tip: 0
No branch cache
some regular revisions
$ hg qpop
popping p1
patch queue now empty
$ echo foo > foo
$ hg add foo
$ echo foo > .hg/branch
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg ci -m 'branch foo'
Nicolas Dumazet
tests: unify test-mq-caches
r11897
$ echo bar > bar
$ hg add bar
$ echo bar > .hg/branch
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg ci -m 'branch bar'
Nicolas Dumazet
tests: unify test-mq-caches
r11897 $ show_branch_cache
tip: 1
Martin Geisler
tests: remove unneeded -d flags...
r12156 c229711f16da3d7591f89b1b8d963b79bda22714 1
c229711f16da3d7591f89b1b8d963b79bda22714 bar
dc25e3827021582e979f600811852e36cbe57341 foo
Nicolas Dumazet
tests: unify test-mq-caches
r11897
add some mq patches
$ hg qpush
applying p1
now at: p1
$ show_branch_cache
tip: 2
Martin Geisler
tests: remove unneeded -d flags...
r12156 c229711f16da3d7591f89b1b8d963b79bda22714 1
c229711f16da3d7591f89b1b8d963b79bda22714 bar
dc25e3827021582e979f600811852e36cbe57341 foo
Nicolas Dumazet
tests: unify test-mq-caches
r11897
$ hg qnew p2
$ echo foo > .hg/branch
$ echo foo2 >> foo
$ hg qrefresh -m 'patch 2'
$ show_branch_cache 1
tip: 3
Martin Geisler
tests: remove unneeded -d flags...
r12156 c229711f16da3d7591f89b1b8d963b79bda22714 1
c229711f16da3d7591f89b1b8d963b79bda22714 bar
dc25e3827021582e979f600811852e36cbe57341 foo
Nicolas Dumazet
tests: unify test-mq-caches
r11897 branch foo: 3
branch bar: 2
removing the cache
$ rm $branches
$ show_branch_cache 1
tip: 3
Martin Geisler
tests: remove unneeded -d flags...
r12156 c229711f16da3d7591f89b1b8d963b79bda22714 1
c229711f16da3d7591f89b1b8d963b79bda22714 bar
dc25e3827021582e979f600811852e36cbe57341 foo
Nicolas Dumazet
tests: unify test-mq-caches
r11897 branch foo: 3
branch bar: 2
importing rev 1 (the cache now ends in one of the patches)
$ hg qimport -r 1 -n p0
$ show_branch_cache 1
tip: 3
Martin Geisler
tests: remove unneeded -d flags...
r12156 c229711f16da3d7591f89b1b8d963b79bda22714 1
c229711f16da3d7591f89b1b8d963b79bda22714 bar
dc25e3827021582e979f600811852e36cbe57341 foo
Nicolas Dumazet
tests: unify test-mq-caches
r11897 branch foo: 3
branch bar: 2
$ hg log -r qbase --template 'qbase: {rev}\n'
qbase: 1
detect an invalid cache
$ hg qpop -a
popping p2
popping p1
popping p0
patch queue now empty
$ hg qpush -a
applying p0
applying p1
applying p2
now at: p2
$ show_branch_cache
tip: 3
Martin Geisler
tests: remove unneeded -d flags...
r12156 dc25e3827021582e979f600811852e36cbe57341 0
dc25e3827021582e979f600811852e36cbe57341 foo
Nicolas Dumazet
tests: unify test-mq-caches
r11897