view tests/test-hgweb-commands.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 a0886a4d6dce
children cc3ad5c3af3b
line wrap: on
line source

#require serve

An attempt at more fully testing the hgweb web interface.
The following things are tested elsewhere and are therefore omitted:
- archive, tested in test-archive
- unbundle, tested in test-push-http
- changegroupsubset, tested in test-pull

Set up the repo

  $ hg init test
  $ cd test
  $ mkdir da
  $ echo foo > da/foo
  $ echo foo > foo
  $ hg ci -Ambase
  adding da/foo
  adding foo
  $ hg tag 1.0
  $ hg bookmark some-thing
  $ hg bookmark -r0 anotherthing
  $ echo another > foo
  $ hg branch stable
  marked working directory as branch stable
  (branches are permanent and global, did you want a bookmark?)
  $ hg ci -Ambranch
  $ hg branch unstable
  marked working directory as branch unstable
  >>> open('msg', 'wb').write(b'branch commit with null character: \0\n') and None
  $ hg ci -l msg
  $ rm msg

  $ cat > .hg/hgrc <<EOF
  > [graph]
  > default.width = 3
  > stable.width = 3
  > stable.color = FF0000
  > [websub]
  > append = s|(.+)|\1(websub)|
  > EOF

  $ hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
  $ cat hg.pid >> $DAEMON_PIDS
  $ hg log -G --template '{rev}:{node|short} {desc}\n'
  @  3:cad8025a2e87 branch commit with null character: \x00 (esc)
  |
  o  2:1d22e65f027e branch
  |
  o  1:a4f92ed23982 Added tag 1.0 for changeset 2ef0ac749a14
  |
  o  0:2ef0ac749a14 base
  

