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

Re: want to tell of there are uncommitted changes

From: David Weintraub <qazwart_at_gmail.com>
Date: Thu, 22 Apr 2010 14:54:23 -0400

On Thu, Apr 22, 2010 at 2:32 PM, Pat Farrell <pfarrell_at_pfarrell.com> wrote:
> Hi,
>
> I'm trying to wrap a standard sequence of steps in a shell script
> (linux/bash) and can't seem to figure out how to tell of the execution of
>
> svn status

The "svn status" command returned 0 because it worked. It successfully
reported the status.

There's always a question about what error codes should return. I've
had lots of arguments with Perforce about the same thing because
Perforce commands almost always succeed even when they give you
anomalous results. For example, if I try to mark a non-existant file
for editing, Perforce will return a 0 even though that file doesn't
exist. Perforce tells me the command succeeded because it didn't
crash. I say that the command should return a non-zero because it
didn't quite do what I want.

The "svn status" is a bit different because I am not sure what should
constitute an error. The command reports back changed files as it's
suppose to. Maybe I should return a non-zero error code if there is
nothing to report.

Or maybe, as your thinking goes, I should return a non-zero error code
if there are files that do differ. The problem is that the command is
working as I suspect it should.

The only issue I have is that "svn status" returns a zero even if
you're not in a working directory. To me, that should return a
non-zero.

The only thing I could suggest is to see what the svn status command
returns to STDOUT.

-- 
David Weintraub
qazwart_at_gmail.com
Received on 2010-04-22 20:54:52 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.