#!/bin/sh
set -ev

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

rm -rf temp
mkdir temp
cd temp

$DARCS init
touch fee fi fo fum
$DARCS add f*
$DARCS record --author me --all --no-test --patch-name add
$DARCS mv fee foo
touch fee
$DARCS add fee
$DARCS record --author me --all --no-test --patch-name newfee
$DARCS mv fi fib
$DARCS record --author me --all --no-test --patch-name mvfi
date > fi
$DARCS add fi 
$DARCS record --author me --all --no-test --patch-name newfi

cd ..

rm -rf temp

