我需要在发生提交后编辑文件的svn属性。因此,我想使用提交后脚本。svn propedit在非交互式脚本中
例子:
我有一个名为export
设置为test
时,我犯了一个名为example.ex
我提交成功我有一个post-commit钩子,也做了一些聪明的事情(即没有按后文件中的值属性对我的问题无关紧要),并在完成后需要将export
的属性更改(或删除)为succeeded
等新值。
在命令行中我这样做:
svn propedit "export" file:///svn/repositoryName/path/to/file/in/repository/example.ex
这将打开我的系统编辑器vi
,我会看到价值test
。我可以将其更改为任何我想要保存并退出用vi命令的文件像:wq
颠覆还给这样
"svn-prop.tmp" 1L, 10C written
Set new value for property 'export' on file:///svn/repositoryName/path/to/file/in/repository/example.ex'
Committed revision 67.
消息正因如此精细。但正如我所说,我需要在一个后提交脚本中,我无法控制vi(或者我错了吗?)。
所以Subversion使我可以添加一个文件到命令propedit
。该文件仅包含新值succeeded
。
新的命令应该是这样的:
svn propedit "export" file:///svn/repositoryName/path/to/file/in/repository/example.ex --file /path/to/propertyValueFile/propValue.file
而这里的问题:最后一个命令不起作用。 再次打开,我需要手动更改我的值。为什么?我究竟做错了什么?
好吧,同时我已经意识到--file将使用此文件作为日志信息的内容。 不过,同样的问题:我需要一个脚本。 – derroman