1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#!/usr/bin/env bash
. lib
rm -rf R
darcs init R
cd R
touch f
darcs record -lam 'add f'
touch g
darcs add g
darcs replace one two f
rm f
echo nyy | darcs record -m 'add g'
# make sure we recorded the addfile ./g but nothing about f:
darcs log --last=1 -v > log
grep -F 'addfile ./g' log
grep -v -F './f' log
# test that pending still contains the replace that was eliminated
# (in memory) by coalescing it with the detected rm
cat >pending.want <<EOF
replace ./f [A-Za-z_0-9] one two
EOF
diff -u pending.want _darcs/patches/pending >&2
cd ..
|