tests/test-incoming-outgoing
author Thomas Arendsen Hein <thomas@intevation.de>
Thu, 18 May 2006 21:01:38 +0200
changeset 2308 cb520d961d6a
parent 2260 99d6cae511f7
child 2521 9cceb439048b
permissions -rwxr-xr-x
Use platform path for renaming file in util.atomictempfile.rename()
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2260
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     1
#!/bin/sh
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     2
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     3
mkdir test
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     4
cd test
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     5
hg init
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     6
for i in 0 1 2 3 4 5 6 7 8; do
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     7
	echo $i >> foo
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     8
	hg commit -A -m $i -d "1000000 0"
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     9
done
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    10
hg verify
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    11
hg serve -p 20059 -d --pid-file=hg.pid
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    12
cd ..
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    13
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    14
hg init new
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    15
# http incoming
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    16
http_proxy= hg -R new incoming http://localhost:20059/
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    17
# local incoming
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    18
hg -R new incoming test
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    19
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    20
# test with --bundle
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    21
http_proxy= hg -R new incoming --bundle test.hg http://localhost:20059/
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    22
hg -R new incoming --bundle test2.hg test
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    23
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    24
# test the resulting bundles
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    25
hg init temp
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    26
hg init temp2
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    27
hg -R temp unbundle test.hg
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    28
hg -R temp2 unbundle test2.hg
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    29
hg -R temp tip
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    30
hg -R temp2 tip
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    31
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    32
rm -rf temp temp2 new
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    33
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    34
# test outgoing
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    35
hg clone test test-dev
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    36
cd test-dev
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    37
for i in 9 10 11 12 13; do
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    38
	echo $i >> foo
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    39
	hg commit -A -m $i -d "1000000 0"
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    40
done
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    41
hg verify
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    42
cd ..
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    43
hg -R test-dev outgoing test
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    44
http_proxy= hg -R test-dev outgoing http://localhost:20059/
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    45
99d6cae511f7 add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    46
kill `cat test/hg.pid`