tests/test-hgwebdir
changeset 9363 8635b33eaade
parent 9184 f6eb03027411
child 10674 6d87c20cd7a8
equal deleted inserted replaced
9362:bb7e2cdd4854 9363:8635b33eaade
    27 hg --cwd c ci -Amc -d'3 0'
    27 hg --cwd c ci -Amc -d'3 0'
    28 
    28 
    29 root=`pwd`
    29 root=`pwd`
    30 cd ..
    30 cd ..
    31 
    31 
       
    32 
    32 cat > paths.conf <<EOF
    33 cat > paths.conf <<EOF
    33 [paths]
    34 [paths]
    34 a=$root/a
    35 a=$root/a
    35 b=$root/b
    36 b=$root/b
    36 EOF
    37 EOF
    47 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/file/tip/a?style=raw'
    48 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/file/tip/a?style=raw'
    48 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/b/file/tip/b?style=raw'
    49 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/b/file/tip/b?style=raw'
    49 
    50 
    50 echo % should give a 404 - repo is not published
    51 echo % should give a 404 - repo is not published
    51 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/c/file/tip/c?style=raw'
    52 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/c/file/tip/c?style=raw'
       
    53 
    52 
    54 
    53 cat > paths.conf <<EOF
    55 cat > paths.conf <<EOF
    54 [paths]
    56 [paths]
    55 t/a/=$root/a
    57 t/a/=$root/a
    56 b=$root/b
    58 b=$root/b
    81 #test [paths] '**' extension
    83 #test [paths] '**' extension
    82 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/?style=raw'
    84 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/?style=raw'
    83 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw'
    85 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw'
    84 
    86 
    85 
    87 
       
    88 "$TESTDIR/killdaemons.py"
       
    89 cat > paths.conf <<EOF
       
    90 [paths]
       
    91 t/a = $root/a
       
    92 t/b = $root/b
       
    93 c = $root/c
       
    94 [web]
       
    95 descend=false
       
    96 EOF
       
    97 
       
    98 hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
       
    99     -A access-paths.log -E error-paths-3.log
       
   100 cat hg.pid >> $DAEMON_PIDS
       
   101 echo % test descend = False
       
   102 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
       
   103 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw'
       
   104 
       
   105 
    86 cat > collections.conf <<EOF
   106 cat > collections.conf <<EOF
    87 [collections]
   107 [collections]
    88 $root=$root
   108 $root=$root
    89 EOF
   109 EOF
    90 
   110 
    97 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw'
   117 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw'
    98 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/file/tip/a?style=raw'
   118 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/file/tip/a?style=raw'
    99 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/b/file/tip/b?style=raw'
   119 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/b/file/tip/b?style=raw'
   100 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/c/file/tip/c?style=raw'
   120 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/c/file/tip/c?style=raw'
   101 
   121 
       
   122 
   102 echo % paths errors 1
   123 echo % paths errors 1
   103 cat error-paths-1.log
   124 cat error-paths-1.log
   104 echo % paths errors 2
   125 echo % paths errors 2
   105 cat error-paths-2.log
   126 cat error-paths-2.log
       
   127 echo % paths errors 3
       
   128 cat error-paths-3.log
   106 echo % collections errors
   129 echo % collections errors
   107 cat error-collections.log
   130 cat error-collections.log