tests/test-incoming-outgoing
branchstable
changeset 12795 3cb0559e44d0
parent 12793 469850088fc1
parent 12794 6bf8d48bec8e
child 12796 bc69ba99e34b
equal deleted inserted replaced
12793:469850088fc1 12795:3cb0559e44d0
     1 #!/bin/sh
       
     2 
       
     3 mkdir test
       
     4 cd test
       
     5 hg init
       
     6 for i in 0 1 2 3 4 5 6 7 8; do
       
     7 	echo $i >> foo
       
     8 	hg commit -A -m $i -d "1000000 0"
       
     9 done
       
    10 hg verify
       
    11 hg serve -p $HGPORT -d --pid-file=hg.pid
       
    12 cat hg.pid >> $DAEMON_PIDS
       
    13 cd ..
       
    14 
       
    15 hg init new
       
    16 # http incoming
       
    17 hg -R new incoming http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
       
    18 hg -R new incoming -r 4 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
       
    19 # local incoming
       
    20 hg -R new incoming test
       
    21 hg -R new incoming -r 4 test
       
    22 echo "% limit to 2 changesets"
       
    23 hg -R new incoming -l 2 test
       
    24 echo "% limit to 2 changesets, test with -p --git"
       
    25 hg -R new incoming -l 2 -p --git test
       
    26 
       
    27 # test with --bundle
       
    28 hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
       
    29 hg -R new incoming --bundle test2.hg test
       
    30 
       
    31 # test the resulting bundles
       
    32 hg init temp
       
    33 hg init temp2
       
    34 hg -R temp unbundle test.hg
       
    35 hg -R temp2 unbundle test2.hg
       
    36 hg -R temp tip
       
    37 hg -R temp2 tip
       
    38 
       
    39 rm -r temp temp2 new
       
    40 
       
    41 # test outgoing
       
    42 hg clone test test-dev
       
    43 cd test-dev
       
    44 for i in 9 10 11 12 13; do
       
    45 	echo $i >> foo
       
    46 	hg commit -A -m $i -d "1000000 0"
       
    47 done
       
    48 hg verify
       
    49 cd ..
       
    50 hg -R test-dev outgoing test
       
    51 echo "% limit to 3 changesets"
       
    52 hg -R test-dev outgoing -l 3 test
       
    53 hg -R test-dev outgoing http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
       
    54 hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"