如何更改 Subversion 中的存储库 URL?
我知道我的场景有点扭曲。我遇到过一位存储库所有者要求更改存储库 URL 的名称。 基本上他们想将其从 h..p://svn/ABC/Repo_XYZ 更改为 h..p://svn/ABC/XYZ/。
首先我很想知道这是否真的可能。我拥有服务器的管理员权限,但从用户的角度我无能为力。 我在 Google 上四处寻找,但到处都遇到了最终用户如何修复它,而不是从 SVN 服务器管理员的角度来看。 我也有兴趣知道 URL 中如何发生这种更改。除了 URL 更改之外,我们还需要进行其他更改。 我可能没有解释得很好。我将不胜感激有人可以做的任何编辑。 谢谢
I know that my scenario is a little bit twisted. I have come across a repo owner asking to change the name of the repo URL.
Basically they want to change it from h..p://svn/ABC/Repo_XYZ to h..p://svn/ABC/XYZ/.
First of all I am interested to know if this is really possible. I have admin rights on the server but I can't do anything from the user perspective.
I was looking around on Google but everywhere I was encountering how the end user can fix it, not from the view of SVN server admin perspective.
I'm also interested to know how this change can happen in URL. Along with URL change is there any other change that we need to make.
I may not explained it very well. I would appreciate any edit that someone can do.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这应该可以通过在服务器上设置软链接(如果您使用的是 Windows 服务器则为联结点)来实现。实际上,您在 Repo_XYZ 子目录中有一个存储库,因此您应该能够软链接到 XYZ。这个方法绝对可以用来改变URL的路径部分(我用过它,这样我们就可以有 http:// server/svn/Source 而不是 http://server/path/to/repo/目录/来源)。虽然一个潜在的问题可能是您正在更改存储库的名称以及路径,但我认为这不应该是一个问题。
This should be possible by setting up softlinks on the server (or junction points if you're using a Windows server). In effect you have a repository in the Repo_XYZ subdirectory, so you should be able to softlink to XYZ. This method can definitely be used to change the path part of the URL (I've used it so that we can have http://server/svn/Source rather than http://server/path/to/repo/dirs/Source). One potential problem though could be that you are changing the name of the repository as well as the path, but I don't think that should be an issue.
这取决于 SVN 客户端。如果您使用 SmartSVN,只需单击菜单“修改”->“重新定位”并输入新网址
It depends on SVN client. If you're using SmartSVN just click menu Modify->Relocate and enter new url
好的。如果我们谈论 Apache 提供的存储库,让我们以 我的集合 为例,
我有“Hello”存储库使用路径 /svn/Hello/,因为:
SVNParentPath "D:/Repositories/"
并且
如果我重命名 SVNParentPath 内的目录,我会有效地重命名存储库并更改 URL其中
OK. If we say about Apache-served repos, let's see at my collection as example
I have "Hello" repo with path /svn/Hello/, because:
SVNParentPath "D:/Repositories/"
and
If I rename directory inside SVNParentPath, I effectively rename repo and change URL of it