On 2024-01-05 11:29:16 +0100, Daniel Sahlberg wrote: > Den fre 5 jan. 2024 kl 10:51 skrev Johan Corveleyn <jcor...@gmail.com>: > > > On Fri, Jan 5, 2024 at 8:46 AM Daniel Sahlberg > > <daniel.l.sahlb...@gmail.com> wrote: > > ... > > > Since the file doesn't have svn:needs-lock it should be RW [and the > > Reverted message comes from Subversion trying to restore the W flag ...] > > > > Should it? Intuitively I'd say: since the file doesn't have > > svn:needs-lock Subversion shouldn't be looking at R or RW. Why should > > we make a file RW? Can't the user make a file readonly just locally, > > and expect Subversion not to care? > > > > Or is "making a file readonly" a committable local change? Will it > > show up on 'svn st' and can it be committed as some change that can be > > transferred to another working copy? > > > > I understand that svn:needs-lock adds extra handling of the readonly > > status of files, but without that property? > > All good questions, and I probably agree with you: if svn:needs-lock isn't > set then Subversion could just ignore the R/RW status.
I also agree. I never use svn:needs-lock, and I want to be able to set some files in my working copy to read-only, in order to make sure that I won't modify them by mistake. > But any change here would change previous behaviour so it would need > a solid consensus. In any case, the current behavior of Subversion is inconsistent. "svn revert" is not documented as the command to "fix" the permissions. > If the check is removed for files that doesn't svn:needs-lock, then we > might have to add code to restore RW status if svn:needs-lock is removed. > > Making a file readonly is currently not a committable change, didn't check > 'svn st' but it will be reverted by 'svn revert' and it will not be > transferred to another WC. It can only be committed indirectly via > svn:needs-lock. > > Any discussion regarding svn:needs-lock probably also have to consider > svn:executable, since it is handled similarly (except on WIN32 and OS2, > where the concept of executable doesn't exists). > > I havn't completely made up my mind, but I think I favour keeping the > current behaviour: R/RW status in indicated by the svn:needs-lock property > and you shouldn't change R/RW manually within a WC. Then this should be documented. But "svn st" should detect and report incorrect permissions, and "svn up" should fix them, just like what happens when a file has been removed with just "rm" instead of "svn delete". -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)