Follow upstream changes -- rest
[git-darcs-import.git] / tests / conflict-fight-failure.sh
blob1d6a985c7f40411dae1acf532dc32aa207825f15
1 #!/bin/env bash
3 # Test darcs conflict fight scenario.
5 # Set up two repos RA and RB. Create conflict in RB.
6 # After resolving conflict in RB, pull new patch from RA.
7 # Repeat, rinse.
9 # Author: Pekka Pessi
12 set -ev
14 record="record --ignore-time --all --author X"
16 rm -rf RA RB
17 mkdir RA
19 cd RA
20 echo 0 > file
21 darcs init
22 darcs add file
23 darcs $record -m0 file
24 cd ..
26 darcs get RA RB
28 # Create conflict in RB
29 cd RB
30 echo let it b > file
31 darcs $record -m B
32 cd ..
34 for i in 1 2 3 4 5 # 6 7 8 9 10 11 12
36 echo Create new patch A$i in RA
37 cd RA
38 echo a$i > file
39 darcs $record -m A$i
40 cd ..
42 echo Pull patch A$i from RA and get a conflict
43 cd RB
44 time darcs pull ../RA --verbose --all --patch "^A$i\$"
45 cd ..
47 echo Resolve conflict and start fighting by recording B$i
48 cd RB
49 echo let it b > file
50 darcs $record -m B$i
51 cd ..
52 done
54 rm -rf RA RB