Follow upstream changes -- rest
[git-darcs-import.git] / tests / push-dont-prompt-deps.sh
blobe9d41b4f6d5c8106b9d5ced99b69f0fe7f587476
1 #!/usr/bin/env bash
3 set -ev
5 # Check that the right patches get pushed 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 echo y | darcs push ../temp2 --dont-prompt-for-dependencies -p foo2 --dry-run > toto
25 #on the previous line, we don't get asked about foo1.
26 grep foo toto | wc -l | grep 2
27 #but we send it anyway.
28 grep bar toto | wc -l | grep 0
29 cd ..
30 rm -rf temp1 temp2