Logs and changes

  $ get-with-headers.py $LOCALIP:$HGPORT 'log/?style=atom'
  200 Script output follows
  
  <?xml version="1.0" encoding="ascii"?>
  <feed xmlns="http://www.w3.org/2005/Atom">
   <!-- Changelog -->
   <id>http://*:$HGPORT/</id> (glob)
   <link rel="self" href="http://*:$HGPORT/atom-log"/> (glob)
   <link rel="alternate" href="http://*:$HGPORT/"/> (glob)
   <title>test Changelog</title>
   <updated>1970-01-01T00:00:00+00:00</updated>
  
   <entry>
    <title>[unstable] branch commit with null character: </title>
    <id>http://*:$HGPORT/#changeset-cad8025a2e87f88c06259790adfa15acb4080123</id> (glob)
    <link href="http://*:$HGPORT/rev/cad8025a2e87"/> (glob)
    <author>
     <name>test</name>
     <email>&#116;&#101;&#115;&#116;</email>
    </author>
    <updated>1970-01-01T00:00:00+00:00</updated>
    <published>1970-01-01T00:00:00+00:00</published>
    <content type="xhtml">
     <table xmlns="http://www.w3.org/1999/xhtml">
      <tr>
       <th style="text-align:left;">changeset</th>
       <td>cad8025a2e87</td>
      </tr>
      <tr>
       <th style="text-align:left;">branch</th>
       <td>unstable</td>
      </tr>
      <tr>
       <th style="text-align:left;">bookmark</th>
       <td>some-thing</td>
      </tr>
      <tr>
       <th style="text-align:left;">tag</th>
       <td>tip</td>
      </tr>
      <tr>
       <th style="text-align:left;">user</th>
       <td>&#116;&#101;&#115;&#116;</td>
      </tr>
      <tr>
       <th style="text-align:left;vertical-align:top;">description</th>
       <td>branch commit with null character: (websub)</td>
      </tr>
      <tr>
       <th style="text-align:left;vertical-align:top;">files</th>
       <td></td>
      </tr>
     </table>
    </content>
   </entry>
   <entry>
    <title>[stable] branch</title>
    <id>http://*:$HGPORT/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe</id> (glob)
    <link href="http://*:$HGPORT/rev/1d22e65f027e"/> (glob)
    <author>
     <name>test</name>
     <email>&#116;&#101;&#115;&#116;</email>
    </author>
    <updated>1970-01-01T00:00:00+00:00</updated>
    <published>1970-01-01T00:00:00+00:00</published>
    <content type="xhtml">
     <table xmlns="http://www.w3.org/1999/xhtml">
      <tr>
       <th style="text-align:left;">changeset</th>
       <td>1d22e65f027e</td>
      </tr>
      <tr>
       <th style="text-align:left;">branch</th>
       <td>stable</td>
      </tr>
      <tr>
       <th style="text-align:left;">bookmark</th>
       <td></td>
      </tr>
      <tr>
       <th style="text-align:left;">tag</th>
       <td></td>
      </tr>
      <tr>
       <th style="text-align:left;">user</th>
       <td>&#116;&#101;&#115;&#116;</td>
      </tr>
      <tr>
       <th style="text-align:left;vertical-align:top;">description</th>
       <td>branch(websub)</td>
      </tr>
      <tr>
       <th style="text-align:left;vertical-align:top;">files</th>
       <td>foo<br /></td>
      </tr>
     </table>
    </content>
   </entry>
   <entry>
    <title>[default] Added tag 1.0 for changeset 2ef0ac749a14</title>
    <id>http://*:$HGPORT/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de</id> (glob)
    <link href="http://*:$HGPORT/rev/a4f92ed23982"/> (glob)
    <author>
     <name>test</name>
     <email>&#116;&#101;&#115;&#116;</email>
    </author>
    <updated>1970-01-01T00:00:00+00:00</updated>
    <published>1970-01-01T00:00:00+00:00</published>
    <content type="xhtml">
     <table xmlns="http://www.w3.org/1999/xhtml">
      <tr>
       <th style="text-align:left;">changeset</th>
       <td>a4f92ed23982</td>
      </tr>
      <tr>
       <th style="text-align:left;">branch</th>
       <td>default</td>
      </tr>
      <tr>
       <th style="text-align:left;">bookmark</th>
       <td></td>
      </tr>
      <tr>
       <th style="text-align:left;">tag</th>
       <td></td>
      </tr>
      <tr>
       <th style="text-align:left;">user</th>
       <td>&#116;&#101;&#115;&#116;</td>
      </tr>
      <tr>
       <th style="text-align:left;vertical-align:top;">description</th>
       <td>Added tag 1.0 for changeset 2ef0ac749a14(websub)</td>
      </tr>
      <tr>
       <th style="text-align:left;vertical-align:top;">files</th>
       <td>.hgtags<br /></td>
      </tr>
     </table>
    </content>
   </entry>
   <entry>
    <title>base</title>
    <id>http://*:$HGPORT/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id> (glob)
    <link href="http://*:$HGPORT/rev/2ef0ac749a14"/> (glob)
    <author>
     <name>test</name>
     <email>&#116;&#101;&#115;&#116;</email>
    </author>
    <updated>1970-01-01T00:00:00+00:00</updated>
    <published>1970-01-01T00:00:00+00:00</published>
    <content type="xhtml">
     <table xmlns="http://www.w3.org/1999/xhtml">
      <tr>
       <th style="text-align:left;">changeset</th>
       <td>2ef0ac749a14</td>
      </tr>
      <tr>
       <th style="text-align:left;">branch</th>
       <td></td>
      </tr>
      <tr>
       <th style="text-align:left;">bookmark</th>
       <td>anotherthing</td>
      </tr>
      <tr>
       <th style="text-align:left;">tag</th>
       <td>1.0</td>
      </tr>
      <tr>
       <th style="text-align:left;">user</th>
       <td>&#116;&#101;&#115;&#116;</td>
      </tr>
      <tr>
       <th style="text-align:left;vertical-align:top;">description</th>
       <td>base(websub)</td>
      </tr>
      <tr>
       <th style="text-align:left;vertical-align:top;">files</th>
       <td>da/foo<br />foo<br /></td>
      </tr>
     </table>
    </content>
   </entry>
  
  </feed>
  $ get-with-headers.py $LOCALIP:$HGPORT 'log/?style=rss'
  200 Script output follows
  
  <?xml version="1.0" encoding="ascii"?>
  <rss version="2.0">
    <channel>
      <link>http://*:$HGPORT/</link> (glob)
      <language>en-us</language>
  
      <title>test Changelog</title>
      <description>test Changelog</description>
      <item>
      <title>[unstable] branch commit with null character: </title>
      <guid isPermaLink="true">http://*:$HGPORT/rev/cad8025a2e87</guid> (glob)
      <link>http://*:$HGPORT/rev/cad8025a2e87</link> (glob)
      <description>
      <![CDATA[
          <table>
              <tr>
                  <th style="text-align:left;">changeset</th>
                  <td>cad8025a2e87</td>
              </tr>
              <tr>
                  <th style="text-align:left;">branch</th>
                  <td>unstable</td>
              </tr>
              <tr>
                  <th style="text-align:left;">bookmark</th>
                  <td>some-thing</td>
              </tr>
              <tr>
                  <th style="text-align:left;">tag</th>
                  <td>tip</td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">user</th>
                  <td>&#116;&#101;&#115;&#116;</td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">description</th>
                  <td>branch commit with null character: (websub)</td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">files</th>
                  <td></td>
              </tr>
          </table>
      ]]>
      </description>
      <author>&#116;&#101;&#115;&#116;</author>
      <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
  </item>
  <item>
      <title>[stable] branch</title>
      <guid isPermaLink="true">http://*:$HGPORT/rev/1d22e65f027e</guid> (glob)
      <link>http://*:$HGPORT/rev/1d22e65f027e</link> (glob)
      <description>
      <![CDATA[
          <table>
              <tr>
                  <th style="text-align:left;">changeset</th>
                  <td>1d22e65f027e</td>
              </tr>
              <tr>
                  <th style="text-align:left;">branch</th>
                  <td>stable</td>
              </tr>
              <tr>
                  <th style="text-align:left;">bookmark</th>
                  <td></td>
              </tr>
              <tr>
                  <th style="text-align:left;">tag</th>
                  <td></td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">user</th>
                  <td>&#116;&#101;&#115;&#116;</td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">description</th>
                  <td>branch(websub)</td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">files</th>
                  <td>foo<br /></td>
              </tr>
          </table>
      ]]>
      </description>
      <author>&#116;&#101;&#115;&#116;</author>
      <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
  </item>
  <item>
      <title>[default] Added tag 1.0 for changeset 2ef0ac749a14</title>
      <guid isPermaLink="true">http://*:$HGPORT/rev/a4f92ed23982</guid> (glob)
      <link>http://*:$HGPORT/rev/a4f92ed23982</link> (glob)
      <description>
      <![CDATA[
          <table>
              <tr>
                  <th style="text-align:left;">changeset</th>
                  <td>a4f92ed23982</td>
              </tr>
              <tr>
                  <th style="text-align:left;">branch</th>
                  <td>default</td>
              </tr>
              <tr>
                  <th style="text-align:left;">bookmark</th>
                  <td></td>
              </tr>
              <tr>
                  <th style="text-align:left;">tag</th>
                  <td></td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">user</th>
                  <td>&#116;&#101;&#115;&#116;</td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">description</th>
                  <td>Added tag 1.0 for changeset 2ef0ac749a14(websub)</td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">files</th>
                  <td>.hgtags<br /></td>
              </tr>
          </table>
      ]]>
      </description>
      <author>&#116;&#101;&#115;&#116;</author>
      <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
  </item>
  <item>
      <title>base</title>
      <guid isPermaLink="true">http://*:$HGPORT/rev/2ef0ac749a14</guid> (glob)
      <link>http://*:$HGPORT/rev/2ef0ac749a14</link> (glob)
      <description>
      <![CDATA[
          <table>
              <tr>
                  <th style="text-align:left;">changeset</th>
                  <td>2ef0ac749a14</td>
              </tr>
              <tr>
                  <th style="text-align:left;">branch</th>
                  <td></td>
              </tr>
              <tr>
                  <th style="text-align:left;">bookmark</th>
                  <td>anotherthing</td>
              </tr>
              <tr>
                  <th style="text-align:left;">tag</th>
                  <td>1.0</td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">user</th>
                  <td>&#116;&#101;&#115;&#116;</td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">description</th>
                  <td>base(websub)</td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">files</th>
                  <td>da/foo<br />foo<br /></td>
              </tr>
          </table>
      ]]>
      </description>
      <author>&#116;&#101;&#115;&#116;</author>
      <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
  </item>
  
    </channel>
  </rss> (no-eol)
  $ get-with-headers.py $LOCALIP:$HGPORT 'log/1/?style=atom'
  200 Script output follows
  
  <?xml version="1.0" encoding="ascii"?>
  <feed xmlns="http://www.w3.org/2005/Atom">
   <!-- Changelog -->
   <id>http://*:$HGPORT/</id> (glob)
   <link rel="self" href="http://*:$HGPORT/atom-log"/> (glob)
   <link rel="alternate" href="http://*:$HGPORT/"/> (glob)
   <title>test Changelog</title>
   <updated>1970-01-01T00:00:00+00:00</updated>
  
   <entry>
    <title>[default] Added tag 1.0 for changeset 2ef0ac749a14</title>
    <id>http://*:$HGPORT/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de</id> (glob)
    <link href="http://*:$HGPORT/rev/a4f92ed23982"/> (glob)
    <author>
     <name>test</name>
     <email>&#116;&#101;&#115;&#116;</email>
    </author>
    <updated>1970-01-01T00:00:00+00:00</updated>
    <published>1970-01-01T00:00:00+00:00</published>
    <content type="xhtml">
     <table xmlns="http://www.w3.org/1999/xhtml">
      <tr>
       <th style="text-align:left;">changeset</th>
       <td>a4f92ed23982</td>
      </tr>
      <tr>
       <th style="text-align:left;">branch</th>
       <td>default</td>
      </tr>
      <tr>
       <th style="text-align:left;">bookmark</th>
       <td></td>
      </tr>
      <tr>
       <th style="text-align:left;">tag</th>
       <td></td>
      </tr>
      <tr>
       <th style="text-align:left;">user</th>
       <td>&#116;&#101;&#115;&#116;</td>
      </tr>
      <tr>
       <th style="text-align:left;vertical-align:top;">description</th>
       <td>Added tag 1.0 for changeset 2ef0ac749a14(websub)</td>
      </tr>
      <tr>
       <th style="text-align:left;vertical-align:top;">files</th>
       <td>.hgtags<br /></td>
      </tr>
     </table>
    </content>
   </entry>
   <entry>
    <title>base</title>
    <id>http://*:$HGPORT/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id> (glob)
    <link href="http://*:$HGPORT/rev/2ef0ac749a14"/> (glob)
    <author>
     <name>test</name>
     <email>&#116;&#101;&#115;&#116;</email>
    </author>
    <updated>1970-01-01T00:00:00+00:00</updated>
    <published>1970-01-01T00:00:00+00:00</published>
    <content type="xhtml">
     <table xmlns="http://www.w3.org/1999/xhtml">
      <tr>
       <th style="text-align:left;">changeset</th>
       <td>2ef0ac749a14</td>
      </tr>
      <tr>
       <th style="text-align:left;">branch</th>
       <td></td>
      </tr>
      <tr>
       <th style="text-align:left;">bookmark</th>
       <td>anotherthing</td>
      </tr>
      <tr>
       <th style="text-align:left;">tag</th>
       <td>1.0</td>
      </tr>
      <tr>
       <th style="text-align:left;">user</th>
       <td>&#116;&#101;&#115;&#116;</td>
      </tr>
      <tr>
       <th style="text-align:left;vertical-align:top;">description</th>
       <td>base(websub)</td>
      </tr>
      <tr>
       <th style="text-align:left;vertical-align:top;">files</th>
       <td>da/foo<br />foo<br /></td>
      </tr>
     </table>
    </content>
   </entry>
  
  </feed>
  $ get-with-headers.py $LOCALIP:$HGPORT 'log/1/?style=rss'
  200 Script output follows
  
  <?xml version="1.0" encoding="ascii"?>
  <rss version="2.0">
    <channel>
      <link>http://*:$HGPORT/</link> (glob)
      <language>en-us</language>
  
      <title>test Changelog</title>
      <description>test Changelog</description>
      <item>
      <title>[default] Added tag 1.0 for changeset 2ef0ac749a14</title>
      <guid isPermaLink="true">http://*:$HGPORT/rev/a4f92ed23982</guid> (glob)
      <link>http://*:$HGPORT/rev/a4f92ed23982</link> (glob)
      <description>
      <![CDATA[
          <table>
              <tr>
                  <th style="text-align:left;">changeset</th>
                  <td>a4f92ed23982</td>
              </tr>
              <tr>
                  <th style="text-align:left;">branch</th>
                  <td>default</td>
              </tr>
              <tr>
                  <th style="text-align:left;">bookmark</th>
                  <td></td>
              </tr>
              <tr>
                  <th style="text-align:left;">tag</th>
                  <td></td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">user</th>
                  <td>&#116;&#101;&#115;&#116;</td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">description</th>
                  <td>Added tag 1.0 for changeset 2ef0ac749a14(websub)</td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">files</th>
                  <td>.hgtags<br /></td>
              </tr>
          </table>
      ]]>
      </description>
      <author>&#116;&#101;&#115;&#116;</author>
      <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
  </item>
  <item>
      <title>base</title>
      <guid isPermaLink="true">http://*:$HGPORT/rev/2ef0ac749a14</guid> (glob)
      <link>http://*:$HGPORT/rev/2ef0ac749a14</link> (glob)
      <description>
      <![CDATA[
          <table>
              <tr>
                  <th style="text-align:left;">changeset</th>
                  <td>2ef0ac749a14</td>
              </tr>
              <tr>
                  <th style="text-align:left;">branch</th>
                  <td></td>
              </tr>
              <tr>
                  <th style="text-align:left;">bookmark</th>
                  <td>anotherthing</td>
              </tr>
              <tr>
                  <th style="text-align:left;">tag</th>
                  <td>1.0</td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">user</th>
                  <td>&#116;&#101;&#115;&#116;</td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">description</th>
                  <td>base(websub)</td>
              </tr>
              <tr>
                  <th style="text-align:left;vertical-align:top;">files</th>
                  <td>da/foo<br />foo<br /></td>
              </tr>
          </table>
      ]]>
      </description>
      <author>&#116;&#101;&#115;&#116;</author>
      <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
  </item>
  
    </channel>
  </rss> (no-eol)
  $ get-with-headers.py $LOCALIP:$HGPORT 'log/1/foo/?style=atom'
  200 Script output follows
  
  <?xml version="1.0" encoding="ascii"?>
  <feed xmlns="http://www.w3.org/2005/Atom">
   <id>http://*:$HGPORT/atom-log/tip/foo</id> (glob)
   <link rel="self" href="http://*:$HGPORT/atom-log/tip/foo"/> (glob)
   <title>test: foo history</title>
   <updated>1970-01-01T00:00:00+00:00</updated>
  
   <entry>
    <title>base</title>
    <id>http://*:$HGPORT/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id> (glob)
    <link href="http://*:$HGPORT/rev/2ef0ac749a14"/> (glob)
    <author>
     <name>test</name>
     <email>&#116;&#101;&#115;&#116;</email>
    </author>
    <updated>1970-01-01T00:00:00+00:00</updated>
    <published>1970-01-01T00:00:00+00:00</published>
    <content type="xhtml">
     <table xmlns="http://www.w3.org/1999/xhtml">
      <tr>
       <th style="text-align:left;">changeset</th>
       <td>2ef0ac749a14</td>
      </tr>
      <tr>
       <th style="text-align:left;">branch</th>
       <td></td>
      </tr>
      <tr>
       <th style="text-align:left;">bookmark</th>
       <td>anotherthing</td>
      </tr>
      <tr>
       <th style="text-align:left;">tag</th>
       <td>1.0</td>
      </tr>
      <tr>
       <th style="text-align:left;">user</th>
       <td>&#116;&#101;&#115;&#116;</td>
      </tr>
      <tr>
       <th style="text-align:left;vertical-align:top;">description</th>
       <td>base(websub)</td>
      </tr>
      <tr>
       <th style="text-align:left;vertical-align:top;">files</th>
       <td></td>
      </tr>
     </table>
    </content>
   </entry>
  
  </feed>
  $ get-with-headers.py $LOCALIP:$HGPORT 'log/1/foo/?style=rss'
  200 Script output follows
  
  <?xml version="1.0" encoding="ascii"?>
  <rss version="2.0">
    <channel>
      <link>http://*:$HGPORT/</link> (glob)
      <language>en-us</language>
  
      <title>test: foo history</title>
      <description>foo revision history</description>
      <item>
      <title>base</title>
      <link>http://*:$HGPORT/log/2ef0ac749a14/foo</link> (glob)
      <description><![CDATA[base(websub)]]></description>
      <author>&#116;&#101;&#115;&#116;</author>
      <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
  </item>
  
    </channel>
  </rss>
  $ get-with-headers.py $LOCALIP:$HGPORT 'shortlog/'
  200 Script output follows
  
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
  <head>
  <link rel="icon" href="/static/hgicon.png" type="image/png" />
  <meta name="robots" content="index, nofollow" />
  <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
  <script type="text/javascript" src="/static/mercurial.js"></script>
  
  <title>test: log</title>
  <link rel="alternate" type="application/atom+xml"
     href="/atom-log" title="Atom feed for test" />
  <link rel="alternate" type="application/rss+xml"
     href="/rss-log" title="RSS feed for test" />
  </head>
  <body>
  
  <div class="container">
  <div class="menu">
  <div class="logo">
  <a href="https://mercurial-scm.org/">
  <img src="/static/hglogo.png" alt="mercurial" /></a>
  </div>
  <ul>
  <li class="active">log</li>
  <li><a href="/graph/tip">graph</a></li>
  <li><a href="/tags">tags</a></li>
  <li><a href="/bookmarks">bookmarks</a></li>
  <li><a href="/branches">branches</a></li>
  </ul>
  <ul>
  <li><a href="/rev/tip">changeset</a></li>
  <li><a href="/file/tip">browse</a></li>
  </ul>
  <ul>
  
  </ul>
  <ul>
   <li><a href="/help">help</a></li>
  </ul>
  <div class="atom-logo">
  <a href="/atom-log" title="subscribe to atom feed">
  <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="atom feed" />
  </a>
  </div>
  </div>
  
  <div class="main">
  <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
  <h3>log</h3>
  
  
  <form class="search" action="/log">
  
  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
  <div id="hint">Find changesets by keywords (author, files, the commit message), revision
  number or hash, or <a href="/help/revsets">revset expression</a>.</div>
  </form>
  
  <div class="navigate">
  <a href="/shortlog/tip?revcount=30">less</a>
  <a href="/shortlog/tip?revcount=120">more</a>
  | rev 3: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a> 
  </div>
  
  <table class="bigtable">
  <thead>
   <tr>
    <th class="age">age</th>
    <th class="author">author</th>
    <th class="description">description</th>
   </tr>
  </thead>
  <tbody class="stripes2">
   <tr>
    <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
    <td class="author">test</td>
    <td class="description">
     <a href="/rev/cad8025a2e87">branch commit with null character: </a>
     <span class="phase">draft</span> <span class="branchhead">unstable</span> <span class="tag">tip</span> <span class="tag">some-thing</span> 
    </td>
   </tr>
   <tr>
    <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
    <td class="author">test</td>
    <td class="description">
     <a href="/rev/1d22e65f027e">branch</a>
     <span class="phase">draft</span> <span class="branchhead">stable</span> 
    </td>
   </tr>
   <tr>
    <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
    <td class="author">test</td>
    <td class="description">
     <a href="/rev/a4f92ed23982">Added tag 1.0 for changeset 2ef0ac749a14</a>
     <span class="phase">draft</span> <span class="branchhead">default</span> 
    </td>
   </tr>
   <tr>
    <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
    <td class="author">test</td>
    <td class="description">
     <a href="/rev/2ef0ac749a14">base</a>
     <span class="phase">draft</span> <span class="tag">1.0</span> <span class="tag">anotherthing</span> 
    </td>
   </tr>
  
  </tbody>
  </table>
  
  <div class="navigate">
  <a href="/shortlog/tip?revcount=30">less</a>
  <a href="/shortlog/tip?revcount=120">more</a>
  | rev 3: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a> 
  </div>
  
  <script type="text/javascript">
      ajaxScrollInit(
              '/shortlog/%next%',
              '', <!-- NEXTHASH
              function (htmlText) {
                  var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
                  return m ? m[1] : null;
              },
              '.bigtable > tbody',
              '<tr class="%class%">\
              <td colspan="3" style="text-align: center;">%text%</td>\
              </tr>'
      );
  </script>
  
  </div>
  </div>
  
  
  
  </body>
  </html>
  
  $ get-with-headers.py $LOCALIP:$HGPORT 'rev/0/'
  200 Script output follows
  
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
  <head>
  <link rel="icon" href="/static/hgicon.png" type="image/png" />
  <meta name="robots" content="index, nofollow" />
  <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
  <script type="text/javascript" src="/static/mercurial.js"></script>
  
  <title>test: 2ef0ac749a14</title>
  </head>
  <body>
  <div class="container">
  <div class="menu">
  <div class="logo">
  <a href="https://mercurial-scm.org/">
  <img src="/static/hglogo.png" alt="mercurial" /></a>
  </div>
  <ul>
   <li><a href="/shortlog/0">log</a></li>
   <li><a href="/graph/0">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
  </ul>
  <ul>
   <li class="active">changeset</li>
   <li><a href="/raw-rev/0">raw</a></li>
   <li><a href="/file/0">browse</a></li>
  </ul>
  <ul>
   
  </ul>
  <ul>
   <li><a href="/help">help</a></li>
  </ul>
  </div>
  
  <div class="main">
  
  <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
  <h3>
   changeset 0:<a href="/rev/2ef0ac749a14">2ef0ac749a14</a>
   <span class="phase">draft</span> <span class="tag">1.0</span> <span class="tag">anotherthing</span> 
  </h3>
  
  
  <form class="search" action="/log">
  
  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
  <div id="hint">Find changesets by keywords (author, files, the commit message), revision
  number or hash, or <a href="/help/revsets">revset expression</a>.</div>
  </form>
  
  <div class="description">base(websub)</div>
  
  <table id="changesetEntry">
  <tr>
   <th class="author">author</th>
   <td class="author">&#116;&#101;&#115;&#116;</td>
  </tr>
  <tr>
   <th class="date">date</th>
   <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
  </tr>
  
  
  <tr>
   <th class="author">parents</th>
   <td class="author"></td>
  </tr>
  <tr>
   <th class="author">children</th>
   <td class="author"> <a href="/rev/a4f92ed23982">a4f92ed23982</a></td>
  </tr>
  <tr>
   <th class="files">files</th>
   <td class="files"><a href="/file/2ef0ac749a14/da/foo">da/foo</a> <a href="/file/2ef0ac749a14/foo">foo</a> </td>
  </tr>
  <tr>
    <th class="diffstat">diffstat</th>
    <td class="diffstat">
       2 files changed, 2 insertions(+), 0 deletions(-)
  
      <a id="diffstatexpand" class="diffstattoggle" href="#">[<tt>+</tt>]</a>
      <div id="diffstatdetails" style="display:none;">
        <a class="diffstattoggle" href="#">[<tt>-</tt>]</a>
        <table class="diffstat-table stripes2">  <tr>
      <td class="diffstat-file"><a href="#l1.1">da/foo</a></td>
      <td class="diffstat-total" align="right">1</td>
      <td class="diffstat-graph">
        <span class="diffstat-add" style="width:100.0%;">&nbsp;</span>
        <span class="diffstat-remove" style="width:0.0%;">&nbsp;</span>
      </td>
    </tr>
    <tr>
      <td class="diffstat-file"><a href="#l2.1">foo</a></td>
      <td class="diffstat-total" align="right">1</td>
      <td class="diffstat-graph">
        <span class="diffstat-add" style="width:100.0%;">&nbsp;</span>
        <span class="diffstat-remove" style="width:0.0%;">&nbsp;</span>
      </td>
    </tr>
  </table>
      </div>
    </td>
  </tr>
  </table>
  
  <div class="overflow">
  <div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="#">on</a></div>
  <div class="sourcefirst"> line diff</div>
  <div class="stripes2 diffblocks">
  <div class="bottomline inc-lineno"><pre class="sourcelines wrap">
  <span id="l1.1" class="minusline">--- /dev/null	Thu Jan 01 00:00:00 1970 +0000</span><a href="#l1.1"></a>
  <span id="l1.2" class="plusline">+++ b/da/foo	Thu Jan 01 00:00:00 1970 +0000</span><a href="#l1.2"></a>
  <span id="l1.3" class="atline">@@ -0,0 +1,1 @@</span><a href="#l1.3"></a>
  <span id="l1.4" class="plusline">+foo</span><a href="#l1.4"></a></pre></div><div class="bottomline inc-lineno"><pre class="sourcelines wrap">
  <span id="l2.1" class="minusline">--- /dev/null	Thu Jan 01 00:00:00 1970 +0000</span><a href="#l2.1"></a>
  <span id="l2.2" class="plusline">+++ b/foo	Thu Jan 01 00:00:00 1970 +0000</span><a href="#l2.2"></a>
  <span id="l2.3" class="atline">@@ -0,0 +1,1 @@</span><a href="#l2.3"></a>
  <span id="l2.4" class="plusline">+foo</span><a href="#l2.4"></a></pre></div>
  </div>
  </div>
  
  </div>
  </div>
  
  
  </body>
  </html>
  
  $ get-with-headers.py $LOCALIP:$HGPORT 'rev/1/?style=raw'
  200 Script output follows
  
  
  # HG changeset patch
  # User test
  # Date 0 0
  # Node ID a4f92ed23982be056b9852de5dfe873eaac7f0de
  # Parent  2ef0ac749a14e4f57a5a822464a0902c6f7f448f
  Added tag 1.0 for changeset 2ef0ac749a14
  
  diff -r 2ef0ac749a14 -r a4f92ed23982 .hgtags
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
  +++ b/.hgtags	Thu Jan 01 00:00:00 1970 +0000
  @@ -0,0 +1,1 @@
  +2ef0ac749a14e4f57a5a822464a0902c6f7f448f 1.0
  
  $ get-with-headers.py $LOCALIP:$HGPORT 'log?rev=base'
  200 Script output follows
  
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
  <head>
  <link rel="icon" href="/static/hgicon.png" type="image/png" />
  <meta name="robots" content="index, nofollow" />
  <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
  <script type="text/javascript" src="/static/mercurial.js"></script>
  
  <title>test: searching for base</title>
  </head>
  <body>
  
  <div class="container">
  <div class="menu">
  <div class="logo">
  <a href="https://mercurial-scm.org/">
  <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
  </div>
  <ul>
  <li><a href="/shortlog">log</a></li>
  <li><a href="/graph">graph</a></li>
  <li><a href="/tags">tags</a></li>
  <li><a href="/bookmarks">bookmarks</a></li>
  <li><a href="/branches">branches</a></li>
  </ul>
  <ul>
  <li><a href="/help">help</a></li>
  </ul>
  </div>
  
  <div class="main">
  <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
  <h3>searching for 'base'</h3>
  
  <p>
  Assuming literal keyword search.
  
  
  </p>
  
  
  <form class="search" action="/log">
  
  <p><input name="rev" id="search1" type="text" size="30" value="base" /></p>
  <div id="hint">Find changesets by keywords (author, files, the commit message), revision
  number or hash, or <a href="/help/revsets">revset expression</a>.</div>
  </form>
  
  <div class="navigate">
  <a href="/log?rev=base&revcount=5">less</a>
  <a href="/log?rev=base&revcount=20">more</a>
  </div>
  
  <table class="bigtable">
  <thead>
   <tr>
    <th class="age">age</th>
    <th class="author">author</th>
    <th class="description">description</th>
   </tr>
  </thead>
  <tbody class="stripes2">
   <tr>
    <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
    <td class="author">test</td>
    <td class="description">
     <a href="/rev/2ef0ac749a14">base</a>
     <span class="phase">draft</span> <span class="tag">1.0</span> <span class="tag">anotherthing</span> 
    </td>
   </tr>
  
  </tbody>
  </table>
  
  <div class="navigate">
  <a href="/log?rev=base&revcount=5">less</a>
  <a href="/log?rev=base&revcount=20">more</a>
  </div>
  
  </div>
  </div>
  
  
  
  </body>
  </html>
  
  $ get-with-headers.py $LOCALIP:$HGPORT 'log?rev=stable&style=raw' | grep 'revision:'
  revision:    2

