添加 svn:executable 的正确方法
我有一些文件在 svn 添加之前已经可执行。他们设置了 svn:executable 属性。现在,其他一些文件在没有可执行位的情况下签入了,我想设置 svn:executable 属性:
$ svn propset svn:executable on *.cgi
然后我检查状态,甚至带有 svn:executable 的文件也被修改了:
$ svn diff
Property changes on: a.cgi
___________________________________________________________________
Modified: svn:executable
-
+ *
Property changes on: b.cgi
___________________________________________________________________
Added: svn:executable
+ *
a.cgi不应修改。我想添加 svn:executable 位,其设置方式与其他文件相同,但无法找出执行此操作的命令。
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 bit do not have it, and I want to set the svn:executable property:
$ svn propset svn:executable on *.cgi
Then I check the status and even the files with the svn:executable have been modified:
$ svn diff
Property changes on: a.cgi
___________________________________________________________________
Modified: svn:executable
-
+ *
Property changes on: b.cgi
___________________________________________________________________
Added: svn:executable
+ *
a.cgi should not be modified. I want to add the svn:executable bit to be set in the same way as it is on the other files, but can't figure out the command to do it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您使用 svn 属性编辑命令是正确的。该属性是 svn:executable。
在 svn 中添加“可执行位”
删除 svn 中的“可执行位”
有关此内容的 SVN 文档位于此处。
只要不修改可执行文件,您就不会修改可执行文件(校验和将验证这一点),但您正在修改 SVN存储库。请记住,SVN 修改的是文件系统,而不仅仅是文件;因此,权限位的修改将增加 SVN 修订号,即使它只是文件属性的修改(而不是文件本身的修改)。
You are right to use the svn property editing commands. The property is svn:executable.
To add the "executable bit" in svn
To remove the "executable bit" in svn
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).
以下是我如何在项目中设置了执行位的所有 *.py 文件上设置可执行属性。
我从顶级目录执行此操作
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