diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bd9e6617827818fd043452c08c606f07b78014a0 (patch) | |
tree | 425bb4c3168f9c02f10150f235d2cb998dcc6108 /scripts/cvslastchange | |
download | tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.tar.gz tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'scripts/cvslastchange')
-rwxr-xr-x | scripts/cvslastchange | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/scripts/cvslastchange b/scripts/cvslastchange new file mode 100755 index 00000000..9c4688be --- /dev/null +++ b/scripts/cvslastchange @@ -0,0 +1,55 @@ +#! /usr/bin/env perl + +use File::Basename; + +sub usage() +{ + print "Usage:\n"; + print " $0 [ <filename > | <filename> <rev> | \n" . + " M +<digits> -<digits> <filename <rev> ]\n"; + print "\n"; + + exit 5; +} + +my $filename; + +my $argc = scalar @ARGV; + +if ($argc > 0 and $argc < 3 ) { + $filename = $ARGV[0]; + $cvsversion= dirname($0) . "/cvsversion"; + $version=`$cvsversion $filename`; + chomp $version; + $version=$ARGV[1] if ($argc > 1 and $ARGV[1] =~ /^[\d\.]{3,}$/); +} elsif ($argc == 5) { + $filename=$ARGV[3] if (-f $ARGV[3]); + $version=$ARGV[4] if ($ARGV[4] =~ /^[\d\.]{3,}$/); +} else { + &usage(); +} + +die "$0: filename expected" if(!length($filename)); +die "$filename: $!\n" if (! -f $filename); + +my $vold = $version; +my $vnew = $version; + +if ($version=~/^.*\.1$/) { + $vold = $1 if ($version=~/^(\d+\.\d+(?:\.\d+\.\d+)*)\.\d+\.1$/); +} +else { + if ($version=~/^(.*)\.([^.]*)$/) { $v1 = $1; $v2 = $2 } + $v2old = ${v2}-1; + $vold = $v1 . '.' . $v2old; +} +my $base = basename($filename); +my $dir = dirname($filename); +my $cmd = "cd $dir; cvs -f log -N -r$vnew $base"; +print "$cmd\n"; +system("$cmd"); +my $whitespace = ""; +$whitespace = "-b" unless (defined $ENV{"CVSLASTCHANGE_KEEP_WHITESPACE"}); +$cmd = "cd $dir; cvs -f diff -kk $whitespace -p -u -r$vold -r$vnew $base"; +print "$cmd\n"; +system("$cmd"); |