Fix compiler warning due to missing function prototype.
[svn.git] / tools / client-side / showchange.pl
blobacec306e0829bae155ee3531b908ce5bc92ddcea
1 #!/usr/bin/perl -w
3 use strict;
5 # ====================================================================
6 # Show the log message and diff for a revision.
8 # $ showchange.pl REVISION [WC_PATH|URL]
11 if ((scalar(@ARGV) == 0)
12 or ($ARGV[0] eq '-?')
13 or ($ARGV[0] eq '-h')
14 or ($ARGV[0] eq '--help')) {
15 print <<EOF;
16 Show the log message and diff for a revision.
17 usage: $0 REVISION [WC_PATH|URL]
18 EOF
19 exit 0;
22 my $revision = shift || die ("Revision argument required.\n");
23 if ($revision =~ /r([0-9]+)/) {
24 $revision = $1;
27 my $url = shift || "";
29 my $svn = "svn";
31 my $prev_revision = $revision - 1;
33 system ("${svn} log -v --incremental -r${revision} $url");
34 system ("${svn} diff -r${prev_revision}:${revision} $url");