Search with revset syntax

  $ get-with-headers.py $LOCALIP:$HGPORT 'log?rev=tip^&style=raw'
  200 Script output follows
  
  
  # HG changesets search
  # Node ID cad8025a2e87f88c06259790adfa15acb4080123
  # Query "tip^"
  # Mode revset expression search
  
  changeset:   1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
  revision:    2
  user:        test
  date:        Thu, 01 Jan 1970 00:00:00 +0000
  summary:     branch
  branch:      stable
  
  
  $ get-with-headers.py $LOCALIP:$HGPORT 'log?rev=last(all(),2)^&style=raw'
  200 Script output follows
  
  
  # HG changesets search
  # Node ID cad8025a2e87f88c06259790adfa15acb4080123
  # Query "last(all(),2)^"
  # Mode revset expression search
  
  changeset:   1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
  revision:    2
  user:        test
  date:        Thu, 01 Jan 1970 00:00:00 +0000
  summary:     branch
  branch:      stable
  
  changeset:   a4f92ed23982be056b9852de5dfe873eaac7f0de
  revision:    1
  user:        test
  date:        Thu, 01 Jan 1970 00:00:00 +0000
  summary:     Added tag 1.0 for changeset 2ef0ac749a14
  branch:      default
  
  
  $ get-with-headers.py $LOCALIP:$HGPORT 'log?rev=last(all(,2)^&style=raw'
  200 Script output follows
  
  
  # HG changesets search
  # Node ID cad8025a2e87f88c06259790adfa15acb4080123
  # Query "last(all(,2)^"
  # Mode literal keyword search
  
  
  $ get-with-headers.py $LOCALIP:$HGPORT 'log?rev=last(al(),2)^&style=raw'
  200 Script output follows
  
  
  # HG changesets search
  # Node ID cad8025a2e87f88c06259790adfa15acb4080123
  # Query "last(al(),2)^"
  # Mode literal keyword search
  
  
  $ get-with-headers.py $LOCALIP:$HGPORT 'log?rev=bookmark(anotherthing)&style=raw'
  200 Script output follows
  
  
  # HG changesets search
  # Node ID cad8025a2e87f88c06259790adfa15acb4080123
  # Query "bookmark(anotherthing)"
  # Mode revset expression search
  
  changeset:   2ef0ac749a14e4f57a5a822464a0902c6f7f448f
  revision:    0
  user:        test
  date:        Thu, 01 Jan 1970 00:00:00 +0000
  summary:     base
  tag:         1.0
  bookmark:    anotherthing
  
  
  $ get-with-headers.py $LOCALIP:$HGPORT 'log?rev=bookmark(abc)&style=raw'
  200 Script output follows
  
  
  # HG changesets search
  # Node ID cad8025a2e87f88c06259790adfa15acb4080123
  # Query "bookmark(abc)"
  # Mode literal keyword search
  
  
  $ get-with-headers.py $LOCALIP:$HGPORT 'log?rev=deadbeef:&style=raw'
  200 Script output follows
  
  
  # HG changesets search
  # Node ID cad8025a2e87f88c06259790adfa15acb4080123
  # Query "deadbeef:"
  # Mode literal keyword search
  
  

  $ get-with-headers.py $LOCALIP:$HGPORT 'log?rev=user("test")&style=raw'
  200 Script output follows
  
  
  # HG changesets search
  # Node ID cad8025a2e87f88c06259790adfa15acb4080123
  # Query "user("test")"
  # Mode revset expression search
  
  changeset:   cad8025a2e87f88c06259790adfa15acb4080123
  revision:    3
  user:        test
  date:        Thu, 01 Jan 1970 00:00:00 +0000
  summary:     branch commit with null character: \x00 (esc)
  branch:      unstable
  tag:         tip
  bookmark:    some-thing
  
  changeset:   1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
  revision:    2
  user:        test
  date:        Thu, 01 Jan 1970 00:00:00 +0000
  summary:     branch
  branch:      stable
  
  changeset:   a4f92ed23982be056b9852de5dfe873eaac7f0de
  revision:    1
  user:        test
  date:        Thu, 01 Jan 1970 00:00:00 +0000
  summary:     Added tag 1.0 for changeset 2ef0ac749a14
  branch:      default
  
  changeset:   2ef0ac749a14e4f57a5a822464a0902c6f7f448f
  revision:    0
  user:        test
  date:        Thu, 01 Jan 1970 00:00:00 +0000
  summary:     base
  tag:         1.0
  bookmark:    anotherthing
  
  
  $ get-with-headers.py $LOCALIP:$HGPORT 'log?rev=user("re:test")&style=raw'
  200 Script output follows
  
  
  # HG changesets search
  # Node ID cad8025a2e87f88c06259790adfa15acb4080123
  # Query "user("re:test")"
  # Mode literal keyword search
  
  
  $ get-with-headers.py $LOCALIP:$HGPORT 'log?rev=first(::)&style=raw'
  200 Script output follows
  
  
  # HG changesets search
  # Node ID cad8025a2e87f88c06259790adfa15acb4080123
  # Query "first(::)"
  # Mode literal keyword search
  
  

