author | llornkcor <llornkcor> | 2005-08-12 01:43:02 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2005-08-12 01:43:02 (UTC) |
commit | f0790abc938501893be9b6fdaf49d7009ac9c11f (patch) (side-by-side diff) | |
tree | e381b763250be33c7a2875e4c0b032accd832836 | |
parent | 4a9177bbf40adc991e35392a7347aa14f90592ea (diff) | |
download | opie-f0790abc938501893be9b6fdaf49d7009ac9c11f.zip opie-f0790abc938501893be9b6fdaf49d7009ac9c11f.tar.gz opie-f0790abc938501893be9b6fdaf49d7009ac9c11f.tar.bz2 |
fix with import from kdescripts
-rw-r--r-- | scripts/cvsrevertlast | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/cvsrevertlast b/scripts/cvsrevertlast index cfbfd56..d019c44 100644 --- a/scripts/cvsrevertlast +++ b/scripts/cvsrevertlast @@ -5,14 +5,20 @@ # by one version, then you can commit them. This # is like a less polite version of cvsblame ;) +##!/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}'` +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 + |