tests/test-http-clone-r
changeset 12448 f5d3ff0a8192
parent 12447 f5f90d3808e2
child 12449 fc12114dbaa5
equal deleted inserted replaced
12447:f5f90d3808e2 12448:f5d3ff0a8192
     1 #!/bin/sh
       
     2 
       
     3 hg init remote
       
     4 cd remote
       
     5 echo "# creating 'remote'"
       
     6 cat >>afile <<EOF
       
     7 0
       
     8 EOF
       
     9 hg add afile
       
    10 hg commit -m "0.0"
       
    11 cat >>afile <<EOF
       
    12 1
       
    13 EOF
       
    14 hg commit -m "0.1"
       
    15 cat >>afile <<EOF
       
    16 2
       
    17 EOF
       
    18 hg commit -m "0.2"
       
    19 cat >>afile <<EOF
       
    20 3
       
    21 EOF
       
    22 hg commit -m "0.3"
       
    23 hg update -C 0
       
    24 cat >>afile <<EOF
       
    25 1
       
    26 EOF
       
    27 hg commit -m "1.1"
       
    28 cat >>afile <<EOF
       
    29 2
       
    30 EOF
       
    31 hg commit -m "1.2"
       
    32 cat >fred <<EOF
       
    33 a line
       
    34 EOF
       
    35 cat >>afile <<EOF
       
    36 3
       
    37 EOF
       
    38 hg add fred
       
    39 hg commit -m "1.3"
       
    40 hg mv afile adifferentfile
       
    41 hg commit -m "1.3m"
       
    42 hg update -C 3
       
    43 hg mv afile anotherfile
       
    44 hg commit -m "0.3m"
       
    45 hg debugindex .hg/store/data/afile.i
       
    46 hg debugindex .hg/store/data/adifferentfile.i
       
    47 hg debugindex .hg/store/data/anotherfile.i
       
    48 hg debugindex .hg/store/data/fred.i
       
    49 hg debugindex .hg/store/00manifest.i
       
    50 hg verify
       
    51 echo "# Starting server"
       
    52 hg serve -p $HGPORT -E ../error.log -d --pid-file=../hg1.pid
       
    53 cd ..
       
    54 cat hg1.pid >> $DAEMON_PIDS
       
    55 
       
    56 echo "# clone remote via stream"
       
    57 for i in 0 1 2 3 4 5 6 7 8; do
       
    58    hg clone -r "$i" http://localhost:$HGPORT/ test-"$i" 2>&1
       
    59    if cd test-"$i"; then
       
    60       hg verify
       
    61       cd ..
       
    62    fi
       
    63 done
       
    64 cd test-8
       
    65 hg pull ../test-7
       
    66 hg verify
       
    67 cd ..
       
    68 cd test-1
       
    69 hg pull -r 4 http://localhost:$HGPORT/ 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/,"
       
    70 hg verify
       
    71 hg pull http://localhost:$HGPORT/ 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/,"
       
    72 cd ..
       
    73 cd test-2
       
    74 hg pull -r 5 http://localhost:$HGPORT/ 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/,"
       
    75 hg verify
       
    76 hg pull http://localhost:$HGPORT/ 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/,"
       
    77 hg verify
       
    78 cd ..
       
    79 cat error.log