#!/bin/sh
set -ev

test $DARCS || DARCS=$PWD/../darcs

rm -rf temp
mkdir temp
cd temp

$DARCS initialize
echo text > afile.txt
$DARCS add afile.txt
$DARCS record --author me --all --no-test --patch-name init
mkdir d
echo The following mv should fail, since d isnt in the repo.
if $DARCS mv afile.txt d/afile.txt; then
false
fi

# Now clean up.
cd ..
rm -rf temp

