From fcc36ee22475de197210352a06c962c96aabcecf Mon Sep 17 00:00:00 2001 From: cniehaus Date: Fri, 30 Aug 2002 14:41:18 +0000 Subject: nice script from KDE --- diff --git a/scripts/cvsrevertlast b/scripts/cvsrevertlast new file mode 100644 index 0000000..cfbfd56 --- a/dev/null +++ b/scripts/cvsrevertlast @@ -0,0 +1,18 @@ +#!/bin/sh +# (C) 2001 Charles Samuels +# +# This script reverts all the files given on the command +# by one version, then you can commit them. This +# is like a less polite version of cvsblame ;) +# + +for i in $@ ; +do + + text=`cvs log "$i" | grep 'revision[^s]'` + current=`echo $text | awk '{print $2}'` + previous=`echo $text | awk '{print $4}'` + echo $i... "(reverting from $current to $previous)" + cvs up -j $current -j $previous $i +done + -- cgit v0.9.0.2