You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@subversion.apache.org by "Bert Huijben (JIRA)" <ji...@apache.org> on 2016/06/27 12:09:52 UTC

[jira] [Commented] (SVN-4637) Revert affects unchanged files with changed permissions

    [ https://issues.apache.org/jira/browse/SVN-4637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15350894#comment-15350894 ] 

Bert Huijben commented on SVN-4637:
-----------------------------------

The change on the read-only attribute is specifically to handle cases around svn:needs-lock, and cases where this property was removed/added in updates. Revert explicitly makes the attribute match the current setting, so you can be sure that the working copy is in the expected (same as checkout) state after revert.

Before 1.7 (or 1.8?) some code paths properly handled the attribute, while others didn't, resulting in a state where you couldn't really trust the attribute to have the right value and no way to fix it except a new checkout.

Now we may be overly agressive in resetting the attribute to the expected value, but I don't see a real way to fix both issues.

> Revert affects unchanged files with changed permissions
> -------------------------------------------------------
>
>                 Key: SVN-4637
>                 URL: https://issues.apache.org/jira/browse/SVN-4637
>             Project: Subversion
>          Issue Type: Bug
>    Affects Versions: 1.9.3
>            Reporter: Johan Corveleyn
>
> If you make a file read-only, and run a recursive revert, the file is made writable again, and revert notifies:
> {noformat}
> C:\Temp\svntest>svnadmin create repos
> C:\Temp\svntest>svn co file:///c:/Temp/svntest/repos wc
> Checked out revision 0.
> C:\Temp\svntest>cd wc
> C:\Temp\svntest\wc>echo This is file 1 > file1.txt
> C:\Temp\svntest\wc>svn add *.txt
> A file1.txt
> C:\Temp\svntest\wc>svn ci -mm
> Adding file1.txt
> Transmitting file data ..done
> Committing transaction...
> Committed revision 1.
> C:\Temp\svntest\wc>attrib +R file1.txt ### (making read-only)
> C:\Temp\svntest\wc>svn st
> C:\Temp\svntest\wc>svn revert -R .
> Reverted 'file1.txt'
> {noformat}
> After this, the file is writable again.
> I think 'revert' should not affect files that have only metadata (like permissions) changed. I'm actually wondering how revert decided to do this, because I thought it acted on the result of a 'status walk', and 'svn status' does not show such a file.
> I'm not sure what revert should do with the modified permissions if it's already reverting the content.
> See also this post on users@:
> http://svn.haxx.se/users/archive-2016-03/0035.shtml
> The original post that started the thread:
> http://svn.haxx.se/users/archive-2016-03/0004.shtml
> OP reported this for Centos 6.5 Linux, so I suppose the issue is not limited to Windows.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)