开发者

remote SVN merge

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?


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."


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