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