subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bert Huijben" <b...@qqmail.nl>
Subject RE: svn status API and missing switched flag
Date Mon, 12 Oct 2015 10:31:01 GMT
> -----Original Message-----
> From: Marc Strapetz [mailto:marc.strapetz@syntevo.com]
> Sent: maandag 12 oktober 2015 10:56
> To: dev@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


Mime
View raw message