X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/35e20db0ee72655b698dc9fcaca1705c009254ee..40973ea5fd3b23a02d14f1cc902e6cf01735e9ab:/difflast.pl diff --git a/difflast.pl b/difflast.pl index 1e724c768f..8190566ccb 100755 --- a/difflast.pl +++ b/difflast.pl @@ -37,8 +37,10 @@ sub get_last_rev($) # first, use "cvs status" if this fails if ( open(INPUT, $file) ) { while () { - if ( /\$Id$basename,v (\d+\.\d+)/ ) { - return &dec_rev($1); + # notice that we shouldn't have '$' followed by 'Id' or cvs will + # substitute it! + if ( /\$(Id): $basename,v (\d+\.\d+)/ ) { + return &dec_rev($2); } } } @@ -62,6 +64,9 @@ sub process_file($) if ( !$revlast ) { warn "Failed to get the last revision for $file, skipping.\n" } + elsif ( $revlast =~ "\.0" ) { + warn "No previous revision of the file $file.\n" + } else { print `$CVS diff -b -kk -r $revlast $file`; }