diff options
author | Peter Palfrader <peter@palfrader.org> | 2005-09-02 00:21:32 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2005-09-02 00:21:32 +0000 |
commit | 825759177827dc9c57dc4dbc0ede8848eaa72b64 (patch) | |
tree | ea23ede3810e1e4ba882fc0d415bd06f6b9809b0 /rvi | |
parent | 92603bccb2fc25f27eeead40079cd33a10886e9f (diff) |
Add some stuff
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@2 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'rvi')
-rwxr-xr-x | rvi | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -0,0 +1,35 @@ +#!/bin/sh + +if ! [ -e "$1" ] ; then + echo "$1 does not exist." >&2 + exit 1 +fi + +DN=`dirname "$1"` +BN=`basename "$1"` +if ! [ -e "$1,v" ] && ! [ -e "$DN/RCS/$BN,v" ] ; then + echo "Neither $1,v nor $DN/RCS/$BN,v do not exist." >&2 + exit 1 +fi + +rcsdiff -u $1 +if [ $? -ne 0 ] ; then + rcsdiff $1 > $1.rvi.diff + echo + echo "Differences detected" + echo "run 'co $1' to overwrite with last committed version" + echo "or 'co -l $1; patch $1 < $1.rvi.diff; ci -u $1' to commit" + exit 1 +fi +rm -f $1.rvi.diff + +co -l $1 +if [ $? -ne 0 ] ; then + echo "Check out failed." + echo "Maybe someone else is currently editing this file." + echo "Aborting rvi." + exit 1 +fi +/usr/bin/vim $1 +ci -u $1 + |