如何在 Subversion 结帐期间翻译文件名?

发布于 2024-07-18 13:19:33 字数 416 浏览 2 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小红帽 2024-07-25 13:19:33

您正在寻找 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文