Follow upstream changes -- rest
[git-darcs-import.git] / tests / unrecord-dont-prompt.sh
blobae7d2aa5b22a7730384c7c5018ffe857c90b8487
1 #!/usr/bin/env bash
3 set -ev
5 # Check that the right patches get unrecorded using --dont-prompt-for-dependencies
7 rm -rf temp1
8 mkdir temp1
9 cd temp1
10 darcs init
11 echo foo > f
12 darcs record -Ax -alm foo1
13 echo bar > b
14 darcs rec -Ax -alm bar1
15 echo foo2 > f
16 darcs record -Ax -alm foo2
17 echo bar2 > b
18 darcs record -Ax -alm bar2
19 darcs unrec --no-deps -p foo1
20 darcs changes -p foo --count | grep 2
21 #foo1 is depended upon, we don't unpull it
22 echo y | darcs unrec --dont-prompt-for-dependencies -p foo1
23 #on the previous line, we don't get asked about foo2.
24 darcs changes -p foo --count | grep 0
25 #yet, it is unrecorded.
26 darcs changes -p bar --count | grep 2
27 cd ..
28 rm -rf temp1