# HG changeset patch # User Matt Mackall # Date 1285526492 18000 # Node ID abbe2e9799484370f0451b5393f84eea775c521b # Parent 7f3af5da4e6c418698aaf63d73f6e30808f105a2 tests: unify test-hgweb-commands diff -r 7f3af5da4e6c -r abbe2e979948 tests/test-hgweb-commands --- a/tests/test-hgweb-commands Sun Sep 26 13:41:32 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -#!/bin/sh -# 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 - -echo % Set up the repo -hg init test -cd test -mkdir da -echo foo > da/foo -echo foo > foo -hg ci -Ambase -hg tag 1.0 -echo another > foo -hg branch stable -hg ci -Ambranch -hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log -cat hg.pid >> $DAEMON_PIDS - -echo % Logs and changes -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/foo/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/' -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/' -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw' -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log?rev=base' - -echo % File-related -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw' -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/annotate/1/foo/?style=raw' -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/?style=raw' -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo' -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw' - -echo % Overviews -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-tags' -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-branches' -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb' -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb' - -echo % capabilities -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities' -echo % heads -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=heads' -echo % lookup -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=lookup&key=1' -echo % branches -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=branches&nodes=0000000000000000000000000000000000000000' -echo % changegroup -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup&roots=0000000000000000000000000000000000000000' \ - | $TESTDIR/printrepr.py -echo % stream_out -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=stream_out' -echo % failing unbundle, requires POST request -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=unbundle' - -echo % Static files -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css' - -echo % Stop and restart with HGENCODING=cp932 -"$TESTDIR/killdaemons.py" -HGENCODING=cp932 hg serve --config server.uncompressed=False -n test \ - -p $HGPORT -d --pid-file=hg.pid -E errors.log -cat hg.pid >> $DAEMON_PIDS - -# commit message with Japanese Kanji 'Noh', which ends with '\x5c' -echo foo >> foo -HGENCODING=cp932 hg ci -m `python -c 'print("\x94\x5c")'` - -echo % Graph json escape of multibyte character -"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/' \ - | grep '^var data =' - -echo % ERRORS ENCOUNTERED -cat errors.log diff -r 7f3af5da4e6c -r abbe2e979948 tests/test-hgweb-commands.out --- a/tests/test-hgweb-commands.out Sun Sep 26 13:41:32 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,988 +0,0 @@ -% Set up the repo -adding da/foo -adding foo -marked working directory as branch stable -% Logs and changes -200 Script output follows - - - - - http://127.0.0.1/ - - - test Changelog - 1970-01-01T00:00:00+00:00 - - - branch - http://127.0.0.1/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe - - - test - test - - 1970-01-01T00:00:00+00:00 - 1970-01-01T00:00:00+00:00 - -
-
branch
-
-
-
- - Added tag 1.0 for changeset 2ef0ac749a14 - http://127.0.0.1/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de - - - test - test - - 1970-01-01T00:00:00+00:00 - 1970-01-01T00:00:00+00:00 - -
-
Added tag 1.0 for changeset 2ef0ac749a14
-
-
-
- - base - http://127.0.0.1/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f - - - test - test - - 1970-01-01T00:00:00+00:00 - 1970-01-01T00:00:00+00:00 - -
-
base
-
-
-
- -
-200 Script output follows - - - - - http://127.0.0.1/ - - - test Changelog - 1970-01-01T00:00:00+00:00 - - - branch - http://127.0.0.1/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe - - - test - test - - 1970-01-01T00:00:00+00:00 - 1970-01-01T00:00:00+00:00 - -
-
branch
-
-
-
- - Added tag 1.0 for changeset 2ef0ac749a14 - http://127.0.0.1/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de - - - test - test - - 1970-01-01T00:00:00+00:00 - 1970-01-01T00:00:00+00:00 - -
-
Added tag 1.0 for changeset 2ef0ac749a14
-
-
-
- - base - http://127.0.0.1/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f - - - test - test - - 1970-01-01T00:00:00+00:00 - 1970-01-01T00:00:00+00:00 - -
-
base
-
-
-
- -
-200 Script output follows - - - - http://127.0.0.1/atom-log/tip/foo - - test: foo history - 1970-01-01T00:00:00+00:00 - - - base - http://127.0.0.1/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f - - - test - test - - 1970-01-01T00:00:00+00:00 - 1970-01-01T00:00:00+00:00 - -
-
base
-
-
-
- -
-200 Script output follows - - - - - - - - -test: log - - - - - -
- - -
-

