如何在 Subversion 结帐期间翻译文件名?
Subversion 是否支持在签出/导出和提交期间翻译文件名路径组件? 例如,我可以设置 SVN(客户端或服务器端,无关紧要)自动替换路径名中的 和 ':' 字符,将它们替换为字符 '+' 吗?
基本上,Windows 不能容忍文件名中的某些字符(例如“:”),官方建议是当 Windows 客户端可能需要访问您的存储库时不要使用这些字符。 有时,这不是一个选项:我们将 Linux /etc/ 配置树保存在 SVN 中,并且具有接口别名的计算机在“sysconfig/network-scripts”下具有类似“ifcfg-eth0:0”的文件名。
有没有办法让 Subversion 客户端(或者我现在使用的 Eclipse 编辑器)在签出/导出时自动翻译任意路径组件,然后在提交期间重新翻译回来? 如果没有,SVN服务器端钩子脚本有什么办法来处理这个问题吗?
Can Subversion support translating filename path components during checkout/export and commit? For example, can I set up SVN (client side or server side, doesn't matter) to automatically substitute and ':' characters in path names, replacing them with the character '+', instead?
Basically, Windows can't tolerate certain characters in filenames (like ':', for instance), and the official suggestion is to not use those characters when Windows clients may need to access your repo. Sometimes, this isn't an option: We keep Linux /etc/ config trees in SVN, and machines with interface aliases have filenames like 'ifcfg-eth0:0' under 'sysconfig/network-scripts'.
Is there any way for either the Subversion client (or the Eclipse editor, which I'm using, now) to automatically translate arbitrary path components on checkout/export, and then re-translate back during a commit? If not, is there any way for SVN server-side hook scripts to handle this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在寻找 SVN 支持的钩子,但没有用于结账的钩子。 然而 TortoiseSVN 客户端却可以。 这可能就是您正在寻找的内容,http://tortoisesvn。 tigris.org/tsvn_1.5_releasenotes.html#client-side-hooks。
You're looking for hooks, which SVN supports, but there isn't one for checkout. TortoiseSVN Client does however. This may be what you're looking for, http://tortoisesvn.tigris.org/tsvn_1.5_releasenotes.html#client-side-hooks.