Revset query with foo-bar bookmark (issue5879)

  $ get-with-headers.py $LOCALIP:$HGPORT 'log?rev=some-thing%25anotherthing&style=raw'
  200 Script output follows
  
  
  # HG changesets search
  # Node ID cad8025a2e87f88c06259790adfa15acb4080123
  # Query "some-thing%anotherthing"
  # Mode revset expression search
  
  changeset:   cad8025a2e87f88c06259790adfa15acb4080123
  revision:    3
  user:        test
  date:        Thu, 01 Jan 1970 00:00:00 +0000
  summary:     branch commit with null character: \x00 (esc)
  branch:      unstable
  tag:         tip
  bookmark:    some-thing
  
  changeset:   1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
  revision:    2
  user:        test
  date:        Thu, 01 Jan 1970 00:00:00 +0000
  summary:     branch
  branch:      stable
  
  changeset:   a4f92ed23982be056b9852de5dfe873eaac7f0de
  revision:    1
  user:        test
  date:        Thu, 01 Jan 1970 00:00:00 +0000
  summary:     Added tag 1.0 for changeset 2ef0ac749a14
  branch:      default
  
  

File-related

  $ get-with-headers.py $LOCALIP:$HGPORT 'file/1/foo/?style=raw'
  200 Script output follows
  
  foo
  $ get-with-headers.py $LOCALIP:$HGPORT 'annotate/1/foo/?style=raw'
  200 Script output follows
  
  
  test@0: foo
  
  
  
  
  $ get-with-headers.py $LOCALIP:$HGPORT 'file/1/?style=raw'
  200 Script output follows
  
  
  drwxr-xr-x da
  -rw-r--r-- 45 .hgtags
  -rw-r--r-- 4 foo
  
  
  $ hg log --template "{file_mods}\n" -r 1
  
  $ hg parents --template "{node|short}\n" -r 1
  2ef0ac749a14
  $ hg parents --template "{node|short}\n" -r 1 foo
  2ef0ac749a14

  $ get-with-headers.py $LOCALIP:$HGPORT 'file/1/foo'
  200 Script output follows
  
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
  <head>
  <link rel="icon" href="/static/hgicon.png" type="image/png" />
  <meta name="robots" content="index, nofollow" />
  <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
  <script type="text/javascript" src="/static/mercurial.js"></script>
  
  <title>test: a4f92ed23982 foo</title>
  </head>
  <body>
  
  <div class="container">
  <div class="menu">
  <div class="logo">
  <a href="https://mercurial-scm.org/">
  <img src="/static/hglogo.png" alt="mercurial" /></a>
  </div>
  <ul>
  <li><a href="/shortlog/1">log</a></li>
  <li><a href="/graph/1">graph</a></li>
  <li><a href="/tags">tags</a></li>
  <li><a href="/bookmarks">bookmarks</a></li>
  <li><a href="/branches">branches</a></li>
  </ul>
  <ul>
  <li><a href="/rev/1">changeset</a></li>
  <li><a href="/file/1/">browse</a></li>
  </ul>
  <ul>
  <li class="active">file</li>
  <li><a href="/file/tip/foo">latest</a></li>
  <li><a href="/diff/1/foo">diff</a></li>
  <li><a href="/comparison/1/foo">comparison</a></li>
  <li><a href="/annotate/1/foo">annotate</a></li>
  <li><a href="/log/1/foo">file log</a></li>
  <li><a href="/raw-file/1/foo">raw</a></li>
  </ul>
  <ul>
  <li><a href="/help">help</a></li>
  </ul>
  </div>
  
  <div class="main">
  <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
  <h3>
   view foo @ 1:<a href="/rev/a4f92ed23982">a4f92ed23982</a>
   <span class="phase">draft</span> <span class="branchhead">default</span> 
  </h3>
  
  
  <form class="search" action="/log">
  
  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
  <div id="hint">Find changesets by keywords (author, files, the commit message), revision
  number or hash, or <a href="/help/revsets">revset expression</a>.</div>
  </form>
  
  <div class="description">Added tag 1.0 for changeset 2ef0ac749a14(websub)</div>
  
  <table id="changesetEntry">
  <tr>
   <th class="author">author</th>
   <td class="author">&#116;&#101;&#115;&#116;</td>
  </tr>
  <tr>
   <th class="date">date</th>
   <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
  </tr>
  <tr>
   <th class="author">parents</th>
   <td class="author"><a href="/file/2ef0ac749a14/foo">2ef0ac749a14</a> </td>
  </tr>
  <tr>
   <th class="author">children</th>
   <td class="author"><a href="/file/1d22e65f027e/foo">1d22e65f027e</a> </td>
  </tr>
  </table>
  
  <div class="overflow">
  <div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="#">on</a></div>
  <div class="sourcefirst"> line source</div>
  <pre class="sourcelines stripes4 wrap bottomline"
       data-logurl="/log/1/foo"
       data-selectabletag="SPAN"
       data-ishead="0">
  
  <span id="l1">foo</span><a href="#l1"></a>
  </pre>
  </div>
  
  <script type="text/javascript" src="/static/followlines.js"></script>
  
  </div>
  </div>
  
  
  
  </body>
  </html>
  
  $ get-with-headers.py $LOCALIP:$HGPORT 'filediff/0/foo/?style=raw'
  200 Script output follows
  
  
  diff -r 000000000000 -r 2ef0ac749a14 foo
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
  +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
  @@ -0,0 +1,1 @@
  +foo
  
  
  
  

  $ get-with-headers.py $LOCALIP:$HGPORT 'filediff/1/foo/?style=raw'
  200 Script output follows
  
  
  
  
  
  

  $ hg log --template "{file_mods}\n" -r 2
  foo
  $ hg parents --template "{node|short}\n" -r 2
  a4f92ed23982
  $ hg parents --template "{node|short}\n" -r 2 foo
  2ef0ac749a14

  $ get-with-headers.py $LOCALIP:$HGPORT 'file/2/foo'
  200 Script output follows
  
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
  <head>
  <link rel="icon" href="/static/hgicon.png" type="image/png" />
  <meta name="robots" content="index, nofollow" />
  <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
  <script type="text/javascript" src="/static/mercurial.js"></script>
  
  <title>test: 1d22e65f027e foo</title>
  </head>
  <body>
  
  <div class="container">
  <div class="menu">
  <div class="logo">
  <a href="https://mercurial-scm.org/">
  <img src="/static/hglogo.png" alt="mercurial" /></a>
  </div>
  <ul>
  <li><a href="/shortlog/2">log</a></li>
  <li><a href="/graph/2">graph</a></li>
  <li><a href="/tags">tags</a></li>
  <li><a href="/bookmarks">bookmarks</a></li>
  <li><a href="/branches">branches</a></li>
  </ul>
  <ul>
  <li><a href="/rev/2">changeset</a></li>
  <li><a href="/file/2/">browse</a></li>
  </ul>
  <ul>
  <li class="active">file</li>
  <li><a href="/file/tip/foo">latest</a></li>
  <li><a href="/diff/2/foo">diff</a></li>
  <li><a href="/comparison/2/foo">comparison</a></li>
  <li><a href="/annotate/2/foo">annotate</a></li>
  <li><a href="/log/2/foo">file log</a></li>
  <li><a href="/raw-file/2/foo">raw</a></li>
  </ul>
  <ul>
  <li><a href="/help">help</a></li>
  </ul>
  </div>
  
  <div class="main">
  <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
  <h3>
   view foo @ 2:<a href="/rev/1d22e65f027e">1d22e65f027e</a>
   <span class="phase">draft</span> <span class="branchhead">stable</span> 
  </h3>
  
  
  <form class="search" action="/log">
  
  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
  <div id="hint">Find changesets by keywords (author, files, the commit message), revision
  number or hash, or <a href="/help/revsets">revset expression</a>.</div>
  </form>
  
  <div class="description">branch(websub)</div>
  
  <table id="changesetEntry">
  <tr>
   <th class="author">author</th>
   <td class="author">&#116;&#101;&#115;&#116;</td>
  </tr>
  <tr>
   <th class="date">date</th>
   <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
  </tr>
  <tr>
   <th class="author">parents</th>
   <td class="author"><a href="/file/2ef0ac749a14/foo">2ef0ac749a14</a> </td>
  </tr>
  <tr>
   <th class="author">children</th>
   <td class="author"></td>
  </tr>
  </table>
  
  <div class="overflow">
  <div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="#">on</a></div>
  <div class="sourcefirst"> line source</div>
  <pre class="sourcelines stripes4 wrap bottomline"
       data-logurl="/log/2/foo"
       data-selectabletag="SPAN"
       data-ishead="1">
  
  <span id="l1">another</span><a href="#l1"></a>
  </pre>
  </div>
  
  <script type="text/javascript" src="/static/followlines.js"></script>
  
  </div>
  </div>
  
  
  
  </body>
  </html>
  