test

-

log

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
ageauthordescription
1970-01-01testbranchstable tip
1970-01-01testAdded tag 1.0 for changeset 2ef0ac749a14default
1970-01-01testbase1.0
- - - -
-
- - - - - - -200 Script output follows - - - - - - - - -test: 2ef0ac749a14 - - -
- - -
- -

test

-

changeset 0:2ef0ac749a14 1.0

- - - -
base
- - - - - - - - - - - - - - - - - - - - - -
authortest
dateThu Jan 01 00:00:00 1970 +0000 (1970-01-01)
parents
children a4f92ed23982
filesda/foo foo
- -
-
line diff
- -
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-     1.2 +++ b/da/foo	Thu Jan 01 00:00:00 1970 +0000
-     1.3 @@ -0,0 +1,1 @@
-     1.4 +foo
-
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-     2.2 +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
-     2.3 @@ -0,0 +1,1 @@
-     2.4 +foo
-
-
- -
-
- - - - - -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 - -200 Script output follows - - - - - - - - -test: searching for base - - - -
- - -
-

test

-

searching for 'base'

- - - - - - - - - - - - - - - - - -
ageauthordescription
1970-01-01testbase1.0
- - - -
-
- - - - - - -% File-related -200 Script output follows - -foo -200 Script output follows - - -test@0: foo - - - - -200 Script output follows - - -drwxr-xr-x da --rw-r--r-- 45 .hgtags --rw-r--r-- 4 foo - - -200 Script output follows - - - - - - - - -test: a4f92ed23982 foo - - - -
- - -
-

test

-

view foo @ 1:a4f92ed23982

- - - -
Added tag 1.0 for changeset 2ef0ac749a14
- - - - - - - - - - - - - - - - - - - -
authortest
dateThu Jan 01 00:00:00 1970 +0000 (1970-01-01)
parents
children1d22e65f027e
- -
-
line source
- -
1 foo -
-
-
-
-
- - - - - - -200 Script output follows - - -diff -r 000000000000 -r a4f92ed23982 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 - - - - -% Overviews -200 Script output follows - -tip 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe -1.0 2ef0ac749a14e4f57a5a822464a0902c6f7f448f -200 Script output follows - -stable 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe open -default a4f92ed23982be056b9852de5dfe873eaac7f0de inactive -200 Script output follows - - - - - - - - - - -test: Summary - - - - - - - - - -
 
- - - - -
descriptionunknown
ownerFoo Bar <foo.bar@example.com>
last changeThu, 01 Jan 1970 00:00:00 +0000
- -
changes
- - - - - - - - - - - - - - - - - - - - - -
1970-01-01test - -branch -stable tip - -
1970-01-01test - -Added tag 1.0 for changeset 2ef0ac749a14 -default - -
1970-01-01test - -base -1.0 - -
...
- -
tags
- - - - - - - - -
1970-01-011.0
...
- -
branches
- - - - - - - - - - - - - - - - - -
1970-01-011d22e65f027estable
1970-01-01a4f92ed23982default
...
- - - - -200 Script output follows - - - - - - - - - - -test: Graph - - - - - - - - -
- - -
- - -
 
