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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
#!/bin/bash
set -e
$PREPARE_CLEAN > /dev/null
$INCLUDE_FUNCS
cd $WC
filename=update-file
echo "A testline #1" > $filename
echo "A testline #2" >> $filename
echo " ci1"
$BINq ci -m "new file"
orig=`md5sum $filename`
$WC2_UP_ST_COMPARE
echo "A further line" >> $filename
echo " ci2"
$BINq ci -m "new file"
pushd $WC2 > /dev/null
echo "A newly changed line" >> $filename
echo " up1"
if FSVS_CONFLICT=STOP $BINq up 2> /dev/null
then
$ERROR "The modified file was overwritten!"
else
$SUCCESS "Modified files are not overwritten."
fi
#$BINdflt -d revert $filename
if $BINq revert $filename
then
$SUCCESS "The modified file was reverted."
else
$ERROR "Not reverted?"
fi
now=`md5sum $filename`
echo " Before: $orig"
echo " After : $now"
if [[ $now == $orig ]]
then
$SUCCESS "The modified file was really reverted."
else
$ERROR "Revert did not work!"
fi
if [[ `$BINdflt st`x == "x" ]]
then
$SUCCESS "No status output after revert."
else
$BINdflt st
$ERROR "Some status change??"
fi
rm $filename
popd > /dev/null
$WC2_UP_ST_COMPARE
|