Follow upstream changes -- rest
[git-darcs-import.git] / tests / look_for_add.sh
blobe3aae482020209a24fc24e9904dce6ab69b81d0e
1 #!/usr/bin/env bash
3 cat > empty_pending <<EOF
6 EOF
7 check_empty_pending() {
8 echo ================ pending ==================
9 cat _darcs/patches/pending
10 echo ================ pending ==================
11 [ -z _darcs/patches/pending ] || cmp _darcs/patches/pending ../empty_pending
14 set -ev
16 rm -rf temp1 temp2
17 mkdir temp1 temp2
18 cd temp1
19 darcs init
20 mkdir dir
21 darcs record -a -m add_dir -A x --look-for-adds
22 check_empty_pending
23 echo zig > dir/foo
24 echo zag > foo
25 mkdir dir2
26 echo hi > dir2/foo2
27 darcs record -a -m add_foo -A x --look-for-adds
28 check_empty_pending
29 cd ../temp2
30 darcs init
31 darcs pull -a ../temp1
32 cd ..
33 cmp temp1/dir2/foo2 temp2/dir2/foo2
34 cmp temp1/dir/foo temp2/dir/foo
35 cmp temp1/foo temp2/foo
36 rm -rf temp1 temp2