Follow upstream changes -- rest
[git-darcs-import.git] / tests / issue154_pull_dir_not_empty.sh
blob026493e357adb28792d9749c6aa674dc0f3f017a
1 #!/usr/bin/env bash
2 set -ev
4 # A test for pulling a patch to remove a directory when the local copy is not empty.
5 # Issue154
7 not () { "$@" && exit 1 || :; }
9 rm -rf temp1
10 mkdir temp1
11 cd temp1
12 darcs init
13 mkdir d
14 darcs add d
15 darcs record -a -m "Added directory d"
16 darcs get ./ puller
17 cd puller
18 touch d/moo
19 darcs add d/moo
20 cd ..
21 rm -rf d
22 darcs record -a -m "Remove directory d"
23 cd puller
24 echo y | darcs pull -a .. > log
25 grep -i "backing up" log
26 grep -i "finished pulling" log
27 cd ..
28 rm -rf temp1