远程SVN合并

发布于 2024-11-17 17:28:02 字数 200 浏览 1 评论 0原文

当尝试将分支合并到主干时,

svn merge "$SVN_ROOT/trunk@HEAD" "$SVN_ROOT/branches/foo@HEAD"

出现以下错误:

svn: '/' is not a working copy

我需要工作副本吗?

When trying to merge a branch into trunk with

svn merge "$SVN_ROOT/trunk@HEAD" "$SVN_ROOT/branches/foo@HEAD"

I get the following error:

svn: '/' is not a working copy

Do I need a working copy?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

客…行舟 2024-11-24 17:28:02

是的,您需要在当地结帐。
我建议执行以下步骤:

svn co https://foo.bar.com/subversion/project/trunk project
cd project
svn merge https://foo.com/subversion/project/trunk https://foo.com/subversion/project/branches/DEV
svn st

如果存在任何冲突,您可以通过以下方式解决:

svn resolve

提交更改:

svn commit -m "Merged DEV to trunk."

Yes, you need a local checkout.
I recommend the following steps:

svn co https://foo.bar.com/subversion/project/trunk project
cd project
svn merge https://foo.com/subversion/project/trunk https://foo.com/subversion/project/branches/DEV
svn st

If there are any conflicts, you can resolve them with:

svn resolve

Commit the changes:

svn commit -m "Merged DEV to trunk."
倾城花音 2024-11-24 17:28:02

请注意 svn merge 命令的作用:

svn merge — 将两个源之间的差异应用到工作副本路径。

您使用的形式是

svn merge sourceURL1[@N] sourceURL2[@M] [WCPATH]

[WCPATH] 是可选的,省略时假定为 . (当前目录)。这就是你的情况所发生的情况。

http://svnbook.red-bean.com /en/1.5/svn.ref.svn.c.merge.html

Note what svn merge command does:

svn merge — Apply the differences between two sources to a working copy path.

The form you are using is

svn merge sourceURL1[@N] sourceURL2[@M] [WCPATH]

[WCPATH] is optional and when omitted it is assumed to be . ( current directory). That is what's happening in your case.

http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.merge.html

離殇 2024-11-24 17:28:02

是的,你知道 - 抱歉。合并可能会引发冲突,您需要手动编辑和解决(另外我感觉差异/合并代码仅在 svn 客户端而不是服务器中 - 但对此不能 100% 确定) 。因此,您需要在本地签出并进行合并:

svn co "$SVN_ROOT/trunk"
cd trunk
svn merge "$SVN_ROOT/branches/foo"
svn commit

等等。

Yes, you do - sorry. It's possible that the merge will throw up conflicts that you'll need to manually edit and resolve (plus I've a feeling the diff / merge code is only in the svn client not the server - not 100% sure about that, though). So you'll need to check-out and make the merge locally:

svn co "$SVN_ROOT/trunk"
cd trunk
svn merge "$SVN_ROOT/branches/foo"
svn commit

etc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文