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

svn status API and missing switched flag

From: Marc Strapetz <marc.strapetz_at_syntevo.com>
Date: Mon, 12 Oct 2015 10:56:21 +0200

Consider following working copy for which directory "dir" is switched:

$ svn status -v
                814 813 marc .
     S 814 813 marc dir
                814 356 strapetz dir\sub.txt

Now, when invoking "svn status" in sub-directory "dir", the "switched"
state is not displayed anymore:

$ svn status -v
                814 813 marc .
                814 356 strapetz sub.txt

 From command line, this may be reasonable, because the user may expect
to see the status "relative" to his current working directory.

 From API perspective, the missing "switched" flag is not expected. I
guess that usually a non-root and non-infinity "svn status" will be
invoked to efficiently update the state of a certain directory (at least
we do so). Still the state is usually expected to be relative to the
working copy root.

To resolve this, I'd propose to change core "svn status" itself to
evaluate the "switched" flag for the status root directory. This will
result in an additional "S", but won't do any harm:

$ svn status -v
    S 814 813 marc .
                 814 356 strapetz sub.txt
Received on 2015-10-12 10:56:18 CEST

This is an archived mail posted to the Subversion Dev mailing list.