Follow upstream changes -- rest
[git-darcs-import.git] / tests / issue709_pending_look-for-adds.sh
blobac89dfecdad477bc7e9dc492659d7c8bdc76ff09
1 #!/bin/sh
2 set -ve
4 ## I would use the builtin !, but that has the wrong semantics.
5 not () { "$@" && exit 1 || :; }
7 rm -rf temp1
8 mkdir temp1
9 cd temp1
10 darcs init
12 # Here we check whether recording just one of two --look-for-add
13 # addfiles causes any trouble (which it doesn't)
15 date > f1
16 date > f2
17 echo yyd | darcs record -l -m ff
19 cat _darcs/patches/pending
21 not darcs wh
22 rm f2
24 # Try recording a file add without --look-for-adds, with a setpref
25 # patch present that we don't record.
27 darcs setpref boringfile .boring
29 echo bar > bar
30 darcs add bar
31 echo yyd | darcs record -mbar
33 cat _darcs/patches/pending
35 darcs whatsnew -s
37 test -z "`darcs whatsnew -s`"
39 # Now try the same thing using --look-for-adds
41 echo foo > foo
43 darcs wh -l
45 # remove any files added by profiling or hpc...
46 rm -f darcs.tix darcs.prof
48 echo yyd | darcs record --look-for-adds -mfoo
50 cat _darcs/patches/pending
52 darcs whatsnew -s
54 test -z "`darcs whatsnew -s`"
56 cd ..
57 rm -rf temp1