Mercurial > public > mercurial-scm > hg
annotate tests/test-http-protocol.t @ 45892:06b64fabf91c
copies: cache the ancestor checking call when tracing copy
A good share of the time spent in this function is spent doing ancestors
checking. To avoid spending time in duplicated call, we cache the result of
calls.
In the slower case, this provide a quite significant performance boost. Below
are the result for a set of selected pairs (many of them pathological):
(And further down is another table that summarize the current state of filelog
based vs changeset base copy tracing)
The benchmark have been configured to be killed after 6 minutes of runtime,
which mean that any detect slower than 2 minutes will be marked as "killed".
This drop some useful information about how much slower these case are? but also
prevent 99% of the benchmark time to be spent on case that can be labelled "very
slow" anyway.
Repo Case Source-Rev Dest-Rev Old-Time New-Time Difference Factor
------------------------------------------------------------------------------------------------------------------------------------
mercurial x_revs_x_added_0_copies ad6b123de1c7 39cfcef4f463 : 0.000044 s, 0.000044 s, +0.000000 s, ? 1.0000
mercurial x_revs_x_added_x_copies 2b1c78674230 0c1d10351869 : 0.000138 s, 0.000138 s, +0.000000 s, ? 1.0000
mercurial x000_revs_x000_added_x_copies 81f8ff2a9bf2 dd3267698d84 : 0.005067 s, 0.005052 s, -0.000015 s, ? 0.9970
pypy x_revs_x_added_0_copies aed021ee8ae8 099ed31b181b : 0.000218 s, 0.000219 s, +0.000001 s, ? 1.0046
pypy x_revs_x000_added_0_copies 4aa4e1f8e19a 359343b9ac0e : 0.000053 s, 0.000055 s, +0.000002 s, ? 1.0377
pypy x_revs_x_added_x_copies ac52eb7bbbb0 72e022663155 : 0.000125 s, 0.000128 s, +0.000003 s, ? 1.0240
pypy x_revs_x00_added_x_copies c3b14617fbd7 ace7255d9a26 : 0.001098 s, 0.001089 s, -0.000009 s, ? 0.9918
pypy x_revs_x000_added_x000_copies df6f7a526b60 a83dc6a2d56f : 0.017546 s, 0.017407 s, -0.000139 s, ? 0.9921
pypy x000_revs_xx00_added_0_copies 89a76aede314 2f22446ff07e : 0.096723 s, 0.094175 s, -0.002548 s, ? 0.9737
pypy x000_revs_x000_added_x_copies 8a3b5bfd266e 2c68e87c3efe : 0.271796 s, 0.238009 s, -0.033787 s, ? 0.8757
pypy x000_revs_x000_added_x000_copies 89a76aede314 7b3dda341c84 : 0.128602 s, 0.125876 s, -0.002726 s, ? 0.9788
pypy x0000_revs_x_added_0_copies d1defd0dc478 c9cb1334cc78 : 7.086742 s, 3.581556 s, -3.505186 s, ? 0.5054
pypy x0000_revs_xx000_added_0_copies bf2c629d0071 4ffed77c095c : 0.016634 s, 0.016721 s, +0.000087 s, ? 1.0052
pypy x0000_revs_xx000_added_x000_copies 08ea3258278e d9fa043f30c0 : 0.254225 s, 0.242367 s, -0.011858 s, ? 0.9534
netbeans x_revs_x_added_0_copies fb0955ffcbcd a01e9239f9e7 : 0.000166 s, 0.000165 s, -0.000001 s, ? 0.9940
netbeans x_revs_x000_added_0_copies 6f360122949f 20eb231cc7d0 : 0.000118 s, 0.000114 s, -0.000004 s, ? 0.9661
netbeans x_revs_x_added_x_copies 1ada3faf6fb6 5a39d12eecf4 : 0.000296 s, 0.000296 s, +0.000000 s, ? 1.0000
netbeans x_revs_x00_added_x_copies 35be93ba1e2c 9eec5e90c05f : 0.001137 s, 0.001124 s, -0.000013 s, ? 0.9886
netbeans x000_revs_xx00_added_0_copies eac3045b4fdd 51d4ae7f1290 : 0.014133 s, 0.013060 s, -0.001073 s, ? 0.9241
netbeans x000_revs_x000_added_x_copies e2063d266acd 6081d72689dc : 0.016988 s, 0.017112 s, +0.000124 s, ? 1.0073
netbeans x000_revs_x000_added_x000_copies ff453e9fee32 411350406ec2 : 0.676361 s, 0.660350 s, -0.016011 s, ? 0.9763
netbeans x0000_revs_xx000_added_x000_copies 588c2d1ced70 1aad62e59ddd : 12.515149 s, 10.032499 s, -2.482650 s, ? 0.8016
mozilla-central x_revs_x_added_0_copies 3697f962bb7b 7015fcdd43a2 : 0.000186 s, 0.000189 s, +0.000003 s, ? 1.0161
mozilla-central x_revs_x000_added_0_copies dd390860c6c9 40d0c5bed75d : 0.000459 s, 0.000462 s, +0.000003 s, ? 1.0065
mozilla-central x_revs_x_added_x_copies 8d198483ae3b 14207ffc2b2f : 0.000273 s, 0.000270 s, -0.000003 s, ? 0.9890
mozilla-central x_revs_x00_added_x_copies 98cbc58cc6bc 446a150332c3 : 0.001503 s, 0.001474 s, -0.000029 s, ? 0.9807
mozilla-central x_revs_x000_added_x000_copies 3c684b4b8f68 0a5e72d1b479 : 0.004862 s, 0.004806 s, -0.000056 s, ? 0.9885
mozilla-central x_revs_x0000_added_x0000_copies effb563bb7e5 c07a39dc4e80 : 0.088291 s, 0.085150 s, -0.003141 s, ? 0.9644
mozilla-central x000_revs_xx00_added_0_copies 6100d773079a 04a55431795e : 0.007113 s, 0.007064 s, -0.000049 s, ? 0.9931
mozilla-central x000_revs_x000_added_x_copies 9f17a6fc04f9 2d37b966abed : 0.004687 s, 0.004741 s, +0.000054 s, ? 1.0115
mozilla-central x000_revs_x000_added_x000_copies 7c97034feb78 4407bd0c6330 : 0.198710 s, 0.190133 s, -0.008577 s, ? 0.9568
mozilla-central x0000_revs_xx000_added_0_copies 9eec5917337d 67118cc6dcad : 0.036068 s, 0.035651 s, -0.000417 s, ? 0.9884
mozilla-central x0000_revs_xx000_added_x000_copies f78c615a656c 96a38b690156 : 0.465362 s, 0.440694 s, -0.024668 s, ? 0.9470
mozilla-central x00000_revs_x0000_added_x0000_copies 6832ae71433c 4c222a1d9a00 : 24.519684 s, 18.454163 s, -6.065521 s, ? 0.7526
mozilla-central x00000_revs_x00000_added_x000_copies 76caed42cf7c 1daa622bbe42 : 42.711897 s, 31.562719 s, -11.149178 s, ? 0.7390
mozilla-try x_revs_x_added_0_copies aaf6dde0deb8 9790f499805a : 0.001201 s, 0.001189 s, -0.000012 s, ? 0.9900
mozilla-try x_revs_x000_added_0_copies d8d0222927b4 5bb8ce8c7450 : 0.001216 s, 0.001204 s, -0.000012 s, ? 0.9901
mozilla-try x_revs_x_added_x_copies 092fcca11bdb 936255a0384a : 0.000595 s, 0.000586 s, -0.000009 s, ? 0.9849
mozilla-try x_revs_x00_added_x_copies b53d2fadbdb5 017afae788ec : 0.001856 s, 0.001845 s, -0.000011 s, ? 0.9941
mozilla-try x_revs_x000_added_x000_copies 20408ad61ce5 6f0ee96e21ad : 0.064936 s, 0.063822 s, -0.001114 s, ? 0.9828
mozilla-try x_revs_x0000_added_x0000_copies effb563bb7e5 c07a39dc4e80 : 0.090601 s, 0.088038 s, -0.002563 s, ? 0.9717
mozilla-try x000_revs_xx00_added_0_copies 6100d773079a 04a55431795e : 0.007510 s, 0.007389 s, -0.000121 s, ? 0.9839
mozilla-try x000_revs_x000_added_x_copies 9f17a6fc04f9 2d37b966abed : 0.004911 s, 0.004868 s, -0.000043 s, ? 0.9912
mozilla-try x000_revs_x000_added_x000_copies 1346fd0130e4 4c65cbdabc1f : 0.233231 s, 0.222450 s, -0.010781 s, ? 0.9538
mozilla-try x0000_revs_x_added_0_copies 63519bfd42ee a36a2a865d92 : 0.419989 s, 0.370675 s, -0.049314 s, ? 0.8826
mozilla-try x0000_revs_x_added_x_copies 9fe69ff0762d bcabf2a78927 : 0.401521 s, 0.358020 s, -0.043501 s, ? 0.8917
mozilla-try x0000_revs_xx000_added_x_copies 156f6e2674f2 4d0f2c178e66 : 0.179555 s, 0.145235 s, -0.034320 s, ? 0.8089
mozilla-try x0000_revs_xx000_added_0_copies 9eec5917337d 67118cc6dcad : 0.038004 s, 0.037606 s, -0.000398 s, ? 0.9895
mozilla-try x0000_revs_xx000_added_x000_copies 89294cd501d9 7ccb2fc7ccb5 : 52.838482 s, 7.382439 s, -45.456043 s, ? 0.1397
mozilla-try x0000_revs_x0000_added_x0000_copies e928c65095ed e951f4ad123a : 8.705874 s, 7.273506 s, -1.432368 s, ? 0.8355
mozilla-try x00000_revs_x00000_added_0_copies dc8a3ca7010e d16fde900c9c : 1.126708 s, 1.074593 s, -0.052115 s, ? 0.9537
mozilla-try x00000_revs_x0000_added_x0000_copies 8d3fafa80d4b eb884023b810 : 83.854020 s, 27.746195 s, -56.107825 s, ? 0.3309
Below is a table comparing the runtime of the current "filelog centric"
algorithm, with the "changeset centric" one, we just modified.
The changeset centric algorithm is a significant win in many scenario, but they
are still various cases where it is quite slower. When many revision has to be
considered the cost of retrieving the copy information, creating new
dictionaries, merging dictionaries and checking if revision are ancestors of
each other can slow things down.
The rest of this series, will introduce a rust version of the copy tracing code
to deal with most of theses issues.
Repo Case Source-Rev Dest-Rev filelog sidedata Difference Factor
---------------------------------------------------------------------------------------------------------------------------------------
mercurial x_revs_x_added_0_copies ad6b123de1c7 39cfcef4f463 : 0.000914 s, 0.000044 s, - 0.000870 s, ? 0.048140
mercurial x_revs_x_added_x_copies 2b1c78674230 0c1d10351869 : 0.001812 s, 0.000138 s, - 0.001674 s, ? 0.076159
mercurial x000_revs_x000_added_x_copies 81f8ff2a9bf2 dd3267698d84 : 0.017954 s, 0.005052 s, - 0.012902 s, ? 0.281386
pypy x_revs_x_added_0_copies aed021ee8ae8 099ed31b181b : 0.001509 s, 0.000219 s, - 0.001290 s, ? 0.145129
pypy x_revs_x000_added_0_copies 4aa4e1f8e19a 359343b9ac0e : 0.206881 s, 0.000055 s, - 0.206826 s, ? 0.000266
pypy x_revs_x_added_x_copies ac52eb7bbbb0 72e022663155 : 0.016951 s, 0.000128 s, - 0.016823 s, ? 0.007551
pypy x_revs_x00_added_x_copies c3b14617fbd7 ace7255d9a26 : 0.019096 s, 0.001089 s, - 0.018007 s, ? 0.057028
pypy x_revs_x000_added_x000_copies df6f7a526b60 a83dc6a2d56f : 0.762506 s, 0.017407 s, - 0.745099 s, ? 0.022829
pypy x000_revs_xx00_added_0_copies 89a76aede314 2f22446ff07e : 1.179211 s, 0.094175 s, - 1.085036 s, ? 0.079863
pypy x000_revs_x000_added_x_copies 8a3b5bfd266e 2c68e87c3efe : 1.249058 s, 0.238009 s, - 1.011049 s, ? 0.190551
pypy x000_revs_x000_added_x000_copies 89a76aede314 7b3dda341c84 : 1.614107 s, 0.125876 s, - 1.488231 s, ? 0.077985
pypy x0000_revs_x_added_0_copies d1defd0dc478 c9cb1334cc78 : 0.001064 s, 3.581556 s, + 3.580492 s, ? 3366.124060
pypy x0000_revs_xx000_added_0_copies bf2c629d0071 4ffed77c095c : 1.061275 s, 0.016721 s, - 1.044554 s, ? 0.015756
pypy x0000_revs_xx000_added_x000_copies 08ea3258278e d9fa043f30c0 : 1.341119 s, 0.242367 s, - 1.098752 s, ? 0.180720
netbeans x_revs_x_added_0_copies fb0955ffcbcd a01e9239f9e7 : 0.027803 s, 0.000165 s, - 0.027638 s, ? 0.005935
netbeans x_revs_x000_added_0_copies 6f360122949f 20eb231cc7d0 : 0.130014 s, 0.000114 s, - 0.129900 s, ? 0.000877
netbeans x_revs_x_added_x_copies 1ada3faf6fb6 5a39d12eecf4 : 0.024990 s, 0.000296 s, - 0.024694 s, ? 0.011845
netbeans x_revs_x00_added_x_copies 35be93ba1e2c 9eec5e90c05f : 0.052201 s, 0.001124 s, - 0.051077 s, ? 0.021532
netbeans x000_revs_xx00_added_0_copies eac3045b4fdd 51d4ae7f1290 : 0.037642 s, 0.013060 s, - 0.024582 s, ? 0.346953
netbeans x000_revs_x000_added_x_copies e2063d266acd 6081d72689dc : 0.197086 s, 0.017112 s, - 0.179974 s, ? 0.086825
netbeans x000_revs_x000_added_x000_copies ff453e9fee32 411350406ec2 : 0.935148 s, 0.660350 s, - 0.274798 s, ? 0.706145
netbeans x0000_revs_xx000_added_x000_copies 588c2d1ced70 1aad62e59ddd : 3.920674 s, 10.032499 s, + 6.111825 s, ? 2.558871
mozilla-central x_revs_x_added_0_copies 3697f962bb7b 7015fcdd43a2 : 0.024232 s, 0.000189 s, - 0.024043 s, ? 0.007800
mozilla-central x_revs_x000_added_0_copies dd390860c6c9 40d0c5bed75d : 0.141483 s, 0.000462 s, - 0.141021 s, ? 0.003265
mozilla-central x_revs_x_added_x_copies 8d198483ae3b 14207ffc2b2f : 0.025775 s, 0.000270 s, - 0.025505 s, ? 0.010475
mozilla-central x_revs_x00_added_x_copies 98cbc58cc6bc 446a150332c3 : 0.084922 s, 0.001474 s, - 0.083448 s, ? 0.017357
mozilla-central x_revs_x000_added_x000_copies 3c684b4b8f68 0a5e72d1b479 : 0.194784 s, 0.004806 s, - 0.189978 s, ? 0.024673
mozilla-central x_revs_x0000_added_x0000_copies effb563bb7e5 c07a39dc4e80 : 2.161103 s, 0.085150 s, - 2.075953 s, ? 0.039401
mozilla-central x000_revs_xx00_added_0_copies 6100d773079a 04a55431795e : 0.089347 s, 0.007064 s, - 0.082283 s, ? 0.079063
mozilla-central x000_revs_x000_added_x_copies 9f17a6fc04f9 2d37b966abed : 0.732171 s, 0.004741 s, - 0.727430 s, ? 0.006475
mozilla-central x000_revs_x000_added_x000_copies 7c97034feb78 4407bd0c6330 : 1.157287 s, 0.190133 s, - 0.967154 s, ? 0.164292
mozilla-central x0000_revs_xx000_added_0_copies 9eec5917337d 67118cc6dcad : 6.726568 s, 0.035651 s, - 6.690917 s, ? 0.005300
mozilla-central x0000_revs_xx000_added_x000_copies f78c615a656c 96a38b690156 : 3.266229 s, 0.440694 s, - 2.825535 s, ? 0.134924
mozilla-central x00000_revs_x0000_added_x0000_copies 6832ae71433c 4c222a1d9a00 : 15.860534 s, 18.454163 s, + 2.593629 s, ? 1.163527
mozilla-central x00000_revs_x00000_added_x000_copies 76caed42cf7c 1daa622bbe42 : 20.450475 s, 31.562719 s, +11.112244 s, ? 1.543373
mozilla-try x_revs_x_added_0_copies aaf6dde0deb8 9790f499805a : 0.080442 s, 0.001189 s, - 0.079253 s, ? 0.014781
mozilla-try x_revs_x000_added_0_copies d8d0222927b4 5bb8ce8c7450 : 0.497672 s, 0.001204 s, - 0.496468 s, ? 0.002419
mozilla-try x_revs_x_added_x_copies 092fcca11bdb 936255a0384a : 0.021183 s, 0.000586 s, - 0.020597 s, ? 0.027664
mozilla-try x_revs_x00_added_x_copies b53d2fadbdb5 017afae788ec : 0.230991 s, 0.001845 s, - 0.229146 s, ? 0.007987
mozilla-try x_revs_x000_added_x000_copies 20408ad61ce5 6f0ee96e21ad : 1.118461 s, 0.063822 s, - 1.054639 s, ? 0.057062
mozilla-try x_revs_x0000_added_x0000_copies effb563bb7e5 c07a39dc4e80 : 2.206083 s, 0.088038 s, - 2.118045 s, ? 0.039907
mozilla-try x000_revs_xx00_added_0_copies 6100d773079a 04a55431795e : 0.089404 s, 0.007389 s, - 0.082015 s, ? 0.082647
mozilla-try x000_revs_x000_added_x_copies 9f17a6fc04f9 2d37b966abed : 0.733043 s, 0.004868 s, - 0.728175 s, ? 0.006641
mozilla-try x000_revs_x000_added_x000_copies 1346fd0130e4 4c65cbdabc1f : 1.163367 s, 0.222450 s, - 0.940917 s, ? 0.191212
mozilla-try x0000_revs_x_added_0_copies 63519bfd42ee a36a2a865d92 : 0.085456 s, 0.370675 s, + 0.285219 s, ? 4.337612
mozilla-try x0000_revs_x_added_x_copies 9fe69ff0762d bcabf2a78927 : 0.083601 s, 0.358020 s, + 0.274419 s, ? 4.282485
mozilla-try x0000_revs_xx000_added_x_copies 156f6e2674f2 4d0f2c178e66 : 7.366614 s, 0.145235 s, - 7.221379 s, ? 0.019715
mozilla-try x0000_revs_xx000_added_0_copies 9eec5917337d 67118cc6dcad : 6.664464 s, 0.037606 s, - 6.626858 s, ? 0.005643
mozilla-try x0000_revs_xx000_added_x000_copies 89294cd501d9 7ccb2fc7ccb5 : 7.467836 s, 7.382439 s, - 0.085397 s, ? 0.988565
mozilla-try x0000_revs_x0000_added_x0000_copies e928c65095ed e951f4ad123a : 9.801294 s, 7.273506 s, - 2.527788 s, ? 0.742097
mozilla-try x00000_revs_x_added_0_copies 6a320851d377 1ebb79acd503 : 0.091886 s, killed
mozilla-try x00000_revs_x00000_added_0_copies dc8a3ca7010e d16fde900c9c : 26.491140 s, 1.074593 s, -25.416547 s, ? 0.040564
mozilla-try x00000_revs_x_added_x_copies 5173c4b6f97c 95d83ee7242d : 0.092863 s, killed
mozilla-try x00000_revs_x000_added_x_copies 9126823d0e9c ca82787bb23c : 0.226823 s, killed
mozilla-try x00000_revs_x0000_added_x0000_copies 8d3fafa80d4b eb884023b810 : 18.914630 s, 27.746195 s, + 8.831565 s, ? 1.466917
mozilla-try x00000_revs_x00000_added_x0000_copies 1b661134e2ca 1ae03d022d6d : 21.198903 s, killed
mozilla-try x00000_revs_x00000_added_x000_copies 9b2a99adc05e 8e29777b48e6 : 24.952268 s, killed
Differential Revision: https://phab.mercurial-scm.org/D9296
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 02 Nov 2020 11:03:56 +0100 |
parents | edc8504bc26b |
children | 7015b0232c5e |
rev | line source |
---|---|
38021
538e850ae737
tests: mark tests that fail when using chg as #require no-chg
Kyle Lippincott <spectral@google.com>
parents:
37832
diff
changeset
|
1 #require no-chg |
538e850ae737
tests: mark tests that fail when using chg as #require no-chg
Kyle Lippincott <spectral@google.com>
parents:
37832
diff
changeset
|
2 |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
3 $ . $TESTDIR/wireprotohelpers.sh |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
4 |
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
5 $ cat >> $HGRCPATH << EOF |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
6 > [web] |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
7 > push_ssl = false |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
8 > allow_push = * |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
9 > EOF |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
10 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
11 $ hg init server |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
12 $ cd server |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
13 $ touch a |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
14 $ hg -q commit -A -m initial |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
15 $ cd .. |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
16 |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
31008
diff
changeset
|
17 $ hg serve -R server -p $HGPORT -d --pid-file hg.pid |
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
18 $ cat hg.pid >> $DAEMON_PIDS |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
19 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
20 compression formats are advertised in compression capability |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
21 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
22 #if zstd |
31008 | 23 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zstd,zlib$' > /dev/null |
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
24 #else |
31008 | 25 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zlib$' > /dev/null |
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
26 #endif |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
27 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
28 $ killdaemons.py |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
29 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
30 server.compressionengines can replace engines list wholesale |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
31 |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
31008
diff
changeset
|
32 $ hg serve --config server.compressionengines=none -R server -p $HGPORT -d --pid-file hg.pid |
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
33 $ cat hg.pid > $DAEMON_PIDS |
31008 | 34 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none$' > /dev/null |
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
35 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
36 $ killdaemons.py |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
37 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
38 Order of engines can also change |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
39 |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
31008
diff
changeset
|
40 $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid |
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
41 $ cat hg.pid > $DAEMON_PIDS |
31008 | 42 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none,zlib$' > /dev/null |
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
43 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
44 $ killdaemons.py |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
45 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
46 Start a default server again |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
47 |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
31008
diff
changeset
|
48 $ hg serve -R server -p $HGPORT -d --pid-file hg.pid |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
49 $ cat hg.pid > $DAEMON_PIDS |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
50 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
51 Server should send application/mercurial-0.1 to clients if no Accept is used |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
52 |
31008 | 53 $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
54 200 Script output follows |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
55 content-type: application/mercurial-0.1 |
37008
16203c6079e7
tests: use $HTTP_DATE$ for Date header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34483
diff
changeset
|
56 date: $HTTP_DATE$ |
37009
5890e5872f36
hgweb: allow defining Server response header for HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37008
diff
changeset
|
57 server: testing stub value |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
58 transfer-encoding: chunked |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
59 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
60 Server should send application/mercurial-0.1 when client says it wants it |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
61 |
31008 | 62 $ get-with-headers.py --hgproto '0.1' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
63 200 Script output follows |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
64 content-type: application/mercurial-0.1 |
37008
16203c6079e7
tests: use $HTTP_DATE$ for Date header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34483
diff
changeset
|
65 date: $HTTP_DATE$ |
37009
5890e5872f36
hgweb: allow defining Server response header for HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37008
diff
changeset
|
66 server: testing stub value |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
67 transfer-encoding: chunked |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
68 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
69 Server should send application/mercurial-0.2 when client says it wants it |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
70 |
31008 | 71 $ get-with-headers.py --hgproto '0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
72 200 Script output follows |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
73 content-type: application/mercurial-0.2 |
37008
16203c6079e7
tests: use $HTTP_DATE$ for Date header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34483
diff
changeset
|
74 date: $HTTP_DATE$ |
37009
5890e5872f36
hgweb: allow defining Server response header for HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37008
diff
changeset
|
75 server: testing stub value |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
76 transfer-encoding: chunked |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
77 |
31008 | 78 $ get-with-headers.py --hgproto '0.1 0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
79 200 Script output follows |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
80 content-type: application/mercurial-0.2 |
37008
16203c6079e7
tests: use $HTTP_DATE$ for Date header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34483
diff
changeset
|
81 date: $HTTP_DATE$ |
37009
5890e5872f36
hgweb: allow defining Server response header for HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37008
diff
changeset
|
82 server: testing stub value |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
83 transfer-encoding: chunked |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
84 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
85 Requesting a compression format that server doesn't support results will fall back to 0.1 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
86 |
31008 | 87 $ get-with-headers.py --hgproto '0.2 comp=aa' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
88 200 Script output follows |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
89 content-type: application/mercurial-0.1 |
37008
16203c6079e7
tests: use $HTTP_DATE$ for Date header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34483
diff
changeset
|
90 date: $HTTP_DATE$ |
37009
5890e5872f36
hgweb: allow defining Server response header for HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37008
diff
changeset
|
91 server: testing stub value |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
92 transfer-encoding: chunked |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
93 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
94 #if zstd |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
95 zstd is used if available |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
96 |
31008 | 97 $ get-with-headers.py --hgproto '0.2 comp=zstd' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
98 $ f --size --hexdump --bytes 36 --sha1 resp |
42070
675775c33ab6
zstandard: vendor python-zstandard 0.11
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41502
diff
changeset
|
99 resp: size=248, sha1=f11b5c098c638068b3d5fe2f9e6241bf5228 |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
100 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
101 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 73 74 64 |t follows...zstd| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
102 0020: 28 b5 2f fd |(./.| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
103 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
104 #endif |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
105 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
106 application/mercurial-0.2 is not yet used on non-streaming responses |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
107 |
31008 | 108 $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=heads' - |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
109 200 Script output follows |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
110 content-length: 41 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
111 content-type: application/mercurial-0.1 |
37008
16203c6079e7
tests: use $HTTP_DATE$ for Date header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34483
diff
changeset
|
112 date: $HTTP_DATE$ |
37009
5890e5872f36
hgweb: allow defining Server response header for HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37008
diff
changeset
|
113 server: testing stub value |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
114 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
115 e93700bd72895c5addab234c56d4024b487a362f |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
116 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
117 Now test protocol preference usage |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
118 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
119 $ killdaemons.py |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
31008
diff
changeset
|
120 $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
121 $ cat hg.pid > $DAEMON_PIDS |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
122 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
123 No Accept will send 0.1+zlib, even though "none" is preferred b/c "none" isn't supported on 0.1 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
124 |
31008 | 125 $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' Content-Type |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
126 200 Script output follows |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
127 content-type: application/mercurial-0.1 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
128 |
31008 | 129 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
130 $ f --size --hexdump --bytes 28 --sha1 resp |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
131 resp: size=227, sha1=35a4c074da74f32f5440da3cbf04 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
132 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
133 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
134 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
135 Explicit 0.1 will send zlib because "none" isn't supported on 0.1 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
136 |
31008 | 137 $ get-with-headers.py --hgproto '0.1' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
138 $ f --size --hexdump --bytes 28 --sha1 resp |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
139 resp: size=227, sha1=35a4c074da74f32f5440da3cbf04 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
140 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
141 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
142 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
143 0.2 with no compression will get "none" because that is server's preference |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
144 (spec says ZL and UN are implicitly supported) |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
145 |
31008 | 146 $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
147 $ f --size --hexdump --bytes 32 --sha1 resp |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
148 resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
149 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
150 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
151 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
152 Client receives server preference even if local order doesn't match |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
153 |
31008 | 154 $ get-with-headers.py --hgproto '0.2 comp=zlib,none' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
155 $ f --size --hexdump --bytes 32 --sha1 resp |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
156 resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
157 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
158 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
159 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
160 Client receives only supported format even if not server preferred format |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
161 |
31008 | 162 $ get-with-headers.py --hgproto '0.2 comp=zlib' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
163 $ f --size --hexdump --bytes 33 --sha1 resp |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
164 resp: size=232, sha1=a1c727f0c9693ca15742a75c30419bc36 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
165 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
166 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 6c 69 62 |t follows...zlib| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
167 0020: 78 |x| |
37012
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
168 |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
169 $ killdaemons.py |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
170 $ cd .. |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
171 |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
172 Test listkeys for listing namespaces |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
173 |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
174 $ hg init empty |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
175 $ hg -R empty serve -p $HGPORT -d --pid-file hg.pid |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
176 $ cat hg.pid > $DAEMON_PIDS |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
177 |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
178 $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
179 > command listkeys |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
180 > namespace namespaces |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
181 > EOF |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
182 s> setsockopt(6, 1, 1) -> None (?) |
37012
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
183 s> GET /?cmd=capabilities HTTP/1.1\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
184 s> Accept-Encoding: identity\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
185 s> accept: application/mercurial-0.1\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
186 s> host: $LOCALIP:$HGPORT\r\n (glob) |
37483
61e405fb6372
wireproto: crude support for version 2 HTTP peer
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37413
diff
changeset
|
187 s> user-agent: Mercurial debugwireproto\r\n |
37012
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
188 s> \r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
189 s> makefile('rb', None) |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
190 s> HTTP/1.1 200 Script output follows\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
191 s> Server: testing stub value\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
192 s> Date: $HTTP_DATE$\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
193 s> Content-Type: application/mercurial-0.1\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
194 s> Content-Length: *\r\n (glob) |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
195 s> \r\n |
40893
4062ba2deb4e
test: enable sparse-revlog for test-http-protocol.t
Boris Feld <boris.feld@octobus.net>
parents:
40391
diff
changeset
|
196 s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
37012
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
197 sending listkeys command |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
198 s> setsockopt(6, 1, 1) -> None (?) |
37012
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
199 s> GET /?cmd=listkeys HTTP/1.1\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
200 s> Accept-Encoding: identity\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
201 s> vary: X-HgArg-1,X-HgProto-1\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
202 s> x-hgarg-1: namespace=namespaces\r\n |
37498
aacfca6f9767
wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents:
37483
diff
changeset
|
203 s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
37012
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
204 s> accept: application/mercurial-0.1\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
205 s> host: $LOCALIP:$HGPORT\r\n (glob) |
37483
61e405fb6372
wireproto: crude support for version 2 HTTP peer
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37413
diff
changeset
|
206 s> user-agent: Mercurial debugwireproto\r\n |
37012
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
207 s> \r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
208 s> makefile('rb', None) |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
209 s> HTTP/1.1 200 Script output follows\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
210 s> Server: testing stub value\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
211 s> Date: $HTTP_DATE$\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
212 s> Content-Type: application/mercurial-0.1\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
213 s> Content-Length: 30\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
214 s> \r\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
215 s> bookmarks\t\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
216 s> namespaces\t\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
217 s> phases\t |
39378
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
218 response: { |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
219 b'bookmarks': b'', |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
220 b'namespaces': b'', |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
221 b'phases': b'' |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
222 } |
40034
393e44324037
httppeer: report http statistics
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
223 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
37012
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
224 |
37013
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
225 Same thing, but with "httprequest" command |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
226 |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
227 $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
228 > httprequest GET ?cmd=listkeys |
37045
a708e1e4d7a8
url: support suppressing Accept header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37044
diff
changeset
|
229 > user-agent: test |
37013
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
230 > x-hgarg-1: namespace=namespaces |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
231 > EOF |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
232 using raw connection to peer |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
233 s> setsockopt(6, 1, 1) -> None (?) |
37013
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
234 s> GET /?cmd=listkeys HTTP/1.1\r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
235 s> Accept-Encoding: identity\r\n |
37045
a708e1e4d7a8
url: support suppressing Accept header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37044
diff
changeset
|
236 s> user-agent: test\r\n |
37013
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
237 s> x-hgarg-1: namespace=namespaces\r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
238 s> host: $LOCALIP:$HGPORT\r\n (glob) |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
239 s> \r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
240 s> makefile('rb', None) |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
241 s> HTTP/1.1 200 Script output follows\r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
242 s> Server: testing stub value\r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
243 s> Date: $HTTP_DATE$\r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
244 s> Content-Type: application/mercurial-0.1\r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
245 s> Content-Length: 30\r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
246 s> \r\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
247 s> bookmarks\t\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
248 s> namespaces\t\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
249 s> phases\t |
37013
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
250 |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
251 Client with HTTPv2 enabled advertises that and gets old capabilities response from old server |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
252 |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
253 $ hg --config experimental.httppeer.advertise-v2=true --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
254 > command heads |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
255 > EOF |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
256 s> setsockopt(6, 1, 1) -> None (?) |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
257 s> GET /?cmd=capabilities HTTP/1.1\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
258 s> Accept-Encoding: identity\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
259 s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
260 s> x-hgproto-1: cbor\r\n |
40176
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
261 s> x-hgupgrade-1: exp-http-v2-0003\r\n |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
262 s> accept: application/mercurial-0.1\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
263 s> host: $LOCALIP:$HGPORT\r\n (glob) |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
264 s> user-agent: Mercurial debugwireproto\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
265 s> \r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
266 s> makefile('rb', None) |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
267 s> HTTP/1.1 200 Script output follows\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
268 s> Server: testing stub value\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
269 s> Date: $HTTP_DATE$\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
270 s> Content-Type: application/mercurial-0.1\r\n |
37820
143632f82479
tests: glob away content-length changes relating to missing zstd bindings
Augie Fackler <augie@google.com>
parents:
37725
diff
changeset
|
271 s> Content-Length: *\r\n (glob) |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
272 s> \r\n |
40893
4062ba2deb4e
test: enable sparse-revlog for test-http-protocol.t
Boris Feld <boris.feld@octobus.net>
parents:
40391
diff
changeset
|
273 s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
274 sending heads command |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
275 s> setsockopt(6, 1, 1) -> None (?) |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
276 s> GET /?cmd=heads HTTP/1.1\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
277 s> Accept-Encoding: identity\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
278 s> vary: X-HgProto-1\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
279 s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
280 s> accept: application/mercurial-0.1\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
281 s> host: $LOCALIP:$HGPORT\r\n (glob) |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
282 s> user-agent: Mercurial debugwireproto\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
283 s> \r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
284 s> makefile('rb', None) |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
285 s> HTTP/1.1 200 Script output follows\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
286 s> Server: testing stub value\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
287 s> Date: $HTTP_DATE$\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
288 s> Content-Type: application/mercurial-0.1\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
289 s> Content-Length: 41\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
290 s> \r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
291 s> 0000000000000000000000000000000000000000\n |
39378
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
292 response: [ |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
293 b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
294 ] |
40034
393e44324037
httppeer: report http statistics
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
295 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
296 |
37012
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37009
diff
changeset
|
297 $ killdaemons.py |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
298 $ enablehttpv2 empty |
37822
da07c781aba9
tests: explicitly define compression engines for tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37820
diff
changeset
|
299 $ hg --config server.compressionengines=zlib -R empty serve -p $HGPORT -d --pid-file hg.pid |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
300 $ cat hg.pid > $DAEMON_PIDS |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
301 |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
302 Client with HTTPv2 enabled automatically upgrades if the server supports it |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
303 |
40133
762ef19a07e3
wireprotov2: send protocol settings frame from client
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
304 $ hg --config experimental.httppeer.advertise-v2=true --config experimental.httppeer.v2-encoder-order=identity --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
305 > command heads |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
306 > EOF |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
307 s> setsockopt(6, 1, 1) -> None (?) |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
308 s> GET /?cmd=capabilities HTTP/1.1\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
309 s> Accept-Encoding: identity\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
310 s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
311 s> x-hgproto-1: cbor\r\n |
40176
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
312 s> x-hgupgrade-1: exp-http-v2-0003\r\n |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
313 s> accept: application/mercurial-0.1\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
314 s> host: $LOCALIP:$HGPORT\r\n (glob) |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
315 s> user-agent: Mercurial debugwireproto\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
316 s> \r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
317 s> makefile('rb', None) |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
318 s> HTTP/1.1 200 OK\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
319 s> Server: testing stub value\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
320 s> Date: $HTTP_DATE$\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
321 s> Content-Type: application/mercurial-cbor\r\n |
37645
72b0982cd509
debugcommands: perform handshake when obtaining httpv2 peer
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37558
diff
changeset
|
322 s> Content-Length: *\r\n (glob) |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
323 s> \r\n |
44412
edc8504bc26b
exchange: turn on option that makes concurrent pushes work better
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
42070
diff
changeset
|
324 s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa4Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogNv1capabilitiesY\x01\xf7batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
325 sending heads command |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
326 s> setsockopt(6, 1, 1) -> None (?) |
40176
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
327 s> POST /api/exp-http-v2-0003/ro/heads HTTP/1.1\r\n |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
328 s> Accept-Encoding: identity\r\n |
40133
762ef19a07e3
wireprotov2: send protocol settings frame from client
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
329 s> accept: application/mercurial-exp-framing-0006\r\n |
762ef19a07e3
wireprotov2: send protocol settings frame from client
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
330 s> content-type: application/mercurial-exp-framing-0006\r\n |
762ef19a07e3
wireprotov2: send protocol settings frame from client
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
331 s> content-length: 56\r\n |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
332 s> host: $LOCALIP:$HGPORT\r\n (glob) |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
333 s> user-agent: Mercurial debugwireproto\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
334 s> \r\n |
40133
762ef19a07e3
wireprotov2: send protocol settings frame from client
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
335 s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity\x0c\x00\x00\x01\x00\x01\x00\x11\xa1DnameEheads |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
336 s> makefile('rb', None) |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
337 s> HTTP/1.1 200 OK\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
338 s> Server: testing stub value\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
339 s> Date: $HTTP_DATE$\r\n |
40133
762ef19a07e3
wireprotov2: send protocol settings frame from client
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
340 s> Content-Type: application/mercurial-exp-framing-0006\r\n |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
341 s> Transfer-Encoding: chunked\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
342 s> \r\n |
40138
b5bf3dd6ec5b
wireprotov2: send content encoded frames from server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40133
diff
changeset
|
343 s> 11\r\n |
b5bf3dd6ec5b
wireprotov2: send content encoded frames from server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40133
diff
changeset
|
344 s> \t\x00\x00\x01\x00\x02\x01\x92 |
b5bf3dd6ec5b
wireprotov2: send content encoded frames from server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40133
diff
changeset
|
345 s> Hidentity |
b5bf3dd6ec5b
wireprotov2: send content encoded frames from server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40133
diff
changeset
|
346 s> \r\n |
39559
07b58266bce3
wireprotov2: implement commands as a generator of objects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39447
diff
changeset
|
347 s> 13\r\n |
40138
b5bf3dd6ec5b
wireprotov2: send content encoded frames from server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40133
diff
changeset
|
348 s> \x0b\x00\x00\x01\x00\x02\x041 |
39559
07b58266bce3
wireprotov2: implement commands as a generator of objects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39447
diff
changeset
|
349 s> \xa1FstatusBok |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
350 s> \r\n |
39559
07b58266bce3
wireprotov2: implement commands as a generator of objects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39447
diff
changeset
|
351 s> 1e\r\n |
40138
b5bf3dd6ec5b
wireprotov2: send content encoded frames from server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40133
diff
changeset
|
352 s> \x16\x00\x00\x01\x00\x02\x041 |
39559
07b58266bce3
wireprotov2: implement commands as a generator of objects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39447
diff
changeset
|
353 s> \x81T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 |
07b58266bce3
wireprotov2: implement commands as a generator of objects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39447
diff
changeset
|
354 s> \r\n |
07b58266bce3
wireprotov2: implement commands as a generator of objects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39447
diff
changeset
|
355 s> 8\r\n |
07b58266bce3
wireprotov2: implement commands as a generator of objects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39447
diff
changeset
|
356 s> \x00\x00\x00\x01\x00\x02\x002 |
07b58266bce3
wireprotov2: implement commands as a generator of objects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39447
diff
changeset
|
357 s> \r\n |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
358 s> 0\r\n |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
359 s> \r\n |
39378
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
360 response: [ |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
361 b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
362 ] |
40034
393e44324037
httppeer: report http statistics
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
363 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
37558
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
364 |
8a73132214a3
httppeer: support protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37556
diff
changeset
|
365 $ killdaemons.py |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
366 |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
367 HTTP client follows HTTP redirect on handshake to new repo |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
368 |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
369 $ cd $TESTTMP |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
370 |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
371 $ hg init redirector |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
372 $ hg init redirected |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
373 $ cd redirected |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
374 $ touch foo |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
375 $ hg -q commit -A -m initial |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
376 $ cd .. |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
377 |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
378 $ cat > paths.conf << EOF |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
379 > [paths] |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
380 > / = $TESTTMP/* |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
381 > EOF |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
382 |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
383 $ cat > redirectext.py << EOF |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
384 > from mercurial import extensions, wireprotoserver |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
385 > def wrappedcallhttp(orig, repo, req, res, proto, cmd): |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
386 > path = req.advertisedurl[len(req.advertisedbaseurl):] |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
387 > if not path.startswith(b'/redirector'): |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
388 > return orig(repo, req, res, proto, cmd) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
389 > relpath = path[len(b'/redirector'):] |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
390 > res.status = b'301 Redirect' |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
391 > newurl = b'%s/redirected%s' % (req.baseurl, relpath) |
41383
0cfbe78fc13e
tests: add b'' prefixes to ui.configbool() call
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41380
diff
changeset
|
392 > if not repo.ui.configbool(b'testing', b'redirectqs', True) and b'?' in newurl: |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
393 > newurl = newurl[0:newurl.index(b'?')] |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
394 > res.headers[b'Location'] = newurl |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
395 > res.headers[b'Content-Type'] = b'text/plain' |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
396 > res.setbodybytes(b'redirected') |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
397 > return True |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
398 > |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
399 > extensions.wrapfunction(wireprotoserver, '_callhttp', wrappedcallhttp) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
400 > EOF |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
401 |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
402 $ hg --config extensions.redirect=$TESTTMP/redirectext.py \ |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
403 > --config server.compressionengines=zlib \ |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
404 > serve --web-conf paths.conf --pid-file hg.pid -p $HGPORT -d |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
405 $ cat hg.pid > $DAEMON_PIDS |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
406 |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
407 Verify our HTTP 301 is served properly |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
408 |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
409 $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
410 > httprequest GET /redirector?cmd=capabilities |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
411 > user-agent: test |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
412 > EOF |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
413 using raw connection to peer |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
414 s> setsockopt(6, 1, 1) -> None (?) |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
415 s> GET /redirector?cmd=capabilities HTTP/1.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
416 s> Accept-Encoding: identity\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
417 s> user-agent: test\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
418 s> host: $LOCALIP:$HGPORT\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
419 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
420 s> makefile('rb', None) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
421 s> HTTP/1.1 301 Redirect\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
422 s> Server: testing stub value\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
423 s> Date: $HTTP_DATE$\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
424 s> Location: http://$LOCALIP:$HGPORT/redirected?cmd=capabilities\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
425 s> Content-Type: text/plain\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
426 s> Content-Length: 10\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
427 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
428 s> redirected |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
429 s> setsockopt(6, 1, 1) -> None (?) |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
430 s> GET /redirected?cmd=capabilities HTTP/1.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
431 s> Accept-Encoding: identity\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
432 s> user-agent: test\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
433 s> host: $LOCALIP:$HGPORT\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
434 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
435 s> makefile('rb', None) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
436 s> HTTP/1.1 200 Script output follows\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
437 s> Server: testing stub value\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
438 s> Date: $HTTP_DATE$\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
439 s> Content-Type: application/mercurial-0.1\r\n |
44412
edc8504bc26b
exchange: turn on option that makes concurrent pushes work better
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
42070
diff
changeset
|
440 s> Content-Length: 503\r\n |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
441 s> \r\n |
40893
4062ba2deb4e
test: enable sparse-revlog for test-http-protocol.t
Boris Feld <boris.feld@octobus.net>
parents:
40391
diff
changeset
|
442 s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
443 |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
444 Test with the HTTP peer |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
445 |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
446 $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT/redirector << EOF |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
447 > command heads |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
448 > EOF |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
449 s> setsockopt(6, 1, 1) -> None (?) |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
450 s> GET /redirector?cmd=capabilities HTTP/1.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
451 s> Accept-Encoding: identity\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
452 s> accept: application/mercurial-0.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
453 s> host: $LOCALIP:$HGPORT\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
454 s> user-agent: Mercurial debugwireproto\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
455 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
456 s> makefile('rb', None) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
457 s> HTTP/1.1 301 Redirect\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
458 s> Server: testing stub value\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
459 s> Date: $HTTP_DATE$\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
460 s> Location: http://$LOCALIP:$HGPORT/redirected?cmd=capabilities\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
461 s> Content-Type: text/plain\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
462 s> Content-Length: 10\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
463 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
464 s> redirected |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
465 s> setsockopt(6, 1, 1) -> None (?) |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
466 s> GET /redirected?cmd=capabilities HTTP/1.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
467 s> Accept-Encoding: identity\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
468 s> accept: application/mercurial-0.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
469 s> host: $LOCALIP:$HGPORT\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
470 s> user-agent: Mercurial debugwireproto\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
471 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
472 s> makefile('rb', None) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
473 s> HTTP/1.1 200 Script output follows\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
474 s> Server: testing stub value\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
475 s> Date: $HTTP_DATE$\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
476 s> Content-Type: application/mercurial-0.1\r\n |
44412
edc8504bc26b
exchange: turn on option that makes concurrent pushes work better
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
42070
diff
changeset
|
477 s> Content-Length: 503\r\n |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
478 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
479 real URL is http://$LOCALIP:$HGPORT/redirected (glob) |
40893
4062ba2deb4e
test: enable sparse-revlog for test-http-protocol.t
Boris Feld <boris.feld@octobus.net>
parents:
40391
diff
changeset
|
480 s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
481 sending heads command |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
482 s> setsockopt(6, 1, 1) -> None (?) |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
483 s> GET /redirected?cmd=heads HTTP/1.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
484 s> Accept-Encoding: identity\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
485 s> vary: X-HgProto-1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
486 s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
487 s> accept: application/mercurial-0.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
488 s> host: $LOCALIP:$HGPORT\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
489 s> user-agent: Mercurial debugwireproto\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
490 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
491 s> makefile('rb', None) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
492 s> HTTP/1.1 200 Script output follows\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
493 s> Server: testing stub value\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
494 s> Date: $HTTP_DATE$\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
495 s> Content-Type: application/mercurial-0.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
496 s> Content-Length: 41\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
497 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
498 s> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n |
39378
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
499 response: [ |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
500 b'\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL' |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
501 ] |
40034
393e44324037
httppeer: report http statistics
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
502 (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob) |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
503 |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
504 $ killdaemons.py |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
505 |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
506 Now test a variation where we strip the query string from the redirect URL. |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
507 (SCM Manager apparently did this and clients would recover from it) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
508 |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
509 $ hg --config extensions.redirect=$TESTTMP/redirectext.py \ |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
510 > --config server.compressionengines=zlib \ |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
511 > --config testing.redirectqs=false \ |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
512 > serve --web-conf paths.conf --pid-file hg.pid -p $HGPORT -d |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
513 $ cat hg.pid > $DAEMON_PIDS |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
514 |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
515 $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
516 > httprequest GET /redirector?cmd=capabilities |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
517 > user-agent: test |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
518 > EOF |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
519 using raw connection to peer |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
520 s> setsockopt(6, 1, 1) -> None (?) |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
521 s> GET /redirector?cmd=capabilities HTTP/1.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
522 s> Accept-Encoding: identity\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
523 s> user-agent: test\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
524 s> host: $LOCALIP:$HGPORT\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
525 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
526 s> makefile('rb', None) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
527 s> HTTP/1.1 301 Redirect\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
528 s> Server: testing stub value\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
529 s> Date: $HTTP_DATE$\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
530 s> Location: http://$LOCALIP:$HGPORT/redirected\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
531 s> Content-Type: text/plain\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
532 s> Content-Length: 10\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
533 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
534 s> redirected |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
535 s> setsockopt(6, 1, 1) -> None (?) |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
536 s> GET /redirected HTTP/1.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
537 s> Accept-Encoding: identity\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
538 s> user-agent: test\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
539 s> host: $LOCALIP:$HGPORT\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
540 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
541 s> makefile('rb', None) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
542 s> HTTP/1.1 200 Script output follows\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
543 s> Server: testing stub value\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
544 s> Date: $HTTP_DATE$\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
545 s> ETag: W/"*"\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
546 s> Content-Type: text/html; charset=ascii\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
547 s> Transfer-Encoding: chunked\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
548 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
549 s> 414\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
550 s> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
551 s> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
552 s> <head>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
553 s> <link rel="icon" href="/redirected/static/hgicon.png" type="image/png" />\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
554 s> <meta name="robots" content="index, nofollow" />\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
555 s> <link rel="stylesheet" href="/redirected/static/style-paper.css" type="text/css" />\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
556 s> <script type="text/javascript" src="/redirected/static/mercurial.js"></script>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
557 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
558 s> <title>redirected: log</title>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
559 s> <link rel="alternate" type="application/atom+xml"\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
560 s> href="/redirected/atom-log" title="Atom feed for redirected" />\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
561 s> <link rel="alternate" type="application/rss+xml"\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
562 s> href="/redirected/rss-log" title="RSS feed for redirected" />\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
563 s> </head>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
564 s> <body>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
565 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
566 s> <div class="container">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
567 s> <div class="menu">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
568 s> <div class="logo">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
569 s> <a href="https://mercurial-scm.org/">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
570 s> <img src="/redirected/static/hglogo.png" alt="mercurial" /></a>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
571 s> </div>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
572 s> <ul>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
573 s> <li class="active">log</li>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
574 s> <li><a href="/redirected/graph/tip">graph</a></li>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
575 s> <li><a href="/redirected/tags">tags</a></li>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
576 s> <li><a href=" |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
577 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
578 s> 810\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
579 s> /redirected/bookmarks">bookmarks</a></li>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
580 s> <li><a href="/redirected/branches">branches</a></li>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
581 s> </ul>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
582 s> <ul>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
583 s> <li><a href="/redirected/rev/tip">changeset</a></li>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
584 s> <li><a href="/redirected/file/tip">browse</a></li>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
585 s> </ul>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
586 s> <ul>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
587 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
588 s> </ul>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
589 s> <ul>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
590 s> <li><a href="/redirected/help">help</a></li>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
591 s> </ul>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
592 s> <div class="atom-logo">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
593 s> <a href="/redirected/atom-log" title="subscribe to atom feed">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
594 s> <img class="atom-logo" src="/redirected/static/feed-icon-14x14.png" alt="atom feed" />\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
595 s> </a>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
596 s> </div>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
597 s> </div>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
598 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
599 s> <div class="main">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
600 s> <h2 class="breadcrumb"><a href="/">Mercurial</a> > <a href="/redirected">redirected</a> </h2>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
601 s> <h3>log</h3>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
602 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
603 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
604 s> <form class="search" action="/redirected/log">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
605 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
606 s> <p><input name="rev" id="search1" type="text" size="30" value="" /></p>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
607 s> <div id="hint">Find changesets by keywords (author, files, the commit message), revision\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
608 s> number or hash, or <a href="/redirected/help/revsets">revset expression</a>.</div>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
609 s> </form>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
610 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
611 s> <div class="navigate">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
612 s> <a href="/redirected/shortlog/tip?revcount=30">less</a>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
613 s> <a href="/redirected/shortlog/tip?revcount=120">more</a>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
614 s> | rev 0: <a href="/redirected/shortlog/96ee1d7354c4">(0)</a> <a href="/redirected/shortlog/tip">tip</a> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
615 s> </div>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
616 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
617 s> <table class="bigtable">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
618 s> <thead>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
619 s> <tr>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
620 s> <th class="age">age</th>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
621 s> <th class="author">author</th>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
622 s> <th class="description">description</th>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
623 s> </tr>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
624 s> </thead>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
625 s> <tbody class="stripes2">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
626 s> <tr>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
627 s> <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
628 s> <td class="author">test</td>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
629 s> <td class="description">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
630 s> <a href="/redirected/rev/96ee1d7354c4">initial</a>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
631 s> <span class="phase">draft</span> <span class="branchhead">default</span> <span class="tag">tip</span> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
632 s> </td>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
633 s> </tr>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
634 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
635 s> </tbody>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
636 s> </table>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
637 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
638 s> <div class="navigate">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
639 s> <a href="/redirected/shortlog/tip?revcount=30">less</a>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
640 s> <a href="/redirected/shortlog/tip?revcount=120">more</a>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
641 s> | rev 0: <a href="/redirected/shortlog/96ee1d7354c4">(0)</a> <a href="/redirected/shortlog/tip">tip</a> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
642 s> </div>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
643 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
644 s> <script type="text/javascript">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
645 s> ajaxScrollInit(\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
646 s> \'/redirected/shortlog/%next%\',\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
647 s> \'\', <!-- NEXTHASH\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
648 s> function (htmlText) { |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
649 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
650 s> 14a\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
651 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
652 s> var m = htmlText.match(/\'(\\w+)\', <!-- NEXTHASH/);\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
653 s> return m ? m[1] : null;\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
654 s> },\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
655 s> \'.bigtable > tbody\',\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
656 s> \'<tr class="%class%">\\\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
657 s> <td colspan="3" style="text-align: center;">%text%</td>\\\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
658 s> </tr>\'\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
659 s> );\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
660 s> </script>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
661 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
662 s> </div>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
663 s> </div>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
664 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
665 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
666 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
667 s> </body>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
668 s> </html>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
669 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
670 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
671 s> 0\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
672 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
673 |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
674 $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT/redirector << EOF |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
675 > command heads |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
676 > EOF |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
677 s> setsockopt(6, 1, 1) -> None (?) |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
678 s> GET /redirector?cmd=capabilities HTTP/1.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
679 s> Accept-Encoding: identity\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
680 s> accept: application/mercurial-0.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
681 s> host: $LOCALIP:$HGPORT\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
682 s> user-agent: Mercurial debugwireproto\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
683 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
684 s> makefile('rb', None) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
685 s> HTTP/1.1 301 Redirect\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
686 s> Server: testing stub value\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
687 s> Date: $HTTP_DATE$\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
688 s> Location: http://$LOCALIP:$HGPORT/redirected\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
689 s> Content-Type: text/plain\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
690 s> Content-Length: 10\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
691 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
692 s> redirected |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
693 s> setsockopt(6, 1, 1) -> None (?) |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
694 s> GET /redirected HTTP/1.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
695 s> Accept-Encoding: identity\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
696 s> accept: application/mercurial-0.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
697 s> host: $LOCALIP:$HGPORT\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
698 s> user-agent: Mercurial debugwireproto\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
699 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
700 s> makefile('rb', None) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
701 s> HTTP/1.1 200 Script output follows\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
702 s> Server: testing stub value\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
703 s> Date: $HTTP_DATE$\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
704 s> ETag: W/"*"\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
705 s> Content-Type: text/html; charset=ascii\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
706 s> Transfer-Encoding: chunked\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
707 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
708 real URL is http://$LOCALIP:$HGPORT/redirected (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
709 s> 414\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
710 s> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
711 s> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
712 s> <head>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
713 s> <link rel="icon" href="/redirected/static/hgicon.png" type="image/png" />\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
714 s> <meta name="robots" content="index, nofollow" />\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
715 s> <link rel="stylesheet" href="/redirected/static/style-paper.css" type="text/css" />\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
716 s> <script type="text/javascript" src="/redirected/static/mercurial.js"></script>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
717 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
718 s> <title>redirected: log</title>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
719 s> <link rel="alternate" type="application/atom+xml"\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
720 s> href="/redirected/atom-log" title="Atom feed for redirected" />\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
721 s> <link rel="alternate" type="application/rss+xml"\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
722 s> href="/redirected/rss-log" title="RSS feed for redirected" />\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
723 s> </head>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
724 s> <body>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
725 s> \n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
726 s> <div class="container">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
727 s> <div class="menu">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
728 s> <div class="logo">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
729 s> <a href="https://mercurial-scm.org/">\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
730 s> <img src="/redirected/static/hglogo.png" alt="mercurial" /></a>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
731 s> </div>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
732 s> <ul>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
733 s> <li class="active">log</li>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
734 s> <li><a href="/redirected/graph/tip">graph</a></li>\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
735 s> <li><a href="/redirected/tags">tags</a |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
736 s> setsockopt(6, 1, 1) -> None (?) |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
737 s> GET /redirected?cmd=capabilities HTTP/1.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
738 s> Accept-Encoding: identity\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
739 s> accept: application/mercurial-0.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
740 s> host: $LOCALIP:$HGPORT\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
741 s> user-agent: Mercurial debugwireproto\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
742 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
743 s> makefile('rb', None) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
744 s> HTTP/1.1 200 Script output follows\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
745 s> Server: testing stub value\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
746 s> Date: $HTTP_DATE$\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
747 s> Content-Type: application/mercurial-0.1\r\n |
44412
edc8504bc26b
exchange: turn on option that makes concurrent pushes work better
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
42070
diff
changeset
|
748 s> Content-Length: 503\r\n |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
749 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
750 real URL is http://$LOCALIP:$HGPORT/redirected (glob) |
40893
4062ba2deb4e
test: enable sparse-revlog for test-http-protocol.t
Boris Feld <boris.feld@octobus.net>
parents:
40391
diff
changeset
|
751 s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
752 sending heads command |
41502
2f7408b7d247
tests: give up and make setsockopt() calls optional in the output
Augie Fackler <augie@google.com>
parents:
41383
diff
changeset
|
753 s> setsockopt(6, 1, 1) -> None (?) |
37832
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
754 s> GET /redirected?cmd=heads HTTP/1.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
755 s> Accept-Encoding: identity\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
756 s> vary: X-HgProto-1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
757 s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
758 s> accept: application/mercurial-0.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
759 s> host: $LOCALIP:$HGPORT\r\n (glob) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
760 s> user-agent: Mercurial debugwireproto\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
761 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
762 s> makefile('rb', None) |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
763 s> HTTP/1.1 200 Script output follows\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
764 s> Server: testing stub value\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
765 s> Date: $HTTP_DATE$\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
766 s> Content-Type: application/mercurial-0.1\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
767 s> Content-Length: 41\r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
768 s> \r\n |
6169d95dce3b
httppeer: detect redirect to URL without query string (issue5860)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37822
diff
changeset
|
769 s> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n |
39378
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
770 response: [ |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
771 b'\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL' |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38021
diff
changeset
|
772 ] |
40034
393e44324037
httppeer: report http statistics
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
773 (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob) |