Login | Register
My pages Projects Community openCollabNet

Discussions > users [DISABLED] > Re: Return value of "svn info"

subversion
Discussion topic

Back to topic list

Re: Return value of "svn info"

Author Jake Stone <jake dot the dot stone at gmail dot com>
Full name Jake Stone <jake dot the dot stone at gmail dot com>
Date 2009-10-22 19:46:34 PDT
Message Hyrum K. Wright wrote:
>
> On Oct 22, 2009, at 5:31 PM, Stefan Sperling wrote:
>
>> 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
>>
That example shows it returning 1 on a NON-working-copy, which is what I
want.
My question was more of will it return 1 (or any non-zero value) when
the target IS a working copy, but some other error occurs.

>>> 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.
>
> Ideally, you use the APIs; they will continue to answer the question
> in the correct manner.
>
> -Hyrum
Are the APIs separate from the standard SVN client distribution? How
would I call them?

« Previous message in topic | 6 of 14 | Next message in topic »

Messages

Show all messages in topic

Change the svnserve URL jborys <john_borys at comcast dot net> jborys <john_borys at comcast dot net> 2009-10-22 12:41:16 PDT
     Re: Change the svnserve URL ryandesign Ryan Schmidt 2009-10-22 13:43:35 PDT
         Return value of "svn info" Jake Stone <jake dot the dot stone at gmail dot com> Jake Stone <jake dot the dot stone at gmail dot com> 2009-10-22 15:14:02 PDT
             Re: Return value of "svn info" stsp Stefan Sperling 2009-10-22 15:31:43 PDT
                 Re: Return value of "svn info" hwright Hyrum K. Wright 2009-10-22 17:06:28 PDT
                     Re: Return value of "svn info" Jake Stone <jake dot the dot stone at gmail dot com> Jake Stone <jake dot the dot stone at gmail dot com> 2009-10-22 19:46:34 PDT
                         Re: Return value of "svn info" ryandesign Ryan Schmidt 2009-10-22 21:34:04 PDT
                             Re: Return value of "svn info" Jake Stone <jake dot the dot stone at gmail dot com> Jake Stone <jake dot the dot stone at gmail dot com> 2009-10-22 22:02:29 PDT
                         Re: Return value of "svn info" stsp Stefan Sperling 2009-10-23 01:09:45 PDT
         Re: Change the svnserve URL jborys <john_borys at comcast dot net> jborys <john_borys at comcast dot net> 2009-10-22 15:57:54 PDT
             Re: Change the svnserve URL ryandesign Ryan Schmidt 2009-10-22 16:11:20 PDT
                 Re: Change the svnserve URL jborys <john_borys at comcast dot net> jborys <john_borys at comcast dot net> 2009-10-22 16:23:52 PDT
                     Re: Change the svnserve URL ryandesign Ryan Schmidt 2009-10-22 16:37:27 PDT
                         Re: Change the svnserve URL jborys <john_borys at comcast dot net> jborys <john_borys at comcast dot net> 2009-10-22 17:30:42 PDT
Messages per page: