[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: Campbell Allan <campbell.allan_at_sword-ciboodle.com>
Date: Thu, 13 May 2010 10:43:50 +0100

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.

--
__________________________________________________________________________________
Sword Ciboodle is the trading name of ciboodle Limited (a company 
registered in Scotland with registered number SC143434 and whose 
registered office is at India of Inchinnan, Renfrewshire, UK, 
PA4 9LH) which is part of the Sword Group of companies.
This email (and any attachments) is intended for the named
recipient(s) and is private and confidential. If it is not for you, 
please inform us and then delete it. If you are not the intended 
recipient(s), the use, disclosure, copying or distribution of any 
information contained within this email is prohibited. Messages to 
and from us may be monitored. If the content is not about the 
business of the Sword Group then the message is neither from nor 
sanctioned by us.
Internet communications are not secure. You should scan this
message and any attachments for viruses. Under no circumstances
do we accept liability for any loss or damage which may result from
your receipt of this email or any attachment.
__________________________________________________________________________________
Received on 2010-05-13 11:46:51 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.