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

RE: svn status API and missing switched flag

From: Bert Huijben <bert_at_qqmail.nl>
Date: Mon, 12 Oct 2015 12:31:01 +0200

> -----Original Message-----
> From: Marc Strapetz [mailto:marc.strapetz_at_syntevo.com]
> Sent: maandag 12 oktober 2015 10:56
> To: dev_at_subversion.apache.org
> Subject: svn status API and missing switched flag
>
> 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

Which version of Subversion did you use for this?

Without checking any of the code I would have expected the behavior you describe for Subversion <= 1.6, while I would have guessed this behavior changed with Subversion 1.7 when we moved to the single database per working copy. (Pre 1.7 we simply couldn't open a directory about the current working copy in a portable way)

The old behavior makes sense if you think as the 'S' as switched against the ancestor... If you are not looking at an ancestor it can't be switched.

If you see the behavior in 1.7, 1.8 or 1.9 then I agree that the api should at least provide switched information.

        Bert
Received on 2015-10-12 12:31:13 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.