Follow upstream changes -- rest
[git-darcs-import.git] / tests / pull-dont-prompt-deps.sh
blob027c45ea5c76ee763f403286a527a1175ee0915f
1 #!/usr/bin/env bash
3 set -ev
5 # Check that the right patches get pulled using --dont-prompt-for-dependencies
7 rm -rf temp1
8 rm -rf temp2
9 mkdir temp2
10 mkdir temp1
11 cd temp2
12 darcs init
13 cd ..
14 cd temp1
15 darcs init
16 echo foo > f
17 darcs record -Ax -alm foo1
18 echo bar > b
19 darcs rec -Ax -alm bar1
20 echo foo2 > f
21 darcs record -Ax -alm foo2
22 echo bar2 > b
23 darcs record -Ax -alm bar2
24 cd ../temp2
25 echo y | darcs pull ../temp1 --dont-prompt-for-dependencies -p foo2 --dry-run > toto
26 #on the previous line, we don't get asked about foo1.
27 grep foo toto | wc -l | grep 2
28 #but we send it anyway.
29 grep bar toto | wc -l | grep 0
30 cd ..
31 rm -rf temp1 temp2