The correct way to add svn: executable

I have several files that were executed before they added them. They have a set of svn: executable properties. Now several other files have been marked without an executable bit, and I do not want to set the svn: executable property:

$ svn propset svn:executable on *.cgi 

Then I check the status and even the files with svn: the executable has been changed:

 $ svn diff Property changes on: a.cgi ___________________________________________________________________ Modified: svn:executable - + * Property changes on: b.cgi ___________________________________________________________________ Added: svn:executable + * 

a.cgi should not be changed. I want to add the svn: executable bit, which will be set in the same way as in other files, but cannot determine the command to execute it.

+83
properties svn executable
Apr 22 '11 at 15:59
source share
2 answers

You have the right to use the svn property editing commands. The svn: executable property.

To add an "executable bit" to svn

 svn propset svn:executable on <list of files> 

To remove the "executable bit" in svn

 svn propdel svn:executable <list of files> 

Here is the SVN documentation.

If you do not modify the executable files, you do not modify the executable file (checksum checks this), but you modify the SVN repository. Remember that SVN versions of file systems, not just files; therefore, changing the permission bits will increase the SVN version number, even if it is just a modification of the properties of the file (and not a modification of the file itself).

+126
Apr 22 2018-11-11T00:
source share

This is how I set the executable property for all * .py files in my project that have a run bit set on them. I am doing this from the top level directory

 for f in `find ./ -name '*.py'`; do echo $f; if [ -x $f ]; then echo $f 'is executable setting svn:executable'; svn propset svn:executable on $f; else echo $f 'is not executable'; fi; done; 
-2
Nov 13 '15 at 16:56
source share



All Articles