简体   繁体   English

SVN:为什么命令“svnadmin load”在没有 pre-revprop-change 挂钩的情况下工作,但“svnrdump load”需要它?

[英]SVN: Why does command 'svnadmin load' work without pre-revprop-change hook but 'svnrdump load' requires it?

When loading SVN dump files using svnadmin load and svnrdump load , only svnrdump load requires using the pre-revprop-change hook even though both of these methods are changing the revision properties.使用svnadmin loadsvnrdump load加载 SVN 转储文件时,只有svnrdump load需要使用pre-revprop-change挂钩,即使这两种方法都在更改修订属性。

Why is it that svnrdump load requires this commit hook while svnadmin load does not?为什么svnrdump load需要这个提交钩子,而svnadmin load不需要?

For the following examples, this is the dump command used:对于以下示例,这是使用的转储命令:

svnadmin dump /path/to/source/repo > dumpfile.svn_dump

This will work without pre-commit hook:这将在没有预提交钩子的情况下工作:

svnadmin load /path/to/dest/repo < dumpfile.svn_dump

This will not work unless there is a pre-commit hook:除非有预提交钩子,否则这将不起作用

svnrdump load file://path/to/dest/repo < dumpfile.svn_dump

I'm not sure if it matters, but these tests were all done on Windows 10 using SVN 1.8.10我不确定这是否重要,但这些测试都是使用 SVN 1.8.10 在 Windows 10 上完成的

svnrdump is a command that runs on the URL and may or may not have direct access to the repository. svnrdump是在 URL 上运行的命令,可能直接访问存储库,也可能不直接访问。

To operate properly svnrdump load requires that the target repository have revision property modification enabled via the pre-revprop-change hook为了正确运行svnrdump load需要目标存储库通过pre-revprop-change钩子启用修订属性修改

Whereas svnadmin is an administrative tool that never runs on the URL and always needs direct repository access.svnadmin是一种管理工具,它永远不会在 URL 上运行,并且始终需要直接访问存储库。

svnadmin is the administrative tool for monitoring and repairing your Subversion repository. svnadmin 是用于监视和修复 Subversion 存储库的管理工具。 svnadmin works via direct repository access (and thus can only be used on the machine that holds the repository), it refers to the repository with a path, not a URL svnadmin 通过直接存储库访问工作(因此只能在拥有存储库的机器上使用),它指的是带有路径的存储库,而不是 URL

So all command from svnadmin will never executes hooks as it operates directly on the repository.因此,来自svnadmin的所有命令将永远不会执行挂钩,因为它直接在存储库上运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM