3 #=======================================================================
5 # File ID: 58bc21ea-f744-11dd-afa7-000475e441b9
6 # “What’s New” — Lists changes in a Subversion working copy which
7 # haven’t been downloaded yet. Or in other words, see what has happened
8 # in the directory tree since your last update.
10 # Character set: UTF-8
11 # ©opyleft 2008– Øyvind A. Holm <sunny@sunbase.org>
12 # License: GNU General Public License version 2 or later, see end of
13 # file for legal stuff.
14 #=======================================================================
34 $progname =~ s/^.*\/(.*?)$/$1/;
35 our $VERSION = "0.00";
37 Getopt
::Long
::Configure
("bundling");
40 "debug" => \
$Opt{'debug'},
41 "help|h" => \
$Opt{'help'},
42 "verbose|v+" => \
$Opt{'verbose'},
43 "version" => \
$Opt{'version'},
45 ) || die("$progname: Option error. Use -h for help.\n");
47 $Opt{'debug'} && ($Debug = 1);
48 $Opt{'help'} && usage
(0);
49 if ($Opt{'version'}) {
54 my $curr = `svn info --xml .`;
55 $curr =~ s/^.*?<entry\b.+revision="(\d+)".*$/$1/s;
56 system(sprintf("svn log -r%lu:HEAD %s%s | less",
58 $Opt{'verbose'} ?
"-v " : "",
63 # Print program version {{{
64 print("$progname v$VERSION\n");
69 # Send the help message to stdout {{{
72 if ($Opt{'verbose'}) {
78 Usage: $progname [options] [file [files [...]]]
85 Increase level of verbosity. Can be repeated.
87 Print version information.
89 Print debugging messages.
97 # Print a status message to stderr based on verbosity level {{{
98 my ($verbose_level, $Txt) = @_;
100 if ($Opt{'verbose'} >= $verbose_level) {
101 print(STDERR
"$progname: $Txt\n");
107 # Print a debugging message {{{
109 my @call_info = caller;
110 chomp(my $Txt = shift);
111 my $File = $call_info[1];
113 $File =~ s
#^.*/(.*?)$#$1#;
114 print(STDERR
"$File:$call_info[2] $$ $Txt\n");
121 # Plain Old Documentation (POD) {{{
131 [options] [file [files [...]]]
141 =item B<-h>, B<--help>
143 Print a brief help summary.
145 =item B<-v>, B<--verbose>
147 Increase level of verbosity. Can be repeated.
151 Print version information.
155 Print debugging messages.
165 Made by Øyvind A. Holm S<E<lt>sunny@sunbase.orgE<gt>>.
169 Copyleft © Øyvind A. Holm E<lt>sunny@sunbase.orgE<gt>
170 This is free software; see the file F<COPYING> for legalese stuff.
174 This program is free software: you can redistribute it and/or modify it
175 under the terms of the GNU General Public License as published by the
176 Free Software Foundation, either version 2 of the License, or (at your
177 option) any later version.
179 This program is distributed in the hope that it will be useful, but
180 WITHOUT ANY WARRANTY; without even the implied warranty of
181 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
182 See the GNU General Public License for more details.
184 You should have received a copy of the GNU General Public License along
186 If not, see L<http://www.gnu.org/licenses/>.
194 # vim: set fenc=UTF-8 ft=perl fdm=marker ts=4 sw=4 sts=4 et fo+=w :