summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--scripts/cvsrevertlast18
1 files changed, 18 insertions, 0 deletions
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 @@
1#!/bin/sh
2# (C) 2001 Charles Samuels <charles@kde.org>
3#
4# This script reverts all the files given on the command
5# by one version, then you can commit them. This
6# is like a less polite version of cvsblame ;)
7#
8
9for i in $@ ;
10do
11
12 text=`cvs log "$i" | grep 'revision[^s]'`
13 current=`echo $text | awk '{print $2}'`
14 previous=`echo $text | awk '{print $4}'`
15 echo $i... "(reverting from $current to $previous)"
16 cvs up -j $current -j $previous $i
17done
18