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

Re: Return value of "svn info"

From: Stefan Sperling <stsp_at_elego.de>
Date: Fri, 23 Oct 2009 00:31:37 +0200

On Thu, Oct 22, 2009 at 05:14:13PM -0500, Jake Stone wrote:
> Hello,
>
> I am writing a quick batch script to perform actions on several &
> arbitrary SVN working copies. One complication is that there are folders
> in the target directory that are unrelated - not SVN checkouts. One way
> I've found of checking to see if a given folder is an SVN working copy
> is to run "svn info %folder%" on it. So far, "svn info" returns 0 (or in
> Windows, sets %ERRORLEVEL% to 0) if the working copy exists, or 1 if the
> folder is not a working copy.
>
> My question is: would "svn info" ever return a non-zero value on an SVN
> working copy, for any reason? If so, this would break my script.

$ svn info foo
svn: The node '/home/stsp/svn/svn-trunk/foo' was not found.
$ echo $?
1

> Also: is there a simple way to check if a folder is a SVN working copy?

Right now, you can look for a .svn directory. But that will likely
stop working once working copy meta data is centralised at the working
copy root, or even at a single arbitrary location. For the latter case,
new commands will be added to register/unregister working copies with
a meta data store, and possibly list known working copies. But I don't
think anyone knows yet what these commands will look like.

So, this is easy right now, but will get harder in the future.

Stefan

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2410458

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-10-23 00:32:31 CEST

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