[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 2177 - trunk/tools/hook-scripts

From: Michael Wood <mwood_at_its.uct.ac.za>
Date: 2002-06-13 13:48:08 CEST

On Wed, Jun 12, 2002 at 06:05:51PM -0700, Blair Zajac wrote:
> Greg Stein wrote:
> >
> > On Wed, Jun 12, 2002 at 07:27:49PM -0500, blair@tigris.org wrote:
> > >...
> > > +my @command = ($svnlook, $repos, 'rev', $rev, 'info');
> > > +my ($status, @svnlooklines) = &safe_read_from_pipe(@command);
> > > +if ($status) {
> > > + die join("\n", "$0: @command failed with this output:", @svnlooklines),
> > > + "\n";
> > > +}
> >
> > This six-line pattern is used over and over and over. Can you make it a
> > single function like so:
> >
> > @svnlooklines = &run_command($svnlook, $repos, ...);
> >
> > The function itself can 'die' and print the error and whatnot. This will
> > also simplify and streamline the interesting part of the script.
> >
> > Cheers,
> > -g
>
> Will do.
[snip]

Is it really necessary to add in "Will do." and quote over 200
lines of the scipt? (Same goes for Greg.)

-- 
Michael Wood <mwood@its.uct.ac.za>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jun 13 13:49:48 2002

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