#!/bin/sh
set -ev

test $DARCS || DARCS=$PWD/../darcs
rm -rf temp
mkdir temp
cd temp
$DARCS init
echo hi world > temp.c
$DARCS add temp.c
$DARCS record --all -A test --patch-name=hi
echo goodbye >> temp.c
$DARCS whatsnew
$DARCS record -a -A au -m bye
echo bar > bar.c
$DARCS add bar.c
$DARCS record -a -m one -A ex
$DARCS mv bar.c zig.c
$DARCS whatsnew
$DARCS record -a -m two -A ex
mkdir baz
$DARCS add baz
$DARCS whatsnew
$DARCS record -a -m three -A ex
$DARCS mv zig.c baz/bar.c
$DARCS whatsnew
$DARCS record -a -m four -A ex
$DARCS mv baz temp
$DARCS whatsnew
$DARCS record -a -m five -A ex
cd ..
rm -rf temp

