【问题标题】:Changing subversion local repository path after migration from Windows to macOS从 Windows 迁移到 macOS 后更改 subversion 本地存储库路径
【发布时间】:2019-12-10 08:36:22
【问题描述】:

更新:

我对此感到困惑,因为我对术语以及它如何映射到实际文件夹感到困惑。我认为,由于我的存储库有一个“WorkingCopy”文件夹,我需要重新定位而不是签出新的工作副本。 我只是在我的 Windows 计算机上压缩了源代码库的顶层,因此文件夹结构如下所示:

Blah
-Repository
-WorkingCopy
 |
  -trunk

我将其提取到 macOS Finder 中,其中保留了目录结构。在终端中,我在 Blah\WorkingCopy 文件夹中输入SVN info | grep URL:,结果是:

URL: file:///C:/Users/Richard%20Drysdall/Documents/Visual%20Studio%202017/Projects/Blah/Repository
Relative URL: ^/

对于 svn relocate 的参数,我能做到的最好的方法是

svn relocate "file:///C:/Users/Richard Drysdall/Documents/Visual Studio 2017/Projects/Blah/WorkingCopy/trunk" file:///Users/richard/Documents/Blah/WorkingCopy/trunk

但这会导致以下错误:

svn: E155024: Invalid source URL prefix: 'file:///C:/Users/Richard%20Drysdall/Documents/Visual%20Studio%202017/Projects/Blah/WorkingCopy/trunk' (does not overlap target's URL 'file:///C:/Users/Richard%20Drysdall/Documents/Visual%20Studio%202017/Projects/Blah/Repository')

我根据上面发布的目录结构尝试了不同文件夹的组合,但没有成功。

原帖:

我在 Windows 计算机上有一个本地 subversion 存储库,我一直致力于使用 Visual Studio 和 Ankh/TortoiseSVN。我打算将此存储库永久迁移到 macOS 计算机(仍作为本地存储库)并使用 Visual Studio Code 进行进一步开发。我将整个存储库文件夹复制到 macOS,并为 Visual Studio Code 安装了 SVN 扩展。源代码控制侧边栏显示更改和未版本控制的文件,Subversion 侧边栏显示存储库,但将路径列为

file:///<path on original windows computer>

尝试提交更改会导致错误:

Commit failed (details follow): Unable to connect to a repository at URL 'file:///<original windows path to trunk folder>' Unable to open repository 'file:///<original windows path to trunk folder>'

如果我单击 Subversion 侧边栏顶部的 + 以“添加类似 repo 的路径”,系统会提示我“输入 SVN URL 或本地路径...”假设我想要后者,我不能找出作为本地路径输入的内容 - 最顶层的源文件夹是“~/Documents/Blah”,但尝试这个或一些子文件夹(“~/Documents/Blah/Repository”或“~/Documents/Blah/WorkingCopy ") 导致消息“添加仓库失败:”

我如何告诉 Visual Studio Code 和 SVN 扩展我的存储库在哪里,以便我可以提交?还是在此之前我做错了什么,还是我误解了问题?

我没有在 macOS 上使用 subversion 客户端。

感谢您的帮助。

【问题讨论】:

    标签: macos svn visual-studio-code


    【解决方案1】:

    您需要checkout a new working copy 使用新路径或relocate existing working copy 到新的本地路径。

    macOS 上的路径应该是这样的:

    file:///var/svn/repos/MyRepo/MyProject/trunk
    

    【讨论】:

    • 感谢您的回复@bahrep,并为我迟到的确认道歉 - 我一直在努力让它工作,但由于我对术语的无知以及它如何映射到文件夹而受到阻碍结构体。我在原始帖子的顶部进行了更新,更详细地解释了我现在遇到的问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-23
    • 2014-01-21
    相关资源
    最近更新 更多