Merge branch 'darcs' into master
[git-darcs-import.git] / tests / issue1111-pull-intersection.sh
bloba2ccfdc2eb7a02689cae28692954119c483b891b
1 #!/usr/bin/env bash
3 ## The builtin ! has the wrong semantics for not.
4 not () { "$@" && exit 1 || :; }
5 # This test script is in the public domain.
7 set -ev
9 rm -rf temp1 temp2 temp3
11 mkdir temp1
12 cd temp1
13 darcs initialize
14 echo A > A
15 darcs add A
16 darcs record -a -m Aismyname
17 echo B > B
18 darcs add B
19 darcs record -a -m Bismyname
21 cd ..
22 darcs get temp1 temp2
24 cd temp2
25 darcs obliterate --last 1 -a
26 echo C > C
27 darcs add C
28 darcs record -a -m Cismyname
29 cd ..
31 mkdir temp3
32 cd temp3
33 darcs init
34 darcs pull -a -v --intersection ../temp1 ../temp2
36 darcs changes > out
37 cat out
38 grep Aismyname out
39 not grep Bismyname out
40 not grep Cismyname out
41 cd ..
43 rm -rf temp1 temp2 temp3