2
# Copyright (C) 2004 Aaron Bentley
4
# See the file "COPYING" for further information about
5
# the copyright and warranty status of this work.
10
if [ $1 = "--undo" ]; then
14
undofile="$(dirname $1)/,,revert-undo.$(basename $1)"
15
if [ -n "$undo" ]; then
16
if [ ! -f "$undofile" ]; then
17
echo "No revert undo file for $1. Are you sure you reverted it?"
21
if patch $1 < $undofile; then
25
if [ -f $undofile ]; then
26
echo "You already have a file named $undofile. Please do something with it. (or did you mean file-revert --undo $1?)"
29
# if tla file-diffs $1 > $undofile; then
31
tla file-diffs $1 $2> $undofile
32
patch -R $1< $undofile
34
# echo Error encountered reverting file
35
# if [ -f $undofile ]; then
46
echo ' file-revert : Reverts changes since last or specified revision'
50
echo "Usage: file-revert [--undo] file [revision]"
57
# arch-tag: file-revert by Aaron Bentley (07:57 Feb 03, 2004)