summaryrefslogtreecommitdiff
path: root/scripts/cvslastchange
authorzecke <zecke>2002-07-23 12:21:02 (UTC)
committer zecke <zecke>2002-07-23 12:21:02 (UTC)
commit1a52af777b36e92b5c8414b1438d0889c42ad8de (patch) (side-by-side diff)
tree787cb9996fc3ba6f559000b2435129be515033c8 /scripts/cvslastchange
parent32724310c6563a52f61ea99d8a0e34df6f973faf (diff)
downloadopie-1a52af777b36e92b5c8414b1438d0889c42ad8de.zip
opie-1a52af777b36e92b5c8414b1438d0889c42ad8de.tar.gz
opie-1a52af777b36e92b5c8414b1438d0889c42ad8de.tar.bz2
some neat KDE scripts which makes living with
cvs more easy Carsten said I should commit then
Diffstat (limited to 'scripts/cvslastchange') (more/less context) (show whitespace changes)
-rw-r--r--scripts/cvslastchange25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/cvslastchange b/scripts/cvslastchange
new file mode 100644
index 0000000..ca77297
--- a/dev/null
+++ b/scripts/cvslastchange
@@ -0,0 +1,25 @@
+#!/usr/bin/perl
+
+use File::Basename;
+
+die "need a filename!" if (!length($ARGV[0]));
+
+$cvsversion= dirname($0) . "/cvsversion";
+$version=`$cvsversion $ARGV[0]`;
+
+chop $version;
+my $vold = $version;
+my $vnew = $version;
+
+if ($version=~/^(.*)\.1$/) {
+ $vold = $1 if ($version=~/^([^.]\.[^.])\.[^.]\.[^.]$/);
+}
+else {
+ if ($version=~/^(.*)\.([^.]*)$/) { $v1 = $1; $v2 = $2 }
+ $v2old = ${v2}-1;
+ $vold = $v1 . '.' . $v2old;
+}
+print "cvs -f log -N -r$vnew $ARGV[0]\n";
+system("cvs -f log -N -r$vnew $ARGV[0]");
+print "cvs -f diff -bp -u -r$vold -r$vnew $ARGV[0]\n";
+system("cvs -f diff -bp -u -r$vold -r$vnew $ARGV[0]");