File indexing completed on 2024-11-17 05:08:35

0001 #!/bin/sh
0002 # (C) 2001 Charles Samuels <charles@kde.org>
0003 #
0004 # This script reverts all the files given on the command
0005 # by one version, then you can commit them.  This
0006 # is like a less polite version of cvsblame ;)
0007 #
0008 
0009 for i in $@ ;
0010 do
0011         text=`cvs status "$i" | grep '[^s]Repository revision:.*$'`
0012         current=`echo $text | awk '{print $3}'`
0013         previous=`echo $current | awk -F . '{ ORS="."; OFS="\n"; for (i=1; i<NF; i++) print $i; ORS=""; $NF-=1; print $NF }'`
0014         echo $i... "(reverting from $current to $previous)"
0015         cvs up -j $current -j $previous $i
0016 done
0017