开发者

Problem keeping branch in sync

I have created a branch like this

svn copy svn+ssh://foo.bar/svn/myproject/trunk svn+ssh://foo.bar/svn/myproject/branches/feature-x

I then proceeded to checkout a working copy of my branch in another directory.

Since this is a feature branch, I would like to keep it in sync with trunk. According to The SVN Book, this should be as simpl开发者_JAVA百科e as

svn merge svn+ssh://foo.bar/svn/trunk

from my working copy directory.

It does not work however. I don't know exactly what it tries to do, but it seems to try and merge every change that has ever been committed to trunk. Instead, I would have expected it to only try and merge the changes that have happened to trunk after I made the branch.

If I try

svn propget svn:mergeinfo .

from my working copy, I get nothing. If I understand correctly, I should see something about which revisions are available for merging.

I am using svn v1.6.5

As a work around, for now, I start by writing

svn info

to get the latest changed revision. And then

svn merge -r xxxx:HEAD svn+ssh://foo.bar/svn/trunk .

where xxxx is the latest changed revision.

Update

Turns out we're running an ancient version of svn server at the office, which doesn't support merge tracking.


According to The SVN Book, this should be as simple as svn merge svn+ssh://foo.bar/svn/trunk

This is correct. However, both the local svn client and the repository must be at least at version 1.5 to support merge tracking. See the section "Merge tracking and compatibility" in the release notes.

If I try svn propget svn:mergeinfo . from my working copy, I get nothing. If I understand correctly, I should see something about which revisions are available for merging.

Here your expectation is not correct. The svn:mergeinfo property records the revisions which have already been merged in. It does not list the revisions eligible for merging. To list the revisions eligible for merging, do this:

svn mergeinfo --show-revs eligible svn+ssh://foo.bar/svn/trunk
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