如何使用 AnkhSVN 在 Visual Studio 中切换 Subversion 存储库?
我一直在本地开发一个项目,并使用本地 svn 服务器在 Visual Studio 中进行版本控制。我现在想切换到 xp-dev 托管版本控制,但似乎无法摆脱我的解决方案上的 svn 绑定?有没有一种简单的方法可以在没有版本控制设置的情况下复制解决方案或简单地切换到另一个 svn (完全是空的)?
I've been developing a project locally and using a local svn server for versioning in visual studio. I now want to switch to xp-dev hosted versioning but cannot seem to get rid of the svn bindings on my solution? Is there an easy way to duplicate a solution without its versioning settings or to simply switch to the other svn (which is completely empty)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
有一个内置的切换/重新定位:
There's a switch/relocate built-in:
据我所知没有。我可能会这样做,
Not that I know of. I'd probably do this,
您还可以右键单击解决方案或项目,然后在 Subversion 菜单上提供“切换项目”选项
使用 ankhsvn 更改 subversion 服务器名称
Also you can right click on solution or project and on the Subversion menu the option "switch project" is available
subversion server name change with ankhsvn
尝试转到“文件”>“颠覆>更改源代码管理...并更改 SCC 绑定 URL。
编辑:
我发现这是不可编辑的。为此,您可能需要进入命令行。
在您的基本目录中,发出此 svn 命令:
当然,使用您的特定 URL。我建议您阅读
switch
命令,以便您确定自己在做什么。当您重新打开 VS 时,AnkhSVN 应该会获取新的绑定。如果您通过“文件”> 添加了解决方案Subversion 菜单中,您可能需要编辑 .sln 文件。只需在文本编辑器中打开它,然后将所有旧存储库 URL 更改为新 URL。您还可以安装 TortoiseSVN 并使用上下文菜单发出“重新定位”命令。
这将是最简单的。
当然,在进行任何这些更改之前备份您的目录。
Try going to File > Subversion > Change Source Control... and changing the SCC Binding URL.
EDIT:
I see that's not editable. You may need to drop to the command line for this.
In your base directory, issue this svn command:
with your speific URLs, of course. I'd recommend reading up on the
switch
command so you're sure of what you're doing. When you reopen VS, AnkhSVN should pick up the new bindings. If you've added the solution through the File > Subversion menu, you may need to edit the .sln file. Just open it in a text editor and change all of your old repository URLs to the new URL.You could also install TortoiseSVN and use the context menu to issue the Relocate command.
This will be the easiest.
Back up your directory before any of these changes, of course.
另一种方法是编辑“.svn”文件夹中的 wc.db(SQLite 文件),其中包含存储库 URL。
我使用了 Firefox 插件 SQLITE 编辑器,然后在表 REPOSITORY 中只有 1 行表示您的存储库 URL,将其更改为新主机即可。
我的情况是,我有新计算机和新主机,因此添加到 SVN 存储库的所有项目都有旧 URL(旧主机名)。
Other way is to edit wc.db (SQLite file) in your ".svn" folder, which contains repository URL.
I used Firefox addon SQLITE editor, then in table REPOSITORY is only 1 row saying your repository URL, change it to new host and there you go.
My case was that I have new computer with new HOST, so all my projects added to SVN repository had and old URL (old hostname).
我从 SVN“导出”,然后对 SVN 存储库浏览器中的新存储库执行“添加文件夹”操作,然后在 Visual Studio 中打开 .sln。
I "exported" from SVN, then did an "Add Folder" to the new repo in the SVN Repo Browser, then opened the .sln in Visual Studio.
就我而言,我必须更改 SVN 的 URL,因为 DNS 不知道主机名,所以我必须使用 IP 地址。
您可以编辑位于以下位置的 hosts 文件:
C:\Windows\System32\drivers\etc
只需输入一行
In my case I had to change the URL of the SVN because the DNS didn't know about the hostname so I had to use the IP address.
You can edit your hosts file located under:
C:\Windows\System32\drivers\etc
And simply enter a line like