#!/usr/bin/env bash
set -ev

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

rm -rf temp1
mkdir temp1
cd temp1
$DARCS init
echo hello world > foo
$DARCS add foo
$DARCS record -a -m add -A x
echo goodbye world >> foo
cp foo bar
$DARCS revert -a
$DARCS show contents foo | cmp foo -

$DARCS unrevert -a
cmp foo bar

cd ..
rm -rf temp1

