Follow upstream changes -- Bytestring updates
[git-darcs-import.git] / tests / issue279_get_extra.sh
blob89e92657a2b65c3e3e4da176248065d43651928c
1 #!/usr/bin/env bash
2 set -ev
4 # issue279: a conflict case resulting in "bug in get_extra" with old
5 # format repos and "Malformed patch bundle" with darcs-2 repos.
7 not () { "$@" && exit 1 || :; }
9 rm -rf temp1 temp_a temp_b temp_c temp_d
10 mkdir temp1
11 cd temp1
12 darcs init --darcs-2
13 echo 0 > f
14 darcs add f
15 darcs record -am 00
16 cd ..
18 for r in a b c d; do
19 darcs put --repodir temp1 temp_$r
20 cd temp_$r;
21 echo $r > f
22 darcs record -am "patch:$r";
23 cd ..
24 done
26 cd temp_d
27 darcs pull -a ../temp_a
28 darcs pull -a ../temp_b
29 darcs pull -a ../temp_c
30 cd ..
31 cd temp_c
32 darcs pull -a ../temp_a
33 darcs pull -a ../temp_b
34 echo rc > f
35 darcs record -a -m rc
36 cd ..
37 cd temp_d
38 darcs pull -a ../temp_c > log
39 not grep -i "no remote changes" log
40 not grep -i get_extra log
41 cd ..
43 rm -rf temp1 temp_a temp_b temp_c temp_d log