[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:30:10 CEST

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;

> +}
> +elsif (defined ($dash_f)) {
> + die ("unknown option ${dash_f}");
> +}
> +
> +
> my $log_cmd = "svn log";
>
> my $log_separator =
> "------------------------------------------------------------------------\n";
>
> -open (LOG_OUT, "$log_cmd |") or die ("Unable to run \"$log_cmd\".\n");
> +if ($logfile) {

Same here.

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:30:46 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.