svn 改变目录
Svn change directory
我想更改使用 svn 添加文件的目录。我试过了
svn switch --relocate https://old_directory https://new_directory
它运行没有错误,但是当我执行 svn info
时,URL 仍然是旧的(实际上它看起来像 svn+ssh://old_directory 而不是 https://old_directory)。
我也试过了
svn switch --relocate `svn+ssh://old_directory svn+ssh://new_directory`
但我收到了这条消息 svn: Relocate can only change the repository part of an URL
,但仍然没有任何变化。
有人能告诉我怎么做吗?
您不需要 --relocate 开关,如果您使用的是更新版本的 svn,该开关实际上已被弃用。
只需在命令行中导航到您签出的目录并调用 svn switch https://new_directory
即可解决问题。
现在,如果是同一目录但 URL 发生了变化,那就完全不同了。那么你会想要使用 svn relocate
。同样,您必须通过命令行和 运行:
导航到目录 (cd)
svn relocate https://new_directory
Here is a quote from redbean 这有助于我理解差异。从你在第一句话中的措辞来看,听起来你只是想更改目录,但可能我没有正确解释它,这里是 svn 的解释:
Users often get confused about the difference between svn switch and svn relocate. Here's the rule of thumb:
If the working copy needs to reflect a new directory within the repository, use svn switch.
If the working copy still reflects the same repository directory, but the location of the repository itself has changed, use svn relocate.
我想更改使用 svn 添加文件的目录。我试过了
svn switch --relocate https://old_directory https://new_directory
它运行没有错误,但是当我执行 svn info
时,URL 仍然是旧的(实际上它看起来像 svn+ssh://old_directory 而不是 https://old_directory)。
我也试过了
svn switch --relocate `svn+ssh://old_directory svn+ssh://new_directory`
但我收到了这条消息 svn: Relocate can only change the repository part of an URL
,但仍然没有任何变化。
有人能告诉我怎么做吗?
您不需要 --relocate 开关,如果您使用的是更新版本的 svn,该开关实际上已被弃用。
只需在命令行中导航到您签出的目录并调用 svn switch https://new_directory
即可解决问题。
现在,如果是同一目录但 URL 发生了变化,那就完全不同了。那么你会想要使用 svn relocate
。同样,您必须通过命令行和 运行:
svn relocate https://new_directory
Here is a quote from redbean 这有助于我理解差异。从你在第一句话中的措辞来看,听起来你只是想更改目录,但可能我没有正确解释它,这里是 svn 的解释:
Users often get confused about the difference between svn switch and svn relocate. Here's the rule of thumb:
If the working copy needs to reflect a new directory within the repository, use svn switch.
If the working copy still reflects the same repository directory, but the location of the repository itself has changed, use svn relocate.