#!/bin/sh
set -ev

test $DARCS || DARCS=$PWD/../darcs
ACTUAL_DARCS=`which $DARCS`
DARCSPATH=`dirname $ACTUAL_DARCS`
export PATH="$DARCSPATH:$PATH"

rm -rf temp temp_0
mkdir temp
cd temp
$DARCS init
echo tester > _darcs/prefs/author
date > bla
$DARCS add bla
$DARCS record -a --patch-name=1
cd ..
$DARCS get temp
cd temp
date > bla2
$DARCS add bla2
$DARCS record -a --patch-name=2
$DARCS push -a ../temp_0
cd ..

rm -rf temp*
