如何设置运行“xterm -e unison &”的提交后挂钩我提交后?
如何在 svn 中设置运行“xterm -e unison &”的提交后挂钩我提交后?
欢呼
丹尼尔
How to set up a post commit hook in svn that run "xterm -e unison &" after I commit?
cheers
daniel
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定您的经验水平,所以这里有一个 链接到 Subversion 书籍,了解如何在 Subversion 存储库上实现挂钩脚本。
基本上,您需要使用 post-commit.tmpl 挂钩文件,为其创建一个名为
post-commit
的副本,并修改它以满足您的需要。确保您已设置适当的权限和所有权,否则您对存储库(Apache HTTD、svnserver、文件)的访问方法可能会导致挂钩脚本无法调用。您应该能够将上面列出的命令添加到挂钩脚本中。如果挂钩脚本在执行该行时遇到问题,请尝试使用可执行文件的完全限定路径以及应包含该文件的任何参数。
作为附带问题,您希望通过 xterm -e unison & 实现什么目标?
Not sure about your experience level, so here's a link to the Subversion book on how to implement hook scripts on the Subversion repository.
Basically, your going to want to use the post-commit.tmpl hook file, make a copy of it named
post-commit
and modify it to fit your needs. Make sure you have the appropriate permissions and ownership set right or your access method to the repository (Apache HTTD, svnserver, file) may cause the hook script to not be invoked.You should be able to add the command you listed above to the hook script. If the hook script has problems executing that line, try using fully qualified paths to the executable and any arguments that should have it.
As side question, what are you hoping to accomplish with
xterm -e unison &
anyway?