summaryrefslogtreecommitdiffstats
path: root/scripts/cvsrevertlast
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbd9e6617827818fd043452c08c606f07b78014a0 (patch)
tree425bb4c3168f9c02f10150f235d2cb998dcc6108 /scripts/cvsrevertlast
downloadtdesdk-bd9e6617827818fd043452c08c606f07b78014a0.tar.gz
tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'scripts/cvsrevertlast')
-rwxr-xr-xscripts/cvsrevertlast17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/cvsrevertlast b/scripts/cvsrevertlast
new file mode 100755
index 00000000..96808514
--- /dev/null
+++ b/scripts/cvsrevertlast
@@ -0,0 +1,17 @@
+#!/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 status "$i" | grep '[^s]Repository revision:.*$'`
+ current=`echo $text | awk '{print $3}'`
+ previous=`echo $current | awk -F . '{ ORS="."; OFS="\n"; for (i=1; i<NF; i++) print $i; ORS=""; $NF-=1; print $NF }'`
+ echo $i... "(reverting from $current to $previous)"
+ cvs up -j $current -j $previous $i
+done
+