Proper way to add svn:executable

后端 未结 2 539
遇见更好的自我
遇见更好的自我 2020-12-22 20:41

I have a few files that have been executable before svn adding them. They have the svn:executable property set. Now, a few other files were checked in without the executable

相关标签:
2条回答
  • 2020-12-22 21:31

    Here is how I set the executable property on all the *.py files in my project that have execute bit set on them. I execute 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;
    
    0 讨论(0)
  • 2020-12-22 21:32

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

    To add the "executable bit" in svn

    svn propset svn:executable on <list of files>
    

    To remove the "executable bit" in svn

    svn propdel svn:executable <list of files>
    

    The SVN documentation for this is located here.

    As far as not modifying the executables, you are not modifying the executable (a checksum will verify that), but you are modifying the SVN repository. Remember that SVN revisions file systems, not just files; so, a modification of the permission bits will increase the SVN revision number, even if it's just a modification of a file's properties (and not a modification of the file itself).

    0 讨论(0)
提交回复
热议问题