[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 2393 - trunk/tools/client-side

From: Blair Zajac <blair_at_orcaware.com>
Date: 2002-07-02 18:33:45 CEST

Blair Zajac wrote:
>
> kfogel@tigris.org wrote:
> >
> > Author: kfogel
> > Date: Tue, 02 Jul 2002 09:32:36 -0500
> > New Revision: 2393
> >
> > Modified:
> > trunk/tools/client-side/search-svnlog.pl
> > Log:
> > * subversion/tools/client-side/search-svnlog.pl: Add -f option to take
> > log data from a file.
> >
> > use strict;
> >
> > my $filter = shift || die ("Usage: $0 REGEXP\n");
> > +
> > +# ### Could do real option parsing here...
> > +my $dash_f = shift;
> > +my $logfile;
> > +if (defined ($dash_f) && ($dash_f eq "-f")) {
> > + $logfile = shift;
> > + die ("-f option needs argument") if (! $logfile);
>
> A file named '0' will cause a failure here. I like to use
>
> die ("-f option needs argument") unless length $logfile;

Actually, with the code flow, $logfile can be undefined, so
it should use "unless defined $logfile".

I can put in the Perl option parsing code using the standard
modules. Let me know.

Best,
Blair

-- 
Blair Zajac <blair@orcaware.com>
Web and OS performance plots - http://www.orcaware.com/orca/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 2 18:34:13 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.