- - - -
- - - -
- - - - - - - - - - -% capabilities -200 Script output follows - -lookup changegroupsubset branchmap pushkey unbundle=HG10GZ,HG10BZ,HG10UN% heads -200 Script output follows - -1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe -% lookup -200 Script output follows - -1 a4f92ed23982be056b9852de5dfe873eaac7f0de -% branches -200 Script output follows - -0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 -% changegroup -200 Script output follows - -x\x9c\xbdTMHUA\x14\xbe\xa8\xf9\xec\xda&\x10\x11*\xb8\x88\x81\x99\xbef\xe6\xce\xbdw\xc6\xf2a\x16E\x1b\x11[%\x98\xcc\xaf\x8f\x8c\xf7\xc0\xf7\x82 -4\x11KP2m\x95\xad*\xabE\x05AP\xd0\xc22Z\x14\xf9\x03\xb9j\xa3\x9b$\xa4MJ\xb4\x90\xc0\x9a\x9bO0\x10\xdf\x13\xa2\x81\x0f\x869g\xe6|\xe7\x9c\xef\x8ceY\xf7\xa2KO\xd2\xb7K\x16~\ -\xe9\xad\x90w\x86\xab\x93W\x8e\xdf\xb0r\\Y\xee6(\xa2)\xf6\x95\xc6\x01\xe4\x1az\x80R\xe8kN\x98\xe7R\xa4\xa9K@\xe0!A\xb4k\xa7U*m\x03\x07\xd8\x92\x1d\xd2\xc9\xa4\x1d\xc2\xe6,\xa5\xcc+\x1f\xef\xafDgi\xef\xab\x1d\x1d\xb7\x9a\xe7[W\xfbc\x8f\xde-\xcd\xe7\xcaz\xb3\xbb\x19\xd3\x81\x10>c>\x08\x00"X\x11\xc2\x84@\xd2\xe7B*L\x00\x01P\x04R\xc3@\xbaB0\xdb8#\x83:\x83\xa2h\xbc=\xcd\xdaS\xe1Y,L\xd3\xa0\xf2\xa8\x94J:\xe6\xd8\x81Q\xe0\xe8d\xa7#\xe2,\xd1\xaeR*\xed \xa5\x01\x13\x01\xa6\x0cb\xe3;\xbe\xaf\xfcK[^wK\xe1N\xaf\xbbk\xe8B\xd1\xf4\xc1\x07\xb3\xab[\x10\xfdkmvwcB\xa6\xa4\xd4G\xc4D\xc2\x141\xad\x91\x10\x00\x08J\x81\xcb}\xee\t\xee+W\xba\x8a\x80\x90|\xd4\xa0\xd6\xa0\xd4T\xde\xe1\x9d,!\xe2\xb5\xa94\xe3\xe7\xd5\x9f\x06\x18\xcba\x03aP\xb8f\xcd\x04\x1a_\\9\xf1\xed\xe4\x9e\xe5\xa6\xd1\xd2\x9f\x03\xa7o\xae\x90H\xf3\xfb\xef\xffH3\xadk -\xb0\x90\x92\x88\xb9\x14"\x068\xc2\x1e@\x00\xbb\x8a)\xd3\'\x859 -\xa8\x80\x84S \xa5\xbd-g\x13`\xe4\xdc\xc3H^\xdf\xe2\xc0TM\xc7\xf4BO\xcf\xde\xae\xe5\xae#\x1frM(K\x97`F\x19\x16s\x05GD\xb9\x01\xc1\x00+\x8c|\x9fp\xc11\xf0\x14\x00\x9cJ\x82<\xe0\x12\x9f\xc1\x90\xd0\xf5\xc8\x19>Pr\xaa\xeaW\xf5\xc4\xae\xd1\xfc\x17\xcf\'\x13u\xb1\x9e\xcdHnC\x0e\xcc`\xc8\xa0&\xac\x0e\xf1|\x8c\x10$\xc4\x8c\xa2p\x05`\xdc\x08 \x80\xc4\xd7Rr-\x94\x10\x102\xedi;\xf3f\xf1z\x16\x86\xdb\xd8d\xe5\xe7\x8b\xf5\x8d\rzp\xb2\xfe\xac\xf5\xf2\xd3\xfe\xfckws\xedt\x96b\xd5l\x1c\x0b\x85\xb5\x170\x8f\x11\x84\xb0\x8f\x19\xa0\x00\t_\x07\x1ac\xa2\xc3\x89Z\xe7\x96\xf9 \xccNFg\xc7F\xaa\x8a+\x9a\x9cc_\x17\x1b\x17\x9e]z38<\x97+\xb5,",\xc8\xc8?\\\x91\xff\x17.~U\x96\x97\xf5%\xdeN<\x8e\xf5\x97%\xe7^\xcfL\xed~\xda\x96k\xdc->\x86\x02\x83"\x96H\xa6\xe3\xaas=-\xeb7\xe5\xda\x8f\xbc -% stream_out -200 Script output follows - -1 -% failing unbundle, requires POST request -405 push requires POST request - -0 -push requires POST request -% Static files -200 Script output follows - -a { text-decoration:none; } -.age { white-space:nowrap; } -.date { white-space:nowrap; } -.indexlinks { white-space:nowrap; } -.parity0 { background-color: #ddd; } -.parity1 { background-color: #eee; } -.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; } -.buttons a { - background-color: #666; - padding: 2pt; - color: white; - font-family: sans; - font-weight: bold; -} -.navigate a { - background-color: #ccc; - padding: 2pt; - font-family: sans; - 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 { 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#nodebgs { - list-style: none inside none; - padding: 0; - margin: 0; - top: -0.7em; -} - -ul#graphnodes li, ul#nodebgs li { - height: 39px; -} - -ul#graphnodes { - position: absolute; - z-index: 10; - top: -0.85em; - list-style: none inside none; - padding: 0; -} - -ul#graphnodes li .info { - display: block; - font-size: 70%; - position: relative; - top: -1px; -} -% Stop and restart with HGENCODING=cp932 -% Graph json escape of multibyte character -var data = [["40b4d6888e92", [0, 1], [[0, 0, 1]], "\u80fd", "test", "1970-01-01", ["stable", true], ["tip"]], ["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", false], []], ["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"]]]; -% ERRORS ENCOUNTERED diff -r 7f3af5da4e6c -r abbe2e979948 tests/test-hgweb-commands.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-hgweb-commands.t Sun Sep 26 13:41:32 2010 -0500 @@ -0,0 +1,1067 @@ +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 + $ echo another > foo + $ hg branch stable + marked working directory as branch stable + $ hg ci -Ambranch + $ hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log + $ cat hg.pid >> $DAEMON_PIDS + +Logs and changes + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/?style=atom' + 200 Script output follows + + + + + http://*/ (glob) + (glob) + (glob) + test Changelog + 1970-01-01T00:00:00+00:00 + + + branch + http://*/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe (glob) + (glob) + + test + test + + 1970-01-01T00:00:00+00:00 + 1970-01-01T00:00:00+00:00 + +
+
branch
+
+
+
+ + Added tag 1.0 for changeset 2ef0ac749a14 + http://*/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de (glob) + (glob) + + test + test + + 1970-01-01T00:00:00+00:00 + 1970-01-01T00:00:00+00:00 + +
+
Added tag 1.0 for changeset 2ef0ac749a14
+
+
+
+ + base + http://*/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f (glob) + (glob) + + test + test + + 1970-01-01T00:00:00+00:00 + 1970-01-01T00:00:00+00:00 + +
+
base
+
+
+
+ +
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/?style=atom' + 200 Script output follows + + + + + http://*/ (glob) + (glob) + (glob) + test Changelog + 1970-01-01T00:00:00+00:00 + + + branch + http://*/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe (glob) + (glob) + + test + test + + 1970-01-01T00:00:00+00:00 + 1970-01-01T00:00:00+00:00 + +
+
branch
+
+
+
+ + Added tag 1.0 for changeset 2ef0ac749a14 + http://*/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de (glob) + (glob) + + test + test + + 1970-01-01T00:00:00+00:00 + 1970-01-01T00:00:00+00:00 + +
+
Added tag 1.0 for changeset 2ef0ac749a14
+
+
+
+ + base + http://*/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f (glob) + (glob) + + test + test + + 1970-01-01T00:00:00+00:00 + 1970-01-01T00:00:00+00:00 + +
+
base
+
+
+
+ +
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/foo/?style=atom' + 200 Script output follows + + + + http://*/atom-log/tip/foo (glob) + (glob) + test: foo history + 1970-01-01T00:00:00+00:00 + + + base + http://*/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f (glob) + (glob) + + test + test + + 1970-01-01T00:00:00+00:00 + 1970-01-01T00:00:00+00:00 + +
+
base
+
+
+
+ +
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/' + 200 Script output follows + + + + + + + + + test: log + + + + + +
+ + +
+

test

+

log

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
ageauthordescription
1970-01-01testbranchstable tip
1970-01-01testAdded tag 1.0 for changeset 2ef0ac749a14default
1970-01-01testbase1.0
+ + + +
+
+ + + + + + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/' + 200 Script output follows + + + + + + + + + test: 2ef0ac749a14 + + +
+ + +
+ +

test

+

changeset 0:2ef0ac749a14 1.0

+ + + +
base
+ + + + + + + + + + + + + + + + + + + + + +
authortest
dateThu Jan 01 00:00:00 1970 +0000 (1970-01-01)
parents
children a4f92ed23982
filesda/foo foo
+ +
+
line diff
+ +
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+       1.2 +++ b/da/foo	Thu Jan 01 00:00:00 1970 +0000
+       1.3 @@ -0,0 +1,1 @@
+       1.4 +foo
+  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+       2.2 +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
+       2.3 @@ -0,0 +1,1 @@
+       2.4 +foo
+  
+
+ +
+
+ + + + + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$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 + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log?rev=base' + 200 Script output follows + + + + + + + + + test: searching for base + + + +
+ + +
+

test

+

searching for 'base'

+ + + + + + + + + + + + + + + + + +
ageauthordescription
1970-01-01testbase1.0
+ + + +
+
+ + + + + + + +File-related + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw' + 200 Script output follows + + foo + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/annotate/1/foo/?style=raw' + 200 Script output follows + + + test@0: foo + + + + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/?style=raw' + 200 Script output follows + + + drwxr-xr-x da + -rw-r--r-- 45 .hgtags + -rw-r--r-- 4 foo + + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo' + 200 Script output follows + + + + + + + + + test: a4f92ed23982 foo + + + +
+ + +
+

test

+

view foo @ 1:a4f92ed23982

+ + + +
Added tag 1.0 for changeset 2ef0ac749a14
+ + + + + + + + + + + + + + + + + + + +
authortest
dateThu Jan 01 00:00:00 1970 +0000 (1970-01-01)
parents
children1d22e65f027e
+ +
+
line source
+ +
1 foo +
+
+
+
+
+ + + + + + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw' + 200 Script output follows + + + diff -r 000000000000 -r a4f92ed23982 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 + + + + + +Overviews + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-tags' + 200 Script output follows + + tip 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe + 1.0 2ef0ac749a14e4f57a5a822464a0902c6f7f448f + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-branches' + 200 Script output follows + + stable 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe open + default a4f92ed23982be056b9852de5dfe873eaac7f0de inactive + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb' + 200 Script output follows + + + + + + + + + + + test: Summary + + + + + + + + + +
 
+ + + + +
descriptionunknown
ownerFoo Bar <foo.bar@example.com>
last changeThu, 01 Jan 1970 00:00:00 +0000
+ +
changes
+ + + + + + + + + + + + + + + + + + + + + +
1970-01-01test + + branch + stable tip + +
1970-01-01test + + Added tag 1.0 for changeset 2ef0ac749a14 + default + +
1970-01-01test + + base + 1.0 + +
...
+ +
tags
+ + + + + + + + +
1970-01-011.0
...
+ +
branches
+ + + + + + + + + + + + + + + + + +
1970-01-011d22e65f027estable
1970-01-01a4f92ed23982default
...
+ + + + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb' + 200 Script output follows + + + + + + + + + + + test: Graph + + + + + + + + +
+ + +
+ + +
 
+ + + +
+ + + +
+ + + + + + + + + + + +capabilities + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities'; echo + 200 Script output follows + + lookup changegroupsubset branchmap pushkey unbundle=HG10GZ,HG10BZ,HG10UN + +heads + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=heads' + 200 Script output follows + + 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe + +branches + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=branches&nodes=0000000000000000000000000000000000000000' + 200 Script output follows + + 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 + +changegroup + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup&roots=0000000000000000000000000000000000000000' \ + > | $TESTDIR/printrepr.py + 200 Script output follows + + x\x9c\xbdTMHUA\x14\xbe\xa8\xf9\xec\xda&\x10\x11*\xb8\x88\x81\x99\xbef\xe6\xce\xbdw\xc6\xf2a\x16E\x1b\x11[%\x98\xcc\xaf\x8f\x8c\xf7\xc0\xf7\x82 + 4\x11KP2m\x95\xad*\xabE\x05AP\xd0\xc22Z\x14\xf9\x03\xb9j\xa3\x9b$\xa4MJ\xb4\x90\xc0\x9a\x9bO0\x10\xdf\x13\xa2\x81\x0f\x869g\xe6|\xe7\x9c\xef\x8ceY\xf7\xa2KO\xd2\xb7K\x16~\ + \xe9\xad\x90w\x86\xab\x93W\x8e\xdf\xb0r\\Y\xee6(\xa2)\xf6\x95\xc6\x01\xe4\x1az\x80R\xe8kN\x98\xe7R\xa4\xa9K@\xe0!A\xb4k\xa7U*m\x03\x07\xd8\x92\x1d\xd2\xc9\xa4\x1d\xc2\xe6,\xa5\xcc+\x1f\xef\xafDgi\xef\xab\x1d\x1d\xb7\x9a\xe7[W\xfbc\x8f\xde-\xcd\xe7\xcaz\xb3\xbb\x19\xd3\x81\x10>c>\x08\x00"X\x11\xc2\x84@\xd2\xe7B*L\x00\x01P\x04R\xc3@\xbaB0\xdb8#\x83:\x83\xa2h\xbc=\xcd\xdaS\xe1Y,L\xd3\xa0\xf2\xa8\x94J:\xe6\xd8\x81Q\xe0\xe8d\xa7#\xe2,\xd1\xaeR*\xed \xa5\x01\x13\x01\xa6\x0cb\xe3;\xbe\xaf\xfcK[^wK\xe1N\xaf\xbbk\xe8B\xd1\xf4\xc1\x07\xb3\xab[\x10\xfdkmvwcB\xa6\xa4\xd4G\xc4D\xc2\x141\xad\x91\x10\x00\x08J\x81\xcb}\xee\t\xee+W\xba\x8a\x80\x90|\xd4\xa0\xd6\xa0\xd4T\xde\xe1\x9d,!\xe2\xb5\xa94\xe3\xe7\xd5\x9f\x06\x18\xcba\x03aP\xb8f\xcd\x04\x1a_\\9\xf1\xed\xe4\x9e\xe5\xa6\xd1\xd2\x9f\x03\xa7o\xae\x90H\xf3\xfb\xef\xffH3\xadk + \xb0\x90\x92\x88\xb9\x14"\x068\xc2\x1e@\x00\xbb\x8a)\xd3\'\x859 + \xa8\x80\x84S \xa5\xbd-g\x13`\xe4\xdc\xc3H^\xdf\xe2\xc0TM\xc7\xf4BO\xcf\xde\xae\xe5\xae#\x1frM(K\x97`F\x19\x16s\x05GD\xb9\x01\xc1\x00+\x8c|\x9fp\xc11\xf0\x14\x00\x9cJ\x82<\xe0\x12\x9f\xc1\x90\xd0\xf5\xc8\x19>Pr\xaa\xeaW\xf5\xc4\xae\xd1\xfc\x17\xcf\'\x13u\xb1\x9e\xcdHnC\x0e\xcc`\xc8\xa0&\xac\x0e\xf1|\x8c\x10$\xc4\x8c\xa2p\x05`\xdc\x08 \x80\xc4\xd7Rr-\x94\x10\x102\xedi;\xf3f\xf1z\x16\x86\xdb\xd8d\xe5\xe7\x8b\xf5\x8d\rzp\xb2\xfe\xac\xf5\xf2\xd3\xfe\xfckws\xedt\x96b\xd5l\x1c\x0b\x85\xb5\x170\x8f\x11\x84\xb0\x8f\x19\xa0\x00\t_\x07\x1ac\xa2\xc3\x89Z\xe7\x96\xf9 \xccNFg\xc7F\xaa\x8a+\x9a\x9cc_\x17\x1b\x17\x9e]z38<\x97+\xb5,",\xc8\xc8?\\\x91\xff\x17.~U\x96\x97\xf5%\xdeN<\x8e\xf5\x97%\xe7^\xcfL\xed~\xda\x96k\xdc->\x86\x02\x83"\x96H\xa6\xe3\xaas=-\xeb7\xe5\xda\x8f\xbc + +stream_out + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=stream_out' + 200 Script output follows + + 1 + +failing unbundle, requires POST request + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=unbundle' + 405 push requires POST request + + 0 + push requires POST request + [1] + +Static files + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$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; } + .parity1 { background-color: #eee; } + .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; } + .buttons a { + background-color: #666; + padding: 2pt; + color: white; + font-family: sans; + font-weight: bold; + } + .navigate a { + background-color: #ccc; + padding: 2pt; + font-family: sans; + 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 { 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#nodebgs { + list-style: none inside none; + padding: 0; + margin: 0; + top: -0.7em; + } + + ul#graphnodes li, ul#nodebgs li { + height: 39px; + } + + ul#graphnodes { + position: absolute; + z-index: 10; + top: -0.85em; + list-style: none inside none; + padding: 0; + } + + ul#graphnodes li .info { + display: block; + font-size: 70%; + position: relative; + top: -1px; + } + +Stop and restart with HGENCODING=cp932 + + $ "$TESTDIR/killdaemons.py" + $ HGENCODING=cp932 hg serve --config server.uncompressed=False -n test \ + > -p $HGPORT -d --pid-file=hg.pid -E errors.log + $ cat hg.pid >> $DAEMON_PIDS + +commit message with Japanese Kanji 'Noh', which ends with '\x5c' + + $ echo foo >> foo + $ HGENCODING=cp932 hg ci -m `python -c 'print("\x94\x5c")'` + +Graph json escape of multibyte character + + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/' \ + > | grep '^var data =' + var data = [["40b4d6888e92", [0, 1], [[0, 0, 1]], "\u80fd", "test", "1970-01-01", ["stable", true], ["tip"]], ["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", false], []], ["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"]]]; + +ERRORS ENCOUNTERED + + $ cat errors.log