tests/test-http-clone-r
author Matt Mackall <mpm@selenic.com>
Wed, 01 Aug 2007 12:33:12 -0500
changeset 5045 f191bc3916f7
parent 3853 c0b449154a90
child 5384 e3a0c092b4e2
permissions -rwxr-xr-x
merge: do early copy to deal with issue636 Without copies/renames, merges source names are 1:1 with their targets. Copies and renames introduce the possibility that there will be two merges with the same input but different output. By doing the copy to the destination name before the merge, the actual merge becomes 1:1 again, and no source is the input to two different merges. - add a preliminary scan to applyupdates to do copies - for the merge action, pass the old name (for finding ancestors) and the new name (for input to the merge) to filemerge - eliminate the old post-merge copy - lookup file contents from new name in filemerge - pass new name to external merge helper - report merge failure at new name - add a test
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3449
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
     1
#!/bin/sh
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
     2
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
     3
hg init remote
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
     4
cd remote
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
     5
echo "# creating 'remote'"
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
     6
cat >>afile <<EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
     7
0
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
     8
EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
     9
hg add afile
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    10
hg commit -m "0.0"
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    11
cat >>afile <<EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    12
1
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    13
EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    14
hg commit -m "0.1"
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    15
cat >>afile <<EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    16
2
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    17
EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    18
hg commit -m "0.2"
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    19
cat >>afile <<EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    20
3
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    21
EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    22
hg commit -m "0.3"
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    23
hg update -C 0
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    24
cat >>afile <<EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    25
1
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    26
EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    27
hg commit -m "1.1"
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    28
cat >>afile <<EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    29
2
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    30
EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    31
hg commit -m "1.2"
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    32
cat >fred <<EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    33
a line
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    34
EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    35
cat >>afile <<EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    36
3
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    37
EOF
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    38
hg add fred
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    39
hg commit -m "1.3"
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    40
hg mv afile adifferentfile
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    41
hg commit -m "1.3m"
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    42
hg update -C 3
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    43
hg mv afile anotherfile
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    44
hg commit -m "0.3m"
3853
c0b449154a90 switch to the .hg/store layout, fix the tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3449
diff changeset
    45
hg debugindex .hg/store/data/afile.i
c0b449154a90 switch to the .hg/store layout, fix the tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3449
diff changeset
    46
hg debugindex .hg/store/data/adifferentfile.i
c0b449154a90 switch to the .hg/store layout, fix the tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3449
diff changeset
    47
hg debugindex .hg/store/data/anotherfile.i
c0b449154a90 switch to the .hg/store layout, fix the tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3449
diff changeset
    48
hg debugindex .hg/store/data/fred.i
c0b449154a90 switch to the .hg/store layout, fix the tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3449
diff changeset
    49
hg debugindex .hg/store/00manifest.i
3449
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    50
hg verify
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    51
echo "# Starting server"
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    52
hg serve -p 20061 -d --pid-file=../hg1.pid
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    53
cd ..
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    54
cat hg1.pid >> $DAEMON_PIDS
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    55
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    56
echo "# clone remote via stream"
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    57
for i in 0 1 2 3 4 5 6 7 8; do
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    58
   hg clone -r "$i" http://localhost:20061/ test-"$i" 2>&1
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    59
   if cd test-"$i"; then
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    60
      hg verify
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    61
      cd ..
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    62
   fi
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    63
done
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    64
cd test-8
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    65
hg pull ../test-7
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    66
hg verify
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    67
cd ..
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    68
cd test-1
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    69
hg pull -r 4 http://localhost:20061/ 2>&1
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    70
hg verify
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    71
hg pull http://localhost:20061/ 2>&1
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    72
cd ..
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    73
cd test-2
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    74
hg pull -r 5 http://localhost:20061/ 2>&1
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    75
hg verify
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    76
hg pull http://localhost:20061/ 2>&1
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    77
hg verify
c8686e3f0291 Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    78
cd ..