File: cvsrevertlast

package info (click to toggle)
kde-dev-scripts 4%3A18.08.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,496 kB
  • sloc: perl: 15,466; lisp: 5,627; sh: 4,157; python: 3,892; ruby: 2,158; makefile: 16; sed: 9
file content (17 lines) | stat: -rwxr-xr-x 547 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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