author | cniehaus <cniehaus> | 2002-08-30 14:41:18 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-08-30 14:41:18 (UTC) |
commit | fcc36ee22475de197210352a06c962c96aabcecf (patch) (unidiff) | |
tree | fd11c79030fd534534dbfee6a1b5824819a56f8e | |
parent | e6ee74db3a07449fc0c5b9291ad602b5b9097fa5 (diff) | |
download | opie-fcc36ee22475de197210352a06c962c96aabcecf.zip opie-fcc36ee22475de197210352a06c962c96aabcecf.tar.gz opie-fcc36ee22475de197210352a06c962c96aabcecf.tar.bz2 |
nice script from KDE
-rw-r--r-- | scripts/cvsrevertlast | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/cvsrevertlast b/scripts/cvsrevertlast new file mode 100644 index 0000000..cfbfd56 --- a/dev/null +++ b/scripts/cvsrevertlast | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/bin/sh | ||
2 | # (C) 2001 Charles Samuels <charles@kde.org> | ||
3 | # | ||
4 | # This script reverts all the files given on the command | ||
5 | # by one version, then you can commit them. This | ||
6 | # is like a less polite version of cvsblame ;) | ||
7 | # | ||
8 | |||
9 | for i in $@ ; | ||
10 | do | ||
11 | |||
12 | text=`cvs log "$i" | grep 'revision[^s]'` | ||
13 | current=`echo $text | awk '{print $2}'` | ||
14 | previous=`echo $text | awk '{print $4}'` | ||
15 | echo $i... "(reverting from $current to $previous)" | ||
16 | cvs up -j $current -j $previous $i | ||
17 | done | ||
18 | |||