tests/test-hgweb-commands.t
changeset 17017 953faba28e91
parent 16913 f2719b387380
child 17202 1ae119269ddc
equal deleted inserted replaced
17016:468a950aebc3 17017:953faba28e91
    35   $ hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
    35   $ hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
    36   $ cat hg.pid >> $DAEMON_PIDS
    36   $ cat hg.pid >> $DAEMON_PIDS
    37 
    37 
    38 Logs and changes
    38 Logs and changes
    39 
    39 
    40   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/?style=atom'
    40   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/?style=atom'
    41   200 Script output follows
    41   200 Script output follows
    42   
    42   
    43   <?xml version="1.0" encoding="ascii"?>
    43   <?xml version="1.0" encoding="ascii"?>
    44   <feed xmlns="http://www.w3.org/2005/Atom">
    44   <feed xmlns="http://www.w3.org/2005/Atom">
    45    <!-- Changelog -->
    45    <!-- Changelog -->
   113      </div>
   113      </div>
   114     </content>
   114     </content>
   115    </entry>
   115    </entry>
   116   
   116   
   117   </feed>
   117   </feed>
   118   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/?style=atom'
   118   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/1/?style=atom'
   119   200 Script output follows
   119   200 Script output follows
   120   
   120   
   121   <?xml version="1.0" encoding="ascii"?>
   121   <?xml version="1.0" encoding="ascii"?>
   122   <feed xmlns="http://www.w3.org/2005/Atom">
   122   <feed xmlns="http://www.w3.org/2005/Atom">
   123    <!-- Changelog -->
   123    <!-- Changelog -->
   191      </div>
   191      </div>
   192     </content>
   192     </content>
   193    </entry>
   193    </entry>
   194   
   194   
   195   </feed>
   195   </feed>
   196   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/foo/?style=atom'
   196   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/1/foo/?style=atom'
   197   200 Script output follows
   197   200 Script output follows
   198   
   198   
   199   <?xml version="1.0" encoding="ascii"?>
   199   <?xml version="1.0" encoding="ascii"?>
   200   <feed xmlns="http://www.w3.org/2005/Atom">
   200   <feed xmlns="http://www.w3.org/2005/Atom">
   201    <id>http://*:$HGPORT/atom-log/tip/foo</id> (glob)
   201    <id>http://*:$HGPORT/atom-log/tip/foo</id> (glob)
   219      </div>
   219      </div>
   220     </content>
   220     </content>
   221    </entry>
   221    </entry>
   222   
   222   
   223   </feed>
   223   </feed>
   224   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/'
   224   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'shortlog/'
   225   200 Script output follows
   225   200 Script output follows
   226   
   226   
   227   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   227   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   228   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
   228   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
   229   <head>
   229   <head>
   324   
   324   
   325   
   325   
   326   </body>
   326   </body>
   327   </html>
   327   </html>
   328   
   328   
   329   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/'
   329   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'rev/0/'
   330   200 Script output follows
   330   200 Script output follows
   331   
   331   
   332   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   332   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   333   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
   333   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
   334   <head>
   334   <head>
   451   
   451   
   452   
   452   
   453   </body>
   453   </body>
   454   </html>
   454   </html>
   455   
   455   
   456   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw'
   456   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'rev/1/?style=raw'
   457   200 Script output follows
   457   200 Script output follows
   458   
   458   
   459   
   459   
   460   # HG changeset patch
   460   # HG changeset patch
   461   # User test
   461   # User test
   468   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   468   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   469   +++ b/.hgtags	Thu Jan 01 00:00:00 1970 +0000
   469   +++ b/.hgtags	Thu Jan 01 00:00:00 1970 +0000
   470   @@ -0,0 +1,1 @@
   470   @@ -0,0 +1,1 @@
   471   +2ef0ac749a14e4f57a5a822464a0902c6f7f448f 1.0
   471   +2ef0ac749a14e4f57a5a822464a0902c6f7f448f 1.0
   472   
   472   
   473   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log?rev=base'
   473   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log?rev=base'
   474   200 Script output follows
   474   200 Script output follows
   475   
   475   
   476   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   476   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   477   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
   477   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
   478   <head>
   478   <head>
   546   </html>
   546   </html>
   547   
   547   
   548 
   548 
   549 File-related
   549 File-related
   550 
   550 
   551   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw'
   551   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/1/foo/?style=raw'
   552   200 Script output follows
   552   200 Script output follows
   553   
   553   
   554   foo
   554   foo
   555   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/annotate/1/foo/?style=raw'
   555   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'annotate/1/foo/?style=raw'
   556   200 Script output follows
   556   200 Script output follows
   557   
   557   
   558   
   558   
   559   test@0: foo
   559   test@0: foo
   560   
   560   
   561   
   561   
   562   
   562   
   563   
   563   
   564   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/?style=raw'
   564   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/1/?style=raw'
   565   200 Script output follows
   565   200 Script output follows
   566   
   566   
   567   
   567   
   568   drwxr-xr-x da
   568   drwxr-xr-x da
   569   -rw-r--r-- 45 .hgtags
   569   -rw-r--r-- 45 .hgtags
   570   -rw-r--r-- 4 foo
   570   -rw-r--r-- 4 foo
   571   
   571   
   572   
   572   
   573   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo'
   573   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/1/foo'
   574   200 Script output follows
   574   200 Script output follows
   575   
   575   
   576   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   576   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   577   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
   577   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
   578   <head>
   578   <head>
   661   
   661   
   662   
   662   
   663   </body>
   663   </body>
   664   </html>
   664   </html>
   665   
   665   
   666   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/0/foo/?style=raw'
   666   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'filediff/0/foo/?style=raw'
   667   200 Script output follows
   667   200 Script output follows
   668   
   668   
   669   
   669   
   670   diff -r 000000000000 -r 2ef0ac749a14 foo
   670   diff -r 000000000000 -r 2ef0ac749a14 foo
   671   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   671   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   675   
   675   
   676   
   676   
   677   
   677   
   678   
   678   
   679 
   679 
   680   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw'
   680   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'filediff/1/foo/?style=raw'
   681   200 Script output follows
   681   200 Script output follows
   682   
   682   
   683   
   683   
   684   
   684   
   685   
   685   
   686   
   686   
   687   
   687   
   688 
   688 
   689 Overviews
   689 Overviews
   690 
   690 
   691   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-tags'
   691   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'raw-tags'
   692   200 Script output follows
   692   200 Script output follows
   693   
   693   
   694   tip	ba87b23d29ca67a305625d81a20ac279c1e3f444
   694   tip	ba87b23d29ca67a305625d81a20ac279c1e3f444
   695   1.0	2ef0ac749a14e4f57a5a822464a0902c6f7f448f
   695   1.0	2ef0ac749a14e4f57a5a822464a0902c6f7f448f
   696   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-branches'
   696   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'raw-branches'
   697   200 Script output follows
   697   200 Script output follows
   698   
   698   
   699   unstable	ba87b23d29ca67a305625d81a20ac279c1e3f444	open
   699   unstable	ba87b23d29ca67a305625d81a20ac279c1e3f444	open
   700   stable	1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe	inactive
   700   stable	1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe	inactive
   701   default	a4f92ed23982be056b9852de5dfe873eaac7f0de	inactive
   701   default	a4f92ed23982be056b9852de5dfe873eaac7f0de	inactive
   702   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-bookmarks'
   702   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'raw-bookmarks'
   703   200 Script output follows
   703   200 Script output follows
   704   
   704   
   705   anotherthing	2ef0ac749a14e4f57a5a822464a0902c6f7f448f
   705   anotherthing	2ef0ac749a14e4f57a5a822464a0902c6f7f448f
   706   something	ba87b23d29ca67a305625d81a20ac279c1e3f444
   706   something	ba87b23d29ca67a305625d81a20ac279c1e3f444
   707   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb'
   707   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'summary/?style=gitweb'
   708   200 Script output follows
   708   200 Script output follows
   709   
   709   
   710   <?xml version="1.0" encoding="ascii"?>
   710   <?xml version="1.0" encoding="ascii"?>
   711   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   711   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   712   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
   712   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
   904   
   904   
   905   </div>
   905   </div>
   906   </body>
   906   </body>
   907   </html>
   907   </html>
   908   
   908   
   909   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb'
   909   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'graph/?style=gitweb'
   910   200 Script output follows
   910   200 Script output follows
   911   
   911   
   912   <?xml version="1.0" encoding="ascii"?>
   912   <?xml version="1.0" encoding="ascii"?>
   913   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   913   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   914   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
   914   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
  1047   </body>
  1047   </body>
  1048   </html>
  1048   </html>
  1049   
  1049   
  1050 raw graph
  1050 raw graph
  1051 
  1051 
  1052   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=raw'
  1052   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'graph/?style=raw'
  1053   200 Script output follows
  1053   200 Script output follows
  1054   
  1054   
  1055   
  1055   
  1056   # HG graph
  1056   # HG graph
  1057   # Node ID ba87b23d29ca67a305625d81a20ac279c1e3f444
  1057   # Node ID ba87b23d29ca67a305625d81a20ac279c1e3f444
  1145   push requires POST request
  1145   push requires POST request
  1146   [1]
  1146   [1]
  1147 
  1147 
  1148 Static files
  1148 Static files
  1149 
  1149 
  1150   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css'
  1150   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'static/style.css'
  1151   200 Script output follows
  1151   200 Script output follows
  1152   
  1152   
  1153   a { text-decoration:none; }
  1153   a { text-decoration:none; }
  1154   .age { white-space:nowrap; }
  1154   .age { white-space:nowrap; }
  1155   .date { white-space:nowrap; }
  1155   .date { white-space:nowrap; }
  1268   $ echo foo >> foo
  1268   $ echo foo >> foo
  1269   $ HGENCODING=cp932 hg ci -m `python -c 'print("\x94\x5c")'`
  1269   $ HGENCODING=cp932 hg ci -m `python -c 'print("\x94\x5c")'`
  1270 
  1270 
  1271 Graph json escape of multibyte character
  1271 Graph json escape of multibyte character
  1272 
  1272 
  1273   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/' \
  1273   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'graph/' \
  1274   >     | grep '^var data ='
  1274   >     | grep '^var data ='
  1275   var data = [["548001d11f45", [0, 1], [[0, 0, 1, -1, ""]], "\u80fd", "test", "1970-01-01", ["unstable", true], ["tip"], ["something"]], ["ba87b23d29ca", [0, 1], [[0, 0, 1, 3, "FF0000"]], "branch", "test", "1970-01-01", ["unstable", false], [], []], ["1d22e65f027e", [0, 1], [[0, 0, 1, 3, ""]], "branch", "test", "1970-01-01", ["stable", true], [], []], ["a4f92ed23982", [0, 1], [[0, 0, 1, 3, ""]], "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"], ["anotherthing"]]];
  1275   var data = [["548001d11f45", [0, 1], [[0, 0, 1, -1, ""]], "\u80fd", "test", "1970-01-01", ["unstable", true], ["tip"], ["something"]], ["ba87b23d29ca", [0, 1], [[0, 0, 1, 3, "FF0000"]], "branch", "test", "1970-01-01", ["unstable", false], [], []], ["1d22e65f027e", [0, 1], [[0, 0, 1, 3, ""]], "branch", "test", "1970-01-01", ["stable", true], [], []], ["a4f92ed23982", [0, 1], [[0, 0, 1, 3, ""]], "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"], ["anotherthing"]]];
  1276 
  1276 
  1277 capabilities
  1277 capabilities
  1278 
  1278