summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2005-08-12 01:43:02 (UTC)
committer llornkcor <llornkcor>2005-08-12 01:43:02 (UTC)
commitf0790abc938501893be9b6fdaf49d7009ac9c11f (patch) (unidiff)
treee381b763250be33c7a2875e4c0b032accd832836
parent4a9177bbf40adc991e35392a7347aa14f90592ea (diff)
downloadopie-f0790abc938501893be9b6fdaf49d7009ac9c11f.zip
opie-f0790abc938501893be9b6fdaf49d7009ac9c11f.tar.gz
opie-f0790abc938501893be9b6fdaf49d7009ac9c11f.tar.bz2
fix with import from kdescripts
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--scripts/cvsrevertlast18
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/cvsrevertlast b/scripts/cvsrevertlast
index cfbfd56..d019c44 100644
--- a/scripts/cvsrevertlast
+++ b/scripts/cvsrevertlast
@@ -1,18 +1,24 @@
1#!/bin/sh 1#!/bin/sh
2# (C) 2001 Charles Samuels <charles@kde.org> 2# (C) 2001 Charles Samuels <charles@kde.org>
3# 3#
4# This script reverts all the files given on the command 4# This script reverts all the files given on the command
5# by one version, then you can commit them. This 5# by one version, then you can commit them. This
6# is like a less polite version of cvsblame ;) 6# is like a less polite version of cvsblame ;)
7##!/bin/sh
8# (C) 2001 Charles Samuels <charles@kde.org>
9#
10# This script reverts all the files given on the command
11# by one version, then you can commit them. This
12# is like a less polite version of cvsblame ;)
7# 13#
8 14
9for i in $@ ; 15for i in $@ ;
10do 16do
11 17text=`cvs status "$i" | grep '[^s]Repository revision:.*$'`
12 text=`cvs log "$i" | grep 'revision[^s]'` 18current=`echo $text | awk '{print $3}'`
13 current=`echo $text | awk '{print $2}'` 19previous=`echo $current | awk -F . '{ ORS="."; OFS="\n"; for (i=1; i<NF; i++) print $i; ORS=""; $NF-=1; print $NF }'`
14 previous=`echo $text | awk '{print $4}'` 20echo $i... "(reverting from $current to $previous)"
15 echo $i... "(reverting from $current to $previous)" 21cvs up -j $current -j $previous $i
16 cvs up -j $current -j $previous $i
17done 22done
18 23
24