tests/test-hgwebdir.t
changeset 25472 4d2b9b304ad0
parent 25426 5f3666da6910
child 25474 8c14f87bd0ae
equal deleted inserted replaced
25470:378a8e700e02 25472:4d2b9b304ad0
    82   >     -A access-paths.log -E error-paths-1.log
    82   >     -A access-paths.log -E error-paths-1.log
    83   $ cat hg.pid >> $DAEMON_PIDS
    83   $ cat hg.pid >> $DAEMON_PIDS
    84 
    84 
    85 should give a 404 - file does not exist
    85 should give a 404 - file does not exist
    86 
    86 
    87   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'a/file/tip/bork?style=raw'
    87   $ get-with-headers.py localhost:$HGPORT 'a/file/tip/bork?style=raw'
    88   404 Not Found
    88   404 Not Found
    89   
    89   
    90   
    90   
    91   error: bork@8580ff50825a: not found in manifest
    91   error: bork@8580ff50825a: not found in manifest
    92   [1]
    92   [1]
    93 
    93 
    94 should succeed
    94 should succeed
    95 
    95 
    96   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '?style=raw'
    96   $ get-with-headers.py localhost:$HGPORT '?style=raw'
    97   200 Script output follows
    97   200 Script output follows
    98   
    98   
    99   
    99   
   100   /a/
   100   /a/
   101   /b/
   101   /b/
   102   
   102   
   103   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'a/file/tip/a?style=raw'
   103   $ get-with-headers.py localhost:$HGPORT 'a/file/tip/a?style=raw'
   104   200 Script output follows
   104   200 Script output follows
   105   
   105   
   106   a
   106   a
   107   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'b/file/tip/b?style=raw'
   107   $ get-with-headers.py localhost:$HGPORT 'b/file/tip/b?style=raw'
   108   200 Script output follows
   108   200 Script output follows
   109   
   109   
   110   b
   110   b
   111 
   111 
   112 should give a 404 - repo is not published
   112 should give a 404 - repo is not published
   113 
   113 
   114   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'c/file/tip/c?style=raw'
   114   $ get-with-headers.py localhost:$HGPORT 'c/file/tip/c?style=raw'
   115   404 Not Found
   115   404 Not Found
   116   
   116   
   117   
   117   
   118   error: repository c/file/tip/c not found
   118   error: repository c/file/tip/c not found
   119   [1]
   119   [1]
   120 
   120 
   121 atom-log without basedir
   121 atom-log without basedir
   122 
   122 
   123   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'a/atom-log' | grep '<link'
   123   $ get-with-headers.py localhost:$HGPORT 'a/atom-log' | grep '<link'
   124    <link rel="self" href="http://*:$HGPORT/a/atom-log"/> (glob)
   124    <link rel="self" href="http://*:$HGPORT/a/atom-log"/> (glob)
   125    <link rel="alternate" href="http://*:$HGPORT/a/"/> (glob)
   125    <link rel="alternate" href="http://*:$HGPORT/a/"/> (glob)
   126     <link href="http://*:$HGPORT/a/rev/8580ff50825a"/> (glob)
   126     <link href="http://*:$HGPORT/a/rev/8580ff50825a"/> (glob)
   127 
   127 
   128 rss-log without basedir
   128 rss-log without basedir
   129 
   129 
   130   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'a/rss-log' | grep '<guid'
   130   $ get-with-headers.py localhost:$HGPORT 'a/rss-log' | grep '<guid'
   131       <guid isPermaLink="true">http://*:$HGPORT/a/rev/8580ff50825a</guid> (glob)
   131       <guid isPermaLink="true">http://*:$HGPORT/a/rev/8580ff50825a</guid> (glob)
   132   $ cat > paths.conf <<EOF
   132   $ cat > paths.conf <<EOF
   133   > [paths]
   133   > [paths]
   134   > t/a/=$root/a
   134   > t/a/=$root/a
   135   > b=$root/b
   135   > b=$root/b
   143   >     -A access-paths.log -E error-paths-2.log
   143   >     -A access-paths.log -E error-paths-2.log
   144   $ cat hg.pid >> $DAEMON_PIDS
   144   $ cat hg.pid >> $DAEMON_PIDS
   145 
   145 
   146 should succeed, slashy names
   146 should succeed, slashy names
   147 
   147 
   148   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw'
   148   $ get-with-headers.py localhost:$HGPORT1 '?style=raw'
   149   200 Script output follows
   149   200 Script output follows
   150   
   150   
   151   
   151   
   152   /t/a/
   152   /t/a/
   153   /b/
   153   /b/
   182   /starstar/webdir/notrepo/f/
   182   /starstar/webdir/notrepo/f/
   183   /starstar/webdir/notrepo/f/f2/
   183   /starstar/webdir/notrepo/f/f2/
   184   /astar/
   184   /astar/
   185   /astar/.hg/patches/
   185   /astar/.hg/patches/
   186   
   186   
   187   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=paper'
   187   $ get-with-headers.py localhost:$HGPORT1 '?style=paper'
   188   200 Script output follows
   188   200 Script output follows
   189   
   189   
   190   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   190   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   191   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
   191   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
   192   <head>
   192   <head>
   670   
   670   
   671   
   671   
   672   </body>
   672   </body>
   673   </html>
   673   </html>
   674   
   674   
   675   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't?style=raw'
   675   $ get-with-headers.py localhost:$HGPORT1 't?style=raw'
   676   200 Script output follows
   676   200 Script output follows
   677   
   677   
   678   
   678   
   679   /t/a/
   679   /t/a/
   680   
   680   
   681   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/?style=raw'
   681   $ get-with-headers.py localhost:$HGPORT1 't/?style=raw'
   682   200 Script output follows
   682   200 Script output follows
   683   
   683   
   684   
   684   
   685   /t/a/
   685   /t/a/
   686   
   686   
   687   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/?style=paper'
   687   $ get-with-headers.py localhost:$HGPORT1 't/?style=paper'
   688   200 Script output follows
   688   200 Script output follows
   689   
   689   
   690   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   690   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   691   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
   691   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
   692   <head>
   692   <head>
   741   
   741   
   742   
   742   
   743   </body>
   743   </body>
   744   </html>
   744   </html>
   745   
   745   
   746   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/a?style=atom'
   746   $ get-with-headers.py localhost:$HGPORT1 't/a?style=atom'
   747   200 Script output follows
   747   200 Script output follows
   748   
   748   
   749   <?xml version="1.0" encoding="ascii"?>
   749   <?xml version="1.0" encoding="ascii"?>
   750   <feed xmlns="http://www.w3.org/2005/Atom">
   750   <feed xmlns="http://www.w3.org/2005/Atom">
   751    <!-- Changelog -->
   751    <!-- Changelog -->
   798   	</table>
   798   	</table>
   799     </content>
   799     </content>
   800    </entry>
   800    </entry>
   801   
   801   
   802   </feed>
   802   </feed>
   803   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/a/?style=atom'
   803   $ get-with-headers.py localhost:$HGPORT1 't/a/?style=atom'
   804   200 Script output follows
   804   200 Script output follows
   805   
   805   
   806   <?xml version="1.0" encoding="ascii"?>
   806   <?xml version="1.0" encoding="ascii"?>
   807   <feed xmlns="http://www.w3.org/2005/Atom">
   807   <feed xmlns="http://www.w3.org/2005/Atom">
   808    <!-- Changelog -->
   808    <!-- Changelog -->
   855   	</table>
   855   	</table>
   856     </content>
   856     </content>
   857    </entry>
   857    </entry>
   858   
   858   
   859   </feed>
   859   </feed>
   860   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/a/file/tip/a?style=raw'
   860   $ get-with-headers.py localhost:$HGPORT1 't/a/file/tip/a?style=raw'
   861   200 Script output follows
   861   200 Script output follows
   862   
   862   
   863   a
   863   a
   864 
   864 
   865 Test [paths] '*' extension
   865 Test [paths] '*' extension
   866 
   866 
   867   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/?style=raw'
   867   $ get-with-headers.py localhost:$HGPORT1 'coll/?style=raw'
   868   200 Script output follows
   868   200 Script output follows
   869   
   869   
   870   
   870   
   871   /coll/a/
   871   /coll/a/
   872   /coll/a/.hg/patches/
   872   /coll/a/.hg/patches/
   873   /coll/b/
   873   /coll/b/
   874   /coll/c/
   874   /coll/c/
   875   /coll/notrepo/e/
   875   /coll/notrepo/e/
   876   /coll/notrepo/f/
   876   /coll/notrepo/f/
   877   
   877   
   878   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/a/file/tip/a?style=raw'
   878   $ get-with-headers.py localhost:$HGPORT1 'coll/a/file/tip/a?style=raw'
   879   200 Script output follows
   879   200 Script output follows
   880   
   880   
   881   a
   881   a
   882 
   882 
   883 Test [paths] '**' extension
   883 Test [paths] '**' extension
   884 
   884 
   885   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/?style=raw'
   885   $ get-with-headers.py localhost:$HGPORT1 'rcoll/?style=raw'
   886   200 Script output follows
   886   200 Script output follows
   887   
   887   
   888   
   888   
   889   /rcoll/a/
   889   /rcoll/a/
   890   /rcoll/a/.hg/patches/
   890   /rcoll/a/.hg/patches/
   894   /rcoll/notrepo/e/
   894   /rcoll/notrepo/e/
   895   /rcoll/notrepo/e/e2/
   895   /rcoll/notrepo/e/e2/
   896   /rcoll/notrepo/f/
   896   /rcoll/notrepo/f/
   897   /rcoll/notrepo/f/f2/
   897   /rcoll/notrepo/f/f2/
   898   
   898   
   899   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw'
   899   $ get-with-headers.py localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw'
   900   200 Script output follows
   900   200 Script output follows
   901   
   901   
   902   d
   902   d
   903 
   903 
   904 Test collapse = True
   904 Test collapse = True
   905 
   905 
   906   $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
   906   $ killdaemons.py $DAEMON_PIDS
   907   $ cat >> paths.conf <<EOF
   907   $ cat >> paths.conf <<EOF
   908   > [web]
   908   > [web]
   909   > collapse=true
   909   > collapse=true
   910   > descend = true
   910   > descend = true
   911   > EOF
   911   > EOF
   912   $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
   912   $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
   913   >     -A access-paths.log -E error-paths-3.log
   913   >     -A access-paths.log -E error-paths-3.log
   914   $ cat hg.pid >> $DAEMON_PIDS
   914   $ cat hg.pid >> $DAEMON_PIDS
   915   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/?style=raw'
   915   $ get-with-headers.py localhost:$HGPORT1 'coll/?style=raw'
   916   200 Script output follows
   916   200 Script output follows
   917   
   917   
   918   
   918   
   919   /coll/a/
   919   /coll/a/
   920   /coll/a/.hg/patches/
   920   /coll/a/.hg/patches/
   921   /coll/b/
   921   /coll/b/
   922   /coll/c/
   922   /coll/c/
   923   /coll/notrepo/
   923   /coll/notrepo/
   924   
   924   
   925   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/a/file/tip/a?style=raw'
   925   $ get-with-headers.py localhost:$HGPORT1 'coll/a/file/tip/a?style=raw'
   926   200 Script output follows
   926   200 Script output follows
   927   
   927   
   928   a
   928   a
   929   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/?style=raw'
   929   $ get-with-headers.py localhost:$HGPORT1 'rcoll/?style=raw'
   930   200 Script output follows
   930   200 Script output follows
   931   
   931   
   932   
   932   
   933   /rcoll/a/
   933   /rcoll/a/
   934   /rcoll/a/.hg/patches/
   934   /rcoll/a/.hg/patches/
   935   /rcoll/b/
   935   /rcoll/b/
   936   /rcoll/b/d/
   936   /rcoll/b/d/
   937   /rcoll/c/
   937   /rcoll/c/
   938   /rcoll/notrepo/
   938   /rcoll/notrepo/
   939   
   939   
   940   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw'
   940   $ get-with-headers.py localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw'
   941   200 Script output follows
   941   200 Script output follows
   942   
   942   
   943   d
   943   d
   944 
   944 
   945 Test intermediate directories
   945 Test intermediate directories
   950   $ cat >> $root/notrepo/f/.hg/hgrc << EOF
   950   $ cat >> $root/notrepo/f/.hg/hgrc << EOF
   951   > [web]
   951   > [web]
   952   > hidden = True
   952   > hidden = True
   953   > EOF
   953   > EOF
   954 
   954 
   955   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/?style=raw'
   955   $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/?style=raw'
   956   200 Script output follows
   956   200 Script output follows
   957   
   957   
   958   
   958   
   959   /rcoll/notrepo/e/
   959   /rcoll/notrepo/e/
   960   /rcoll/notrepo/e/e2/
   960   /rcoll/notrepo/e/e2/
   961   
   961   
   962 
   962 
   963 Subrepo parent not hidden
   963 Subrepo parent not hidden
   964   $ mv $root/notrepo/f/.hg/hgrc.bak $root/notrepo/f/.hg/hgrc
   964   $ mv $root/notrepo/f/.hg/hgrc.bak $root/notrepo/f/.hg/hgrc
   965 
   965 
   966   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/?style=raw'
   966   $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/?style=raw'
   967   200 Script output follows
   967   200 Script output follows
   968   
   968   
   969   
   969   
   970   /rcoll/notrepo/e/
   970   /rcoll/notrepo/e/
   971   /rcoll/notrepo/e/e2/
   971   /rcoll/notrepo/e/e2/
   973   /rcoll/notrepo/f/f2/
   973   /rcoll/notrepo/f/f2/
   974   
   974   
   975 
   975 
   976 Test repositories inside intermediate directories
   976 Test repositories inside intermediate directories
   977 
   977 
   978   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/e/file/tip/e?style=raw'
   978   $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/e/file/tip/e?style=raw'
   979   200 Script output follows
   979   200 Script output follows
   980   
   980   
   981   e
   981   e
   982 
   982 
   983 Test subrepositories inside intermediate directories
   983 Test subrepositories inside intermediate directories
   984 
   984 
   985   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/f/f2/file/tip/f2?style=raw'
   985   $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/f/f2/file/tip/f2?style=raw'
   986   200 Script output follows
   986   200 Script output follows
   987   
   987   
   988   f2
   988   f2
   989 
   989 
   990 Test descend = False
   990 Test descend = False
   991 
   991 
   992   $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
   992   $ killdaemons.py $DAEMON_PIDS
   993   $ cat >> paths.conf <<EOF
   993   $ cat >> paths.conf <<EOF
   994   > descend=false
   994   > descend=false
   995   > EOF
   995   > EOF
   996   $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
   996   $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
   997   >     -A access-paths.log -E error-paths-4.log
   997   >     -A access-paths.log -E error-paths-4.log
   998   $ cat hg.pid >> $DAEMON_PIDS
   998   $ cat hg.pid >> $DAEMON_PIDS
   999   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/?style=raw'
   999   $ get-with-headers.py localhost:$HGPORT1 'coll/?style=raw'
  1000   200 Script output follows
  1000   200 Script output follows
  1001   
  1001   
  1002   
  1002   
  1003   /coll/a/
  1003   /coll/a/
  1004   /coll/b/
  1004   /coll/b/
  1005   /coll/c/
  1005   /coll/c/
  1006   
  1006   
  1007   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/a/file/tip/a?style=raw'
  1007   $ get-with-headers.py localhost:$HGPORT1 'coll/a/file/tip/a?style=raw'
  1008   200 Script output follows
  1008   200 Script output follows
  1009   
  1009   
  1010   a
  1010   a
  1011   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/?style=raw'
  1011   $ get-with-headers.py localhost:$HGPORT1 'rcoll/?style=raw'
  1012   200 Script output follows
  1012   200 Script output follows
  1013   
  1013   
  1014   
  1014   
  1015   /rcoll/a/
  1015   /rcoll/a/
  1016   /rcoll/b/
  1016   /rcoll/b/
  1017   /rcoll/c/
  1017   /rcoll/c/
  1018   
  1018   
  1019   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw'
  1019   $ get-with-headers.py localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw'
  1020   200 Script output follows
  1020   200 Script output follows
  1021   
  1021   
  1022   d
  1022   d
  1023 
  1023 
  1024 Test intermediate directories
  1024 Test intermediate directories
  1025 
  1025 
  1026   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/?style=raw'
  1026   $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/?style=raw'
  1027   200 Script output follows
  1027   200 Script output follows
  1028   
  1028   
  1029   
  1029   
  1030   /rcoll/notrepo/e/
  1030   /rcoll/notrepo/e/
  1031   /rcoll/notrepo/f/
  1031   /rcoll/notrepo/f/
  1032   
  1032   
  1033 
  1033 
  1034 Test repositories inside intermediate directories
  1034 Test repositories inside intermediate directories
  1035 
  1035 
  1036   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/e/file/tip/e?style=raw'
  1036   $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/e/file/tip/e?style=raw'
  1037   200 Script output follows
  1037   200 Script output follows
  1038   
  1038   
  1039   e
  1039   e
  1040 
  1040 
  1041 Test subrepositories inside intermediate directories
  1041 Test subrepositories inside intermediate directories
  1042 
  1042 
  1043   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/f/f2/file/tip/f2?style=raw'
  1043   $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/f/f2/file/tip/f2?style=raw'
  1044   200 Script output follows
  1044   200 Script output follows
  1045   
  1045   
  1046   f2
  1046   f2
  1047 
  1047 
  1048 Test [paths] '*' in a repo root
  1048 Test [paths] '*' in a repo root
  1049 
  1049 
  1050   $ hg id http://localhost:$HGPORT1/astar
  1050   $ hg id http://localhost:$HGPORT1/astar
  1051   8580ff50825a
  1051   8580ff50825a
  1052 
  1052 
  1053   $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
  1053   $ killdaemons.py $DAEMON_PIDS
  1054   $ cat > paths.conf <<EOF
  1054   $ cat > paths.conf <<EOF
  1055   > [paths]
  1055   > [paths]
  1056   > t/a = $root/a
  1056   > t/a = $root/a
  1057   > t/b = $root/b
  1057   > t/b = $root/b
  1058   > c = $root/c
  1058   > c = $root/c
  1059   > EOF
  1059   > EOF
  1060   $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
  1060   $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
  1061   >     -A access-paths.log -E error-paths-5.log
  1061   >     -A access-paths.log -E error-paths-5.log
  1062   $ cat hg.pid >> $DAEMON_PIDS
  1062   $ cat hg.pid >> $DAEMON_PIDS
  1063   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw'
  1063   $ get-with-headers.py localhost:$HGPORT1 '?style=raw'
  1064   200 Script output follows
  1064   200 Script output follows
  1065   
  1065   
  1066   
  1066   
  1067   /t/a/
  1067   /t/a/
  1068   /t/b/
  1068   /t/b/
  1069   /c/
  1069   /c/
  1070   
  1070   
  1071   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/?style=raw'
  1071   $ get-with-headers.py localhost:$HGPORT1 't/?style=raw'
  1072   200 Script output follows
  1072   200 Script output follows
  1073   
  1073   
  1074   
  1074   
  1075   /t/a/
  1075   /t/a/
  1076   /t/b/
  1076   /t/b/
  1077   
  1077   
  1078 
  1078 
  1079 Test collapse = True
  1079 Test collapse = True
  1080 
  1080 
  1081   $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
  1081   $ killdaemons.py $DAEMON_PIDS
  1082   $ cat >> paths.conf <<EOF
  1082   $ cat >> paths.conf <<EOF
  1083   > [web]
  1083   > [web]
  1084   > collapse=true
  1084   > collapse=true
  1085   > EOF
  1085   > EOF
  1086   $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
  1086   $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
  1087   >     -A access-paths.log -E error-paths-6.log
  1087   >     -A access-paths.log -E error-paths-6.log
  1088   $ cat hg.pid >> $DAEMON_PIDS
  1088   $ cat hg.pid >> $DAEMON_PIDS
  1089   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw'
  1089   $ get-with-headers.py localhost:$HGPORT1 '?style=raw'
  1090   200 Script output follows
  1090   200 Script output follows
  1091   
  1091   
  1092   
  1092   
  1093   /t/
  1093   /t/
  1094   /c/
  1094   /c/
  1095   
  1095   
  1096   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/?style=raw'
  1096   $ get-with-headers.py localhost:$HGPORT1 't/?style=raw'
  1097   200 Script output follows
  1097   200 Script output follows
  1098   
  1098   
  1099   
  1099   
  1100   /t/a/
  1100   /t/a/
  1101   /t/b/
  1101   /t/b/
  1102   
  1102   
  1103 
  1103 
  1104 test descend = False
  1104 test descend = False
  1105 
  1105 
  1106   $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
  1106   $ killdaemons.py $DAEMON_PIDS
  1107   $ cat >> paths.conf <<EOF
  1107   $ cat >> paths.conf <<EOF
  1108   > descend=false
  1108   > descend=false
  1109   > EOF
  1109   > EOF
  1110   $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
  1110   $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
  1111   >     -A access-paths.log -E error-paths-7.log
  1111   >     -A access-paths.log -E error-paths-7.log
  1112   $ cat hg.pid >> $DAEMON_PIDS
  1112   $ cat hg.pid >> $DAEMON_PIDS
  1113   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw'
  1113   $ get-with-headers.py localhost:$HGPORT1 '?style=raw'
  1114   200 Script output follows
  1114   200 Script output follows
  1115   
  1115   
  1116   
  1116   
  1117   /c/
  1117   /c/
  1118   
  1118   
  1119   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/?style=raw'
  1119   $ get-with-headers.py localhost:$HGPORT1 't/?style=raw'
  1120   200 Script output follows
  1120   200 Script output follows
  1121   
  1121   
  1122   
  1122   
  1123   /t/a/
  1123   /t/a/
  1124   /t/b/
  1124   /t/b/
  1125   
  1125   
  1126   $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
  1126   $ killdaemons.py $DAEMON_PIDS
  1127   $ cat > paths.conf <<EOF
  1127   $ cat > paths.conf <<EOF
  1128   > [paths]
  1128   > [paths]
  1129   > nostore = $root/nostore
  1129   > nostore = $root/nostore
  1130   > inexistent = $root/inexistent
  1130   > inexistent = $root/inexistent
  1131   > EOF
  1131   > EOF
  1133   >     -A access-paths.log -E error-paths-8.log
  1133   >     -A access-paths.log -E error-paths-8.log
  1134   $ cat hg.pid >> $DAEMON_PIDS
  1134   $ cat hg.pid >> $DAEMON_PIDS
  1135 
  1135 
  1136 test inexistent and inaccessible repo should be ignored silently
  1136 test inexistent and inaccessible repo should be ignored silently
  1137 
  1137 
  1138   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 ''
  1138   $ get-with-headers.py localhost:$HGPORT1 ''
  1139   200 Script output follows
  1139   200 Script output follows
  1140   
  1140   
  1141   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  1141   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  1142   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
  1142   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
  1143   <head>
  1143   <head>
  1190   >     -A access-collections.log -E error-collections.log
  1190   >     -A access-collections.log -E error-collections.log
  1191   $ cat hg.pid >> $DAEMON_PIDS
  1191   $ cat hg.pid >> $DAEMON_PIDS
  1192 
  1192 
  1193 collections: should succeed
  1193 collections: should succeed
  1194 
  1194 
  1195   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '?style=raw'
  1195   $ get-with-headers.py localhost:$HGPORT2 '?style=raw'
  1196   200 Script output follows
  1196   200 Script output follows
  1197   
  1197   
  1198   
  1198   
  1199   /a/
  1199   /a/
  1200   /a/.hg/patches/
  1200   /a/.hg/patches/
  1201   /b/
  1201   /b/
  1202   /c/
  1202   /c/
  1203   /notrepo/e/
  1203   /notrepo/e/
  1204   /notrepo/f/
  1204   /notrepo/f/
  1205   
  1205   
  1206   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'a/file/tip/a?style=raw'
  1206   $ get-with-headers.py localhost:$HGPORT2 'a/file/tip/a?style=raw'
  1207   200 Script output follows
  1207   200 Script output follows
  1208   
  1208   
  1209   a
  1209   a
  1210   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'b/file/tip/b?style=raw'
  1210   $ get-with-headers.py localhost:$HGPORT2 'b/file/tip/b?style=raw'
  1211   200 Script output follows
  1211   200 Script output follows
  1212   
  1212   
  1213   b
  1213   b
  1214   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'c/file/tip/c?style=raw'
  1214   $ get-with-headers.py localhost:$HGPORT2 'c/file/tip/c?style=raw'
  1215   200 Script output follows
  1215   200 Script output follows
  1216   
  1216   
  1217   c
  1217   c
  1218 
  1218 
  1219 atom-log with basedir /
  1219 atom-log with basedir /
  1220 
  1220 
  1221   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'a/atom-log' | grep '<link'
  1221   $ get-with-headers.py localhost:$HGPORT2 'a/atom-log' | grep '<link'
  1222    <link rel="self" href="http://hg.example.com:8080/a/atom-log"/>
  1222    <link rel="self" href="http://hg.example.com:8080/a/atom-log"/>
  1223    <link rel="alternate" href="http://hg.example.com:8080/a/"/>
  1223    <link rel="alternate" href="http://hg.example.com:8080/a/"/>
  1224     <link href="http://hg.example.com:8080/a/rev/8580ff50825a"/>
  1224     <link href="http://hg.example.com:8080/a/rev/8580ff50825a"/>
  1225 
  1225 
  1226 rss-log with basedir /
  1226 rss-log with basedir /
  1227 
  1227 
  1228   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'a/rss-log' | grep '<guid'
  1228   $ get-with-headers.py localhost:$HGPORT2 'a/rss-log' | grep '<guid'
  1229       <guid isPermaLink="true">http://hg.example.com:8080/a/rev/8580ff50825a</guid>
  1229       <guid isPermaLink="true">http://hg.example.com:8080/a/rev/8580ff50825a</guid>
  1230   $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
  1230   $ killdaemons.py $DAEMON_PIDS
  1231   $ hg serve --config web.baseurl=http://hg.example.com:8080/foo/ -p $HGPORT2 -d \
  1231   $ hg serve --config web.baseurl=http://hg.example.com:8080/foo/ -p $HGPORT2 -d \
  1232   >     --pid-file=hg.pid --webdir-conf collections.conf \
  1232   >     --pid-file=hg.pid --webdir-conf collections.conf \
  1233   >     -A access-collections-2.log -E error-collections-2.log
  1233   >     -A access-collections-2.log -E error-collections-2.log
  1234   $ cat hg.pid >> $DAEMON_PIDS
  1234   $ cat hg.pid >> $DAEMON_PIDS
  1235 
  1235 
  1236 atom-log with basedir /foo/
  1236 atom-log with basedir /foo/
  1237 
  1237 
  1238   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'a/atom-log' | grep '<link'
  1238   $ get-with-headers.py localhost:$HGPORT2 'a/atom-log' | grep '<link'
  1239    <link rel="self" href="http://hg.example.com:8080/foo/a/atom-log"/>
  1239    <link rel="self" href="http://hg.example.com:8080/foo/a/atom-log"/>
  1240    <link rel="alternate" href="http://hg.example.com:8080/foo/a/"/>
  1240    <link rel="alternate" href="http://hg.example.com:8080/foo/a/"/>
  1241     <link href="http://hg.example.com:8080/foo/a/rev/8580ff50825a"/>
  1241     <link href="http://hg.example.com:8080/foo/a/rev/8580ff50825a"/>
  1242 
  1242 
  1243 rss-log with basedir /foo/
  1243 rss-log with basedir /foo/
  1244 
  1244 
  1245   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'a/rss-log' | grep '<guid'
  1245   $ get-with-headers.py localhost:$HGPORT2 'a/rss-log' | grep '<guid'
  1246       <guid isPermaLink="true">http://hg.example.com:8080/foo/a/rev/8580ff50825a</guid>
  1246       <guid isPermaLink="true">http://hg.example.com:8080/foo/a/rev/8580ff50825a</guid>
  1247 
  1247 
  1248 paths errors 1
  1248 paths errors 1
  1249 
  1249 
  1250   $ cat error-paths-1.log
  1250   $ cat error-paths-1.log