#!/bin/bash file=$1 revision=$2 if [ $revision"X" == "X" ] then echo "usage: svnr " echo "prepares file to roll back to that revision" exit -1 fi oldFile=$file.$revision svn update $file -r $revision echo "got $file r$revision" mv $file $oldFile svn update $file cp -r $oldFile $file echo "done. delete $oldFile when you like."