使用 SharpSvn 编写预提交挂钩。 是否缺少 svnlook propget?
我正在重写一个旧的颠覆预提交挂钩。 在我们公司,我们需要确保只有在提交之前设置了 svn:needs-lock 属性的二进制文件才允许提交。
我开始编写钩子,看起来钩子的每个部分都可以工作,但是如果设置了属性,我找不到如何读取。
我假设 SvnLookClient 将具有 SvnLookClient.GetProperty 方法,但我看到的唯一方法是 SvnLookClient.GetRevisionProperty。 不幸的是 GetRevisionProperty 不允许传递有问题的文件。 我在这里缺少什么?
毕竟, svnlook propget 确实允许传递存储库、事务、属性名称和存储库中的路径。
I am rewriting an older subversion precommit hook. In our company, we need to make sure that binary files are allowed on commit only if they have the property svn:needs-lock set before commit.
I started writing the hook and it looks like every part of the hook works, but I cannot find how to read, if the property is set.
I would assume, that SvnLookClient would have the SvnLookClient.GetProperty method, but the only one, that I see is SvnLookClient.GetRevisionProperty. Unfortunately GetRevisionProperty doesn't allow to pass the file in question. What am I missing here?
After all, svnlook propget does allow to pass a repository, a transaction, a propertyname AND the path in the repository.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅此SharpSvn 用户邮件列表主题。
该功能于周二添加到 Subversion 主干,并于昨天向后移植到 1.500x。
See this SharpSvn users mailinglist thread.
The function was added to Subversion trunk tuesday and backported to 1.500x yesterday.