重新定位工作副本

图 5.48. 重定位对话框

重定位对话框


If your repository has for some reason changed it's location (IP/URL). Maybe you're even stuck and can't commit and you don't want to checkout your working copy again from the new location and to move all your changed data back into the new working copy, TortoiseSVNRelocate is the command you are looking for. It basically does very little: it scans all entries files in the .svn folder and changes the URL of the entries to the new value.

警告

这是一个极少使用的操作.重定位只能 在版本库路径更改时使用。可能的原因是:

  • 服务器的IP地址已更改。

  • 协议已更改(比如从http://改为 https://)。

  • 版本库在服务器的路径已更改。

换种说法,如果你要重定位,只有当你的工作副本仍然还在同一个版本库中定位,但版本库本身已经没有了。

以下情况不支持:

  • 你要移到一个完全不同的版本库。这种情况下,你必须从新的版本库里执行一次干净的检出。

  • 你要在同一个版本库中切换一个分支或目录。这么做你可以用TortoiseSVN切换....

如果你使用以上任意一种重定位方式,它将破坏你的工作副本,在你更新、提交等操作时会提示一些令人费解的错误信息。一旦发生这种情况,唯一的办法就是检出最新版本。