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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#!/usr/bin/env bash
. ./lib
# rollback nothing
rm -rf temp1
darcs init temp1
cd temp1
date > file1
darcs record -lam "test"
rm file1
darcs record -am "rm"
echo yYd | tr [A-Z] [a-z] | darcs rollback --last=1 | grep 'No changes selected'
cd ..
rm -rf temp1
# issue1848 - interactive selection of primitive patches
# should still work with rollback -p
darcs init temp1
cd temp1
echo 'f' > f
echo 'g' > g
darcs record -lam 'Add f and g'
echo ynq | darcs rollback -p 'f and g'
cd ..
rm -rf temp1
# issue2242 - rollback of a mv patch generates bogus changes
darcs init temp1
cd temp1
# Setup dir with empty file in it
mkdir A
touch A/foo
darcs rec -alm 'Add A'
# Mv dir and add content to file
darcs mv A B
echo -e 'line1\nline2' > B/foo
darcs rec -alm 'Move A -> B and change foo'
# Rollback everything in the move/change patch
echo ynya | darcs roll
# We shouldn't see any rm'd dirs/files (just a move and line removal hunk)
darcs wh | not grep rm
cd ..
rm -rf temp1
|