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

RE: svn exit/return/status codes

From: bruce <bedouglas_at_earthlink.net>
Date: 2004-08-26 00:10:51 CEST

thanks for the reply...

however, i still don't know what valid error/status codes are. so how would
i create an app that would know when it's received/generated an error!!!!

i'm trying to find where the status/err codes for a given command line
function would be located.... i was hoping that there was some form of
'error.h' that provided this kind of information...

thanks

-bruce

-----Original Message-----
From: Peter Valdemar Mørch [mailto:swp5jhu02@sneakemail.com]
Sent: Wednesday, August 25, 2004 11:39 AM
To: users@subversion.tigris.org
Subject: Re: svn exit/return/status codes

bruce bedouglas-at-earthlink.net |Lists| wrote:
> foo = exec('svn ls svn://foo.com/repos/trunk')

You mention both perl and php and the answer differs between them. These
answers aren't really specific to svn either. Here you go:

In perl, if you run exec(), no more lines in your script will ever be
run. Use system() or `` (backticks) instead. The return code will be
found in the $? variable, such as:

my $output = `svn ls svn://foo.com/repos/trunk 2>&1`;
die "svn failed with errorcode $?"
  if $?;

In php, you'll want to run the command as
exec('svn ls svn://foo.com/repos/trunk', $output, $errorcode);
if ($errorcode)
        yadaYadaYada();

Peter

--
Peter Valdemar Mørch
http://www.morch.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Aug 26 00:07:48 2004

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

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