![](/img/trans.png)
[英]Building a python wheel that includes svn:externals files on Jenkins
[英]Run replace command on svn:externals (python)
我目前正在编写一个python脚本,该脚本需要运行sed命令来替换svn:externals数据中的内容。 我试图在“ svn propedit svn:externals”上运行sed。 但是结果却不是预期的。
有谁知道如何做到这一点 ?
首先,不要使用sed
。 使用Python的字符串方法或re
模块。
其次,我建议先运行svn propget ...
以获取旧值。 然后,您对其进行操作(在Python中,无需运行sed
)。 最后,运行svn propset
。
另外,您可以运行第二个Python脚本作为svn propedit
编辑器。 在这里,如果您已经拥有Python,也不需要sed。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.