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

Re: Update of missing on non-working directory

From: Vadym Chepkov <vchepkov_at_gmail.com>
Date: Thu, 13 May 2010 06:49:25 -0400

On May 13, 2010, at 5:43 AM, Campbell Allan wrote:

>
> On Wednesday 12 May 2010, Vadym Chepkov wrote:
>> Consider this:
>>
>> $ svn -q --non-interactive update /blah-blah
>> $ echo $?
>> 0
>>
>> No output even to stderr, no indication of a failure at all.
>> Subversion doesn't always used interactively, hence --non-interactive
>> switch. If you made a mistake in a script it will be unnoticed (well, this
>> was my unpleasant surprise)
>>
>> Vadym
>>
>
> If you are using it in a script and want to guard against user error then one
> of the first checks should be a svn info to verify that the path is part of a
> working copy. This will return non zero on an error as well as some output
> even with --non-interactive flag.
>
> $ svn --non-interactive info /bob
> svn: '/' is not a working copy
> svn: Can't open file '/.svn/entries': No such file or directory
> $ echo $?
> 1
>
> Campbell
>
> p.s. try to avoid top posting on mailing lists. It makes it more difficult to
> follow the chain of replies, especially when viewed online or in digests.
>

There are always workarounds and this is exactly what I did,
but it's not "Unix" way of handling errors.

Vadym
Received on 2010-05-13 12:50:07 CEST

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.