tests/test-hgweb-diffs
changeset 12435 61be1503cfb2
parent 12434 3cf40f64f9f6
child 12436 b52ce78de84d
equal deleted inserted replaced
12434:3cf40f64f9f6 12435:61be1503cfb2
     1 #!/bin/sh
       
     2 
       
     3 echo % setting up repo
       
     4 hg init test
       
     5 cd test
       
     6 echo a > a
       
     7 echo b > b
       
     8 hg ci -Ama
       
     9 
       
    10 echo % change permissions for git diffs
       
    11 chmod 755 a
       
    12 hg ci -Amb
       
    13 
       
    14 echo % set up hgweb
       
    15 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
       
    16 cat hg.pid >> $DAEMON_PIDS
       
    17 
       
    18 echo % revision
       
    19 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0'
       
    20 
       
    21 echo % raw revision
       
    22 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0'
       
    23 
       
    24 echo % diff removed file
       
    25 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
       
    26 
       
    27 echo % set up hgweb with git diffs
       
    28 "$TESTDIR/killdaemons.py"
       
    29 hg serve --config 'diff.git=1' -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
       
    30 cat hg.pid >> $DAEMON_PIDS
       
    31 
       
    32 echo % revision
       
    33 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0'
       
    34 
       
    35 echo % revision
       
    36 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0'
       
    37 
       
    38 echo % diff removed file
       
    39 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
       
    40 
       
    41 cd ..
       
    42 echo % test import rev as raw-rev
       
    43 hg clone -r0 test test1
       
    44 cd test1
       
    45 hg import -q --exact http://localhost:$HGPORT/rev/1
       
    46 
       
    47 echo % errors
       
    48 cat ../test/errors.log