Overviews

  $ get-with-headers.py $LOCALIP:$HGPORT 'raw-tags'
  200 Script output follows
  
  tip	cad8025a2e87f88c06259790adfa15acb4080123
  1.0	2ef0ac749a14e4f57a5a822464a0902c6f7f448f
  $ get-with-headers.py $LOCALIP:$HGPORT 'raw-branches'
  200 Script output follows
  
  unstable	cad8025a2e87f88c06259790adfa15acb4080123	open
  stable	1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe	inactive
  default	a4f92ed23982be056b9852de5dfe873eaac7f0de	inactive
  $ get-with-headers.py $LOCALIP:$HGPORT 'raw-bookmarks'
  200 Script output follows
  
  some-thing	cad8025a2e87f88c06259790adfa15acb4080123
  anotherthing	2ef0ac749a14e4f57a5a822464a0902c6f7f448f
  $ get-with-headers.py $LOCALIP:$HGPORT 'summary/?style=gitweb'
  200 Script output follows
  
  <?xml version="1.0" encoding="ascii"?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
  <head>
  <link rel="icon" href="/static/hgicon.png" type="image/png" />
  <meta name="robots" content="index, nofollow"/>
  <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
  <script type="text/javascript" src="/static/mercurial.js"></script>
  
  <title>test: Summary</title>
  <link rel="alternate" type="application/atom+xml"
     href="/atom-log" title="Atom feed for test"/>
  <link rel="alternate" type="application/rss+xml"
     href="/rss-log" title="RSS feed for test"/>
  </head>
  <body>
  
  <div class="page_header">
  <a href="https://mercurial-scm.org/" title="Mercurial" style="float: right;">Mercurial</a>
  <a href="/">Mercurial</a>  / summary
  </div>
  
  <div class="page_nav">
  <div>
  summary |
  <a href="/shortlog?style=gitweb">shortlog</a> |
  <a href="/log?style=gitweb">changelog</a> |
  <a href="/graph?style=gitweb">graph</a> |
  <a href="/tags?style=gitweb">tags</a> |
  <a href="/bookmarks?style=gitweb">bookmarks</a> |
  <a href="/branches?style=gitweb">branches</a> |
  <a href="/file?style=gitweb">files</a> |
  <a href="/help?style=gitweb">help</a>
  </div>
  
  <div class="search">
  <form id="searchform" action="/log">
  <input type="hidden" name="style" value="gitweb" />
  <input name="rev" type="text" value="" size="40" />
  <div id="hint">Find changesets by keywords (author, files, the commit message), revision
  number or hash, or <a href="/help/revsets">revset expression</a>.</div>
  </form>
  </div>
  </div>
  
  <div class="title">&nbsp;</div>
  <table cellspacing="0">
  <tr><td>description</td><td>unknown</td></tr>
  <tr><td>owner</td><td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td></tr>
  <tr><td>last change</td><td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
  </table>
  
  <div><a  class="title" href="/shortlog?style=gitweb">changes</a></div>
  <table cellspacing="0">
  
  <tr class="parity0">
  <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
  <td><i>test</i></td>
  <td>
  <a class="list" href="/rev/cad8025a2e87?style=gitweb">
  <b>branch commit with null character: </b>
  <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="branchtag" title="unstable">unstable</span> <span class="tagtag" title="tip">tip</span> <span class="bookmarktag" title="some-thing">some-thing</span> </span>
  </a>
  </td>
  <td class="link" nowrap>
  <a href="/rev/cad8025a2e87?style=gitweb">changeset</a> |
  <a href="/file/cad8025a2e87?style=gitweb">files</a>
  </td>
  </tr>
  <tr class="parity1">
  <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
  <td><i>test</i></td>
  <td>
  <a class="list" href="/rev/1d22e65f027e?style=gitweb">
  <b>branch</b>
  <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="branchtag" title="stable">stable</span> </span>
  </a>
  </td>
  <td class="link" nowrap>
  <a href="/rev/1d22e65f027e?style=gitweb">changeset</a> |
  <a href="/file/1d22e65f027e?style=gitweb">files</a>
  </td>
  </tr>
  <tr class="parity0">
  <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
  <td><i>test</i></td>
  <td>
  <a class="list" href="/rev/a4f92ed23982?style=gitweb">
  <b>Added tag 1.0 for changeset 2ef0ac749a14</b>
  <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="branchtag" title="default">default</span> </span>
  </a>
  </td>
  <td class="link" nowrap>
  <a href="/rev/a4f92ed23982?style=gitweb">changeset</a> |
  <a href="/file/a4f92ed23982?style=gitweb">files</a>
  </td>
  </tr>
  <tr class="parity1">
  <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
  <td><i>test</i></td>
  <td>
  <a class="list" href="/rev/2ef0ac749a14?style=gitweb">
  <b>base</b>
  <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="tagtag" title="1.0">1.0</span> <span class="bookmarktag" title="anotherthing">anotherthing</span> </span>
  </a>
  </td>
  <td class="link" nowrap>
  <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
  <a href="/file/2ef0ac749a14?style=gitweb">files</a>
  </td>
  </tr>
  <tr class="light"><td colspan="4"><a class="list" href="/shortlog?style=gitweb">...</a></td></tr>
  </table>
  
  <div><a class="title" href="/tags?style=gitweb">tags</a></div>
  <table cellspacing="0">
  
  <tr class="parity0">
  <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
  <td><a class="list" href="/rev/1.0?style=gitweb"><b>1.0</b></a></td>
  <td class="link">
  <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
  <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> |
  <a href="/file/2ef0ac749a14?style=gitweb">files</a>
  </td>
  </tr>
  <tr class="light"><td colspan="3"><a class="list" href="/tags?style=gitweb">...</a></td></tr>
  </table>
  
  <div><a class="title" href="/bookmarks?style=gitweb">bookmarks</a></div>
  <table cellspacing="0">
  
  <tr class="parity0">
  <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
  <td><a class="list" href="/rev/some-thing?style=gitweb"><b>some-thing</b></a></td>
  <td class="link">
  <a href="/rev/cad8025a2e87?style=gitweb">changeset</a> |
  <a href="/log/cad8025a2e87?style=gitweb">changelog</a> |
  <a href="/file/cad8025a2e87?style=gitweb">files</a>
  </td>
  </tr>
  <tr class="parity1">
  <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
  <td><a class="list" href="/rev/anotherthing?style=gitweb"><b>anotherthing</b></a></td>
  <td class="link">
  <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
  <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> |
  <a href="/file/2ef0ac749a14?style=gitweb">files</a>
  </td>
  </tr>
  <tr class="light"><td colspan="3"><a class="list" href="/bookmarks?style=gitweb">...</a></td></tr>
  </table>
  
  <div><a class="title" href="/branches?style=gitweb">branches</a></div>
  <table cellspacing="0">
  
  <tr class="parity0">
  <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
  <td class="open"><a class="list" href="/shortlog/unstable?style=gitweb"><b>unstable</b></a></td>
  <td class="link">
  <a href="/changeset/cad8025a2e87?style=gitweb">changeset</a> |
  <a href="/log/cad8025a2e87?style=gitweb">changelog</a> |
  <a href="/file/cad8025a2e87?style=gitweb">files</a>
  </td>
  </tr>
  <tr class="parity1">
  <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
  <td class="inactive"><a class="list" href="/shortlog/stable?style=gitweb"><b>stable</b></a></td>
  <td class="link">
  <a href="/changeset/1d22e65f027e?style=gitweb">changeset</a> |
  <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
  <a href="/file/1d22e65f027e?style=gitweb">files</a>
  </td>
  </tr>
  <tr class="parity0">
  <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
  <td class="inactive"><a class="list" href="/shortlog/default?style=gitweb"><b>default</b></a></td>
  <td class="link">
  <a href="/changeset/a4f92ed23982?style=gitweb">changeset</a> |
  <a href="/log/a4f92ed23982?style=gitweb">changelog</a> |
  <a href="/file/a4f92ed23982?style=gitweb">files</a>
  </td>
  </tr>
  <tr class="light">
    <td colspan="3"><a class="list" href="/branches?style=gitweb">...</a></td>
  </tr>
  </table>
  <div class="page_footer">
  <div class="page_footer_text">test</div>
  <div class="rss_logo">
  <a href="/rss-log">RSS</a>
  <a href="/atom-log">Atom</a>
  </div>
  <br />
  
  </div>
  </body>
  </html>
  
  $ get-with-headers.py $LOCALIP:$HGPORT 'graph/?style=gitweb'
  200 Script output follows
  
  <?xml version="1.0" encoding="ascii"?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
  <head>
  <link rel="icon" href="/static/hgicon.png" type="image/png" />
  <meta name="robots" content="index, nofollow"/>
  <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
  <script type="text/javascript" src="/static/mercurial.js"></script>
  
  <title>test: Graph</title>
  <link rel="alternate" type="application/atom+xml"
     href="/atom-log" title="Atom feed for test"/>
  <link rel="alternate" type="application/rss+xml"
     href="/rss-log" title="RSS feed for test"/>
  </head>
  <body>
  
  <div class="page_header">
  <a href="https://mercurial-scm.org/" title="Mercurial" style="float: right;">Mercurial</a>
  <a href="/">Mercurial</a>  / graph
  </div>
  
  <div class="page_nav">
  <div>
  <a href="/summary?style=gitweb">summary</a> |
  <a href="/shortlog/tip?style=gitweb">shortlog</a> |
  <a href="/log/tip?style=gitweb">changelog</a> |
  graph |
  <a href="/tags?style=gitweb">tags</a> |
  <a href="/bookmarks?style=gitweb">bookmarks</a> |
  <a href="/branches?style=gitweb">branches</a> |
  <a href="/file/tip?style=gitweb">files</a> |
  <a href="/help?style=gitweb">help</a>
  <br/>
  <a href="/graph/tip?revcount=30&style=gitweb">less</a>
  <a href="/graph/tip?revcount=120&style=gitweb">more</a>
  | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/tip?style=gitweb">tip</a> 
  </div>
  
  <div class="search">
  <form id="searchform" action="/log">
  <input type="hidden" name="style" value="gitweb" />
  <input name="rev" type="text" value="" size="40" />
  <div id="hint">Find changesets by keywords (author, files, the commit message), revision
  number or hash, or <a href="/help/revsets">revset expression</a>.</div>
  </form>
  </div>
  </div>
  
  <div class="title">&nbsp;</div>
  
  <noscript>The revision graph only works with JavaScript-enabled browsers.</noscript>
  
  <div id="wrapper">
  <canvas id="graph"></canvas>
  <ul id="graphnodes"><li class="parity0" data-node="cad8025a2e87">
   <div class="fg">
    <span class="desc">
     <a class="list" href="/rev/cad8025a2e87?style=gitweb"><b>branch commit with null character: </b></a>
    </span>
    <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="branchtag" title="unstable">unstable</span> <span class="tagtag" title="tip">tip</span> <span class="bookmarktag" title="some-thing">some-thing</span> </span>
    <div class="info">1970-01-01, by test</div>
   </div>
  </li>
  <li class="parity1" data-node="1d22e65f027e">
   <div class="fg">
    <span class="desc">
     <a class="list" href="/rev/1d22e65f027e?style=gitweb"><b>branch</b></a>
    </span>
    <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="branchtag" title="stable">stable</span> </span>
    <div class="info">1970-01-01, by test</div>
   </div>
  </li>
  <li class="parity0" data-node="a4f92ed23982">
   <div class="fg">
    <span class="desc">
     <a class="list" href="/rev/a4f92ed23982?style=gitweb"><b>Added tag 1.0 for changeset 2ef0ac749a14</b></a>
    </span>
    <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="branchtag" title="default">default</span> </span>
    <div class="info">1970-01-01, by test</div>
   </div>
  </li>
  <li class="parity1" data-node="2ef0ac749a14">
   <div class="fg">
    <span class="desc">
     <a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>base</b></a>
    </span>
    <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="tagtag" title="1.0">1.0</span> <span class="bookmarktag" title="anotherthing">anotherthing</span> </span>
    <div class="info">1970-01-01, by test</div>
   </div>
  </li>
  </ul>
  </div>
  
  <script>
  var data = [{"edges": [[0, 0, 1, 3, "FF0000"]], "graphnode": "@o", "node": "cad8025a2e87", "vertex": [0, 1]}, {"edges": [[0, 0, 1, 3, ""]], "graphnode": "o", "node": "1d22e65f027e", "vertex": [0, 1]}, {"edges": [[0, 0, 1, 3, ""]], "graphnode": "o", "node": "a4f92ed23982", "vertex": [0, 1]}, {"edges": [], "graphnode": "o", "node": "2ef0ac749a14", "vertex": [0, 1]}];
  var graph = new Graph();
  graph.scale(39);
  graph.render(data);
  </script>
  
  <div class="extra_nav">
  <a href="/graph/tip?revcount=30&style=gitweb">less</a>
  <a href="/graph/tip?revcount=120&style=gitweb">more</a>
  | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/tip?style=gitweb">tip</a> 
  </div>
  
  <script type="text/javascript">
      ajaxScrollInit(
              '/graph/%next%?graphtop=cad8025a2e87f88c06259790adfa15acb4080123&style=gitweb',
              '', <!-- NEXTHASH
              function (htmlText) {
                  var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
                  return m ? m[1] : null;
              },
              '#wrapper',
              '<div class="%class%" style="text-align: center;">%text%</div>',
              'graph'
      );
  </script>
  
  <div class="page_footer">
  <div class="page_footer_text">test</div>
  <div class="rss_logo">
  <a href="/rss-log">RSS</a>
  <a href="/atom-log">Atom</a>
  </div>
  <br />
  
  </div>
  </body>
  </html>
  
raw graph

  $ get-with-headers.py $LOCALIP:$HGPORT 'graph/?style=raw'
  200 Script output follows
  
  
  # HG graph
  # Node ID cad8025a2e87f88c06259790adfa15acb4080123
  # Rows shown 4
  
  changeset:   cad8025a2e87
  user:        test
  date:        1970-01-01
  summary:     branch commit with null character: \x00 (esc)
  branch:      unstable
  tag:         tip
  bookmark:    some-thing
  
  node:        (0, 0) (color 1)
  edge:        (0, 0) -> (0, 1) (color 1)
  
  changeset:   1d22e65f027e
  user:        test
  date:        1970-01-01
  summary:     branch
  branch:      stable
  
  node:        (0, 1) (color 1)
  edge:        (0, 1) -> (0, 2) (color 1)
  
  changeset:   a4f92ed23982
  user:        test
  date:        1970-01-01
  summary:     Added tag 1.0 for changeset 2ef0ac749a14
  branch:      default
  
  node:        (0, 2) (color 1)
  edge:        (0, 2) -> (0, 3) (color 1)
  
  changeset:   2ef0ac749a14
  user:        test
  date:        1970-01-01
  summary:     base
  tag:         1.0
  bookmark:    anotherthing
  
  node:        (0, 3) (color 1)
  
  

capabilities

  $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities'; echo
  200 Script output follows
  
  batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash

wire protocol command to wrong base URL

  $ get-with-headers.py $LOCALIP:$HGPORT 'foo?cmd=capabilities' -
  404 Not Found
  content-length: 12
  content-type: application/mercurial-0.1
  date: $HTTP_DATE$
  server: testing stub value
  
  0
  Not Found
  [1]

heads

  $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=heads'
  200 Script output follows
  
  cad8025a2e87f88c06259790adfa15acb4080123

branches

  $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=branches&nodes=0000000000000000000000000000000000000000'
  200 Script output follows
  
  0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000

changegroup

  $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=changegroup&roots=0000000000000000000000000000000000000000'
  200 Script output follows
  
  x\x9c\xbd\x94MHTQ\x14\xc7'+\x9d\xc66\x81\x89P\xc1\xa3\x14\xcct\xba\xef\xbe\xfb\xde\xbb\xcfr0\xb3"\x02\x11[%\x98\xdcO\xa7\xd2\x19\x98y\xd2\x07h"\x96\xa0e\xda\xa6lUY-\xca\x08\xa2\x82\x16\x96\xd1\xa2\xf0#\xc8\x95\x1b\xdd$!m*"\xc8\x82\xea\xbe\x9c\x01\x85\xc9\x996\x1d\xf8\xc1\xe3~\x9d\xff9\xef\x7f\xaf\xcf\xe7\xbb\x19\xfc4\xec^\xcb\x9b\xfbz\xa6\xbe\xb3\x90_\xef/\x8d\x9e\xad\xbe\xe4\xcb0\xd2\xec\xad\x12X:\xc8\x12\x12\xd9:\x95\xba	\x1cG\xb7$\xc5\xc44\x1c(\x1d\x03\x03\xdb\x84\x0cK#\xe0\x8a\xb8\x1b\x00\x1a\x08p\xb2SF\xa3\x01\x8f\x00%q\xa1Ny{k!8\xe5t>[{\xe2j\xddl\xc3\xcf\xee\xd0\xddW\x9ff3U\x9djobj\xbb\x87E\x88\x05l\x001\x12\x18\x13\xc6 \xb7(\xe3\x02a\x80\x81\xcel.u\x9b\x1b\x8c\x91\x80Z\x0c\x15\x15 (esc)
  \x7f0\xdc\xe4\x92\xa6\xb87\x16\xf2\xcaT\x14\xef\xe1\\pM\r (no-eol) (esc)
  kz\x10h2\x1a\xd3X\x98D\x9aD\\\xb8\x1a\x14\x12\x10f#\x87\xe8H\xad\x1d\xd9\xb2\xf5}cV{}\xf6:\xb3\xbd\xad\xaf\xd5?\xb9\xe3\xf6\xd4\xcf\x15\x84.\x8bT{\x97\x16\xa4Z\xeaX\x10\xabL\xc8\x81DJ\xc8\x18\x00\xccq\x80A-j2j	\x83\x1b\x02\x03O|PQ\xae\xc8W\x9d\xd7h\x8cDX\xb8<\xee\x12\xda,\xfe\xfc\x005\xb3K\xc1\x14\xd9\x8b\xb3^C\xc7\xa6\xb3\xea\x83\xdd\xdf.d\x17]\xe9\xbf\xff}\xe3\xf0#\xff\xaam+\x88Z\x16\xa9\xf6&tT+\xf2\x96\xe8h\x8d$\x94\xa8\xf1}\x8aC\x8a\xc2\xc59\x8dE[Z\x8e\xb9\xda\xc9cnX\x8b\xb467{\xad\x8e\x11\xe6\x8aX\xb9\x96L52\xbf\xb0\xff\xe3\x81M\x9fk\x07\xf3\x7f\xf4\x1c\xbe\xbc\x80s\xea^\x7fY\xc1\xca\xcb"\x8d\xbb\x1a\x16]\xea\x83\x82Cb8:$\x80Bd\x02\x08\x90!\x88P^\x12\x88B\xdba:\xa6\x0e\xe0<\xf0O\x8bU\x82\x81\xe3wr\xb2\xba\xe6{&\xcaNL\xceutln\xfb\xdc\xb6{,\xd3\x82\xd28IO\xb8\xd7G\x0cF!\x16\x86\x8d\x11@\x02A\xcb\xc2\x94Q\x04L\x01\x00u8\x86&0\xb0EtO\xd0\xc5\x9c#\xb4'\xef`\xc9\xaf\xd2\xd1\xf5\x83\xab\x9f<\x1e\x8fT\x84:R\x89L%\xe8/\xee \x8a>E\x99\xd7\x1dlZ\x08B\x1dc\xf5\\0\x83\x01B\x95Im\x1d[\x92s*\x99`L\xd7\x894e qfn\xb2 (esc)
  \xa5mh\xbc\xf8\xdd\xa9\xca\x9a*\xd9;^y\xd4\xf7t\xbah\xf5\xf9\x1b\x99\xfe\xe94\xcd*[zu\x05\x92\xa6ML\x82!D\x16"\xc0\x01\x90Y\xd2\x96\x08a\xe9\xdd\xfa\xa4\xb6\xc4#\xa6\xbexpjh\xa0$\xb7\xb0V\xdb\xfba\xbef\xee\xe1\xe9\x17\xbd\xfd3\x99JKc\xc25\x89+\xeaE\xce\xffK\x17>\xc7\xb7\x16tE^\x8e\xde\x0bu\x17Dg\x9e\xbf\x99\xd8\xf0\xa01\xd3\xbc+\xbc\x13k\x14~\x12\x89\xbaa\x11K\x96\xe5\xfb\r (no-eol) (esc)
  \x95)\xbe\xf6 (no-eol) (esc)

stream_out

  $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=stream_out'
  200 Script output follows
  
  1

failing unbundle, requires POST request

  $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=unbundle'
  405 push requires POST request
  
  0
  push requires POST request
  [1]

Static files

  $ get-with-headers.py $LOCALIP:$HGPORT 'static/style.css'
  200 Script output follows
  
  a { text-decoration:none; }
  .age { white-space:nowrap; }
  .date { white-space:nowrap; }
  .indexlinks { white-space:nowrap; }
  .parity0 { background-color: #ddd; color: #000; }
  .parity1 { background-color: #eee; color: #000; }
  .lineno { width: 60px; color: #aaa; font-size: smaller;
            text-align: right; }
  .plusline { color: green; }
  .minusline { color: red; }
  .atline { color: purple; }
  .annotate { font-size: smaller; text-align: right; padding-right: 1em; }
  tr.thisrev a { color:#999999; text-decoration: none; }
  tr.thisrev pre { color:#009900; }
  td.annotate {
    white-space: nowrap;
  }
  div.annotate-info {
    display: none;
    position: absolute;
    background-color: #FFFFFF;
    border: 1px solid #888;
    text-align: left;
    color: #000000;
    padding: 5px;
  }
  div.annotate-info a { color: #0000FF; }
  td.annotate:hover div.annotate-info { display: inline; }
  .buttons a {
    background-color: #666;
    padding: 2pt;
    color: white;
    font-family: sans-serif;
    font-weight: bold;
  }
  .navigate a {
    background-color: #ccc;
    padding: 2pt;
    font-family: sans-serif;
    color: black;
  }
  
  .metatag {
    background-color: #888;
    color: white;
    text-align: right;
  }
  
  /* Common */
  pre { margin: 0; }
  
  .logo {
    float: right;
    clear: right;
  }
  
  /* Changelog/Filelog entries */
  .logEntry { width: 100%; }
  .logEntry .age { width: 15%; }
  .logEntry th.label { width: 16em; }
  .logEntry th { font-weight: normal; text-align: right; vertical-align: top; }
  .logEntry th.age, .logEntry th.firstline { font-weight: bold; }
  .logEntry th.firstline { text-align: left; width: inherit; }
  
  /* Shortlog entries */
  .slogEntry { width: 100%; }
  .slogEntry .age { width: 8em; }
  .slogEntry td { font-weight: normal; text-align: left; vertical-align: top; }
  .slogEntry td.author { width: 15em; }
  
  /* Tag entries */
  #tagEntries { list-style: none; margin: 0; padding: 0; }
  #tagEntries .tagEntry { list-style: none; margin: 0; padding: 0; }
  
  /* Changeset entry */
  #changesetEntry { }
  #changesetEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
  #changesetEntry th.files, #changesetEntry th.description { vertical-align: top; }
  
  /* File diff view */
  #filediffEntry { }
  #filediffEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
  
  /* Graph */
  div#wrapper {
  	position: relative;
  	margin: 0;
  	padding: 0;
  }
  
  canvas {
  	position: absolute;
  	z-index: 5;
  	top: -0.6em;
  	margin: 0;
  }
  
  ul#graphnodes {
  	list-style: none inside none;
  	padding: 0;
  	margin: 0;
  }
  
  ul#graphnodes li {
  	height: 37px;
  	overflow: visible;
  	padding-top: 2px;
  }
  
  ul#graphnodes li .fg {
  	position: absolute;
  	z-index: 10;
  }
  
  ul#graphnodes li .info {
  	font-size: 70%;
  }

Stop and restart the server at the directory different from the repository
root. Even in such case, file patterns should be resolved relative to the
repository root. (issue4568)

  $ killdaemons.py
  $ hg serve --config server.preferuncompressed=True -n test \
  > -p $HGPORT -d --pid-file=`pwd`/hg.pid -E `pwd`/errors.log \
  > --cwd .. -R `pwd`
  $ cat hg.pid >> $DAEMON_PIDS

  $ get-with-headers.py $LOCALIP:$HGPORT 'log?rev=adds("foo")&style=raw'
  200 Script output follows
  
  
  # HG changesets search
  # Node ID cad8025a2e87f88c06259790adfa15acb4080123
  # Query "adds("foo")"
  # Mode revset expression search
  
  changeset:   2ef0ac749a14e4f57a5a822464a0902c6f7f448f
  revision:    0
  user:        test
  date:        Thu, 01 Jan 1970 00:00:00 +0000
  summary:     base
  tag:         1.0
  bookmark:    anotherthing
  
  

capabilities

(plain version to check the format)

  $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | dd ibs=76 count=1 2> /dev/null; echo
  200 Script output follows
  
  batch branchmap bundle2=HG20%0Abookmarks%0Achange

(spread version to check the content)

  $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n'; echo
  200
  Script
  output
  follows
  
  batch
  branchmap
  $USUAL_BUNDLE2_CAPS$
  changegroupsubset
  compression=$BUNDLE2_COMPRESSIONS$
  getbundle
  httpheader=1024
  httpmediatype=0.1rx,0.1tx,0.2tx
  known
  lookup
  pushkey
  stream-preferred
  streamreqs=generaldelta,revlogv1,sparserevlog
  unbundle=HG10GZ,HG10BZ,HG10UN
  unbundlehash

heads

ERRORS ENCOUNTERED

  $ cat errors.log
  $ killdaemons.py

  $ cd ..

Test graph paging

  $ mkcommit() {
  >  echo $1 >> a
  >  hg ci -Am $1 a
  > }

  $ hg init graph
  $ cd graph
  $ mkcommit 0
  $ mkcommit 1
  $ mkcommit 2
  $ mkcommit 3
  $ mkcommit 4
  $ mkcommit 5
  $ hg serve --config server.uncompressed=False \
  >          --config web.maxshortchanges=2 \
  >          -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
  $ cat hg.pid >> $DAEMON_PIDS
  $ hg log -G --template '{rev}:{node|short} {desc}\n'
  @  5:aed2d9c1d0e7 5
  |
  o  4:b60a39a85a01 4
  |
  o  3:ada793dcc118 3
  |
  o  2:ab4f1438558b 2
  |
  o  1:e06180cbfb0c 1
  |
  o  0:b4e73ffab476 0
  

Test paging

  $ get-with-headers.py $LOCALIP:$HGPORT \
  >   'graph/?style=raw' | grep changeset
  changeset:   aed2d9c1d0e7
  changeset:   b60a39a85a01

  $ get-with-headers.py $LOCALIP:$HGPORT \
  >   'graph/?style=raw&revcount=3' | grep changeset
  changeset:   aed2d9c1d0e7
  changeset:   b60a39a85a01
  changeset:   ada793dcc118

  $ get-with-headers.py $LOCALIP:$HGPORT \
  >   'graph/e06180cbfb0?style=raw&revcount=3' | grep changeset
  changeset:   e06180cbfb0c
  changeset:   b4e73ffab476

  $ get-with-headers.py $LOCALIP:$HGPORT \
  >   'graph/b4e73ffab47?style=raw&revcount=3' | grep changeset
  changeset:   b4e73ffab476

  $ cat errors.log

MSYS changes environment variables starting with '/' into 'C:/MinGW/msys/1.0',
which changes the status line to '400 no such method: C:'.

#if no-msys

bookmarks view doesn't choke on bookmarks on secret changesets (issue3774)

  $ hg phase -fs 4
  $ hg bookmark -r4 secret
  $ cat > hgweb.cgi <<HGWEB
  > from mercurial import demandimport; demandimport.enable()
  > from mercurial.hgweb import hgweb
  > from mercurial.hgweb import wsgicgi
  > app = hgweb(b'.', b'test')
  > wsgicgi.launch(app)
  > HGWEB
  $ . "$TESTDIR/cgienv"
  $ PATH_INFO=/bookmarks; export PATH_INFO
  $ QUERY_STRING='style=raw'
  $ "$PYTHON" hgweb.cgi | grep -v ETag:
  Status: 200 Script output follows\r (esc)
  Content-Type: text/plain; charset=ascii\r (esc)
  \r (esc)

listbookmarks hides secret bookmarks

  $ PATH_INFO=/; export PATH_INFO
  $ QUERY_STRING='cmd=listkeys&namespace=bookmarks'
  $ "$PYTHON" hgweb.cgi
  Status: 200 Script output follows\r (esc)
  Content-Type: application/mercurial-0.1\r (esc)
  Content-Length: 0\r (esc)
  \r (esc)

search works with filtering

  $ PATH_INFO=/log; export PATH_INFO
  $ QUERY_STRING='rev=babar'
  $ "$PYTHON" hgweb.cgi > search
  $ grep Status search
  Status: 200 Script output follows\r (esc)

summary works with filtering (issue3810)

  $ PATH_INFO=/summary; export PATH_INFO
  $ QUERY_STRING='style=monoblue'; export QUERY_STRING
  $ "$PYTHON" hgweb.cgi > summary.out
  $ grep "^Status" summary.out
  Status: 200 Script output follows\r (esc)

proper status for filtered revision


(missing rev)

  $ PATH_INFO=/rev/5; export PATH_INFO
  $ QUERY_STRING='style=raw'
  $ "$PYTHON" hgweb.cgi #> search
  Status: 404 Not Found\r (esc)
  ETag: W/"*"\r (glob) (esc)
  Content-Type: text/plain; charset=ascii\r (esc)
  \r (esc)
  
  error: filtered revision '5' (not in 'served' subset)



(filtered rev)

  $ PATH_INFO=/rev/4; export PATH_INFO
  $ QUERY_STRING='style=raw'
  $ "$PYTHON" hgweb.cgi #> search
  Status: 404 Not Found\r (esc)
  ETag: W/"*"\r (glob) (esc)
  Content-Type: text/plain; charset=ascii\r (esc)
  \r (esc)
  
  error: filtered revision '4' (not in 'served' subset)

filtered '0' changeset

(create new root)
  $ hg up null
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
  $ echo 'babar' > jungle
  $ hg add jungle
  $ hg ci -m 'Babar is in the jungle!'
  created new head
  $ hg graft 0::
  grafting 0:b4e73ffab476 "0"
  grafting 1:e06180cbfb0c "1"
  grafting 2:ab4f1438558b "2"
  grafting 3:ada793dcc118 "3"
  grafting 4:b60a39a85a01 "4" (secret)
  grafting 5:aed2d9c1d0e7 "5"
(turning the initial root secret (filtered))
  $ hg phase --force --secret 0
  $ PATH_INFO=/graph/; export PATH_INFO
  $ QUERY_STRING=''
  $ "$PYTHON" hgweb.cgi | grep Status
  Status: 200 Script output follows\r (esc)
(check rendered revision)
  $ QUERY_STRING='style=raw'
  $ "$PYTHON" hgweb.cgi | grep -v ETag
  Status: 200 Script output follows\r (esc)
  Content-Type: text/plain; charset=ascii\r (esc)
  \r (esc)
  
  # HG graph
  # Node ID 1d9b947fef1fbb382a95c11a8f5a67e9a10b5026
  # Rows shown 7
  
  changeset:   1d9b947fef1f
  user:        test
  date:        1970-01-01
  summary:     5
  branch:      default
  tag:         tip
  
  node:        (0, 0) (color 1)
  edge:        (0, 0) -> (0, 1) (color 1)
  
  changeset:   0cfd435fd222
  user:        test
  date:        1970-01-01
  summary:     4
  
  node:        (0, 1) (color 1)
  edge:        (0, 1) -> (0, 2) (color 1)
  
  changeset:   6768b9939e82
  user:        test
  date:        1970-01-01
  summary:     3
  
  node:        (0, 2) (color 1)
  edge:        (0, 2) -> (0, 3) (color 1)
  
  changeset:   05b0497fd125
  user:        test
  date:        1970-01-01
  summary:     2
  
  node:        (0, 3) (color 1)
  edge:        (0, 3) -> (0, 4) (color 1)
  
  changeset:   9c102df67cfb
  user:        test
  date:        1970-01-01
  summary:     1
  
  node:        (0, 4) (color 1)
  edge:        (0, 4) -> (0, 5) (color 1)
  
  changeset:   3ebcd7db11bf
  user:        test
  date:        1970-01-01
  summary:     0
  
  node:        (0, 5) (color 1)
  edge:        (0, 5) -> (0, 6) (color 1)
  
  changeset:   c5e9bd96ae01
  user:        test
  date:        1970-01-01
  summary:     Babar is in the jungle!
  
  node:        (0, 6) (color 1)
  
  
#endif


  $ cd ..