summaryrefslogtreecommitdiff
authorcniehaus <cniehaus>2002-08-30 14:41:18 (UTC)
committer cniehaus <cniehaus>2002-08-30 14:41:18 (UTC)
commitfcc36ee22475de197210352a06c962c96aabcecf (patch) (side-by-side diff)
treefd11c79030fd534534dbfee6a1b5824819a56f8e
parente6ee74db3a07449fc0c5b9291ad602b5b9097fa5 (diff)
downloadopie-fcc36ee22475de197210352a06c962c96aabcecf.zip
opie-fcc36ee22475de197210352a06c962c96aabcecf.tar.gz
opie-fcc36ee22475de197210352a06c962c96aabcecf.tar.bz2
nice script from KDE
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 @@
+#!/bin/sh
+# (C) 2001 Charles Samuels <charles@kde.org>
+#
+# 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
+