Mercurial > public > mercurial-scm > hg
comparison tests/test-hgweb-commands.t @ 36612:e89959970a08
wireproto: don't expose changegroupsubset capability if not available
We just marked the changegroupsubset command as only available to
version 1 of the wire transports. There is a capability of the same
name of the command that indicates if the command is supported.
This commit teaches the capabilities code to conditionally emit that
capability depending on whether the command is available for the
current transport.
Most test output is reordering of capabilities. But the limited tests
for version 2 of the SSH protocol do show the capability disappearing.
Differential Revision: https://phab.mercurial-scm.org/D2486
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 27 Feb 2018 15:23:04 -0800 |
parents | ab239e3de23b |
children | 2859c6fa4fc2 |
comparison
equal
deleted
inserted
replaced
36611:6906547c8476 | 36612:e89959970a08 |
---|---|
1912 capabilities | 1912 capabilities |
1913 | 1913 |
1914 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities'; echo | 1914 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities'; echo |
1915 200 Script output follows | 1915 200 Script output follows |
1916 | 1916 |
1917 lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=$BUNDLE2_COMPRESSIONS$ | 1917 lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=$BUNDLE2_COMPRESSIONS$ |
1918 | 1918 |
1919 heads | 1919 heads |
1920 | 1920 |
1921 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=heads' | 1921 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=heads' |
1922 200 Script output follows | 1922 200 Script output follows |
2111 | 2111 |
2112 capabilities | 2112 capabilities |
2113 | 2113 |
2114 (plain version to check the format) | 2114 (plain version to check the format) |
2115 | 2115 |
2116 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | dd ibs=75 count=1 2> /dev/null; echo | 2116 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | dd ibs=76 count=1 2> /dev/null; echo |
2117 200 Script output follows | 2117 200 Script output follows |
2118 | 2118 |
2119 lookup changegroupsubset branchmap pushkey known | 2119 lookup branchmap pushkey known getbundle unbundle |
2120 | 2120 |
2121 (spread version to check the content) | 2121 (spread version to check the content) |
2122 | 2122 |
2123 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n'; echo | 2123 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n'; echo |
2124 200 | 2124 200 |
2125 Script | 2125 Script |
2126 output | 2126 output |
2127 follows | 2127 follows |
2128 | 2128 |
2129 lookup | 2129 lookup |
2130 changegroupsubset | |
2131 branchmap | 2130 branchmap |
2132 pushkey | 2131 pushkey |
2133 known | 2132 known |
2134 getbundle | 2133 getbundle |
2135 unbundlehash | 2134 unbundlehash |
2136 batch | 2135 batch |
2136 changegroupsubset | |
2137 stream-preferred | 2137 stream-preferred |
2138 streamreqs=generaldelta,revlogv1 | 2138 streamreqs=generaldelta,revlogv1 |
2139 $USUAL_BUNDLE2_CAPS_SERVER$ | 2139 $USUAL_BUNDLE2_CAPS_SERVER$ |
2140 unbundle=HG10GZ,HG10BZ,HG10UN | 2140 unbundle=HG10GZ,HG10BZ,HG10UN |
2141 httpheader=1024 | 2141 httpheader=1024 |