[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Difference between svn merge with and without --reintegrate

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Fri, 15 Dec 2017 12:46:46 +0100

On Fri, Dec 15, 2017 at 2:15 AM, wuzhouhui <1530108435_at_qq.com> wrote:
> Hi, what is difference between
> svn merge
> and
> svn merge --reintegrate
> when merging branch into trunk for svn-1.6? Any examples?

First of all, SVN 1.6 is no longer supported, and as of 1.8 the
'--reintegrate' option is deprecated (SVN now automatically determines
whether your merge is a reintegrate-type merge). So I suggest you
upgrade to the latest release on your svn client (which is currently
1.9.7), or at least to 1.8+.

The reintegrate option was needed in older versions of SVN, because
the underlying algorithm is slightly different for a reintegration
merge. This is perhaps best explained in the 1.7 version of the svn
book:

    http://svnbook.red-bean.com/en/1.7/svn.branchmerge.basicmerging.html#svn.branchemerge.basicmerging.reintegrate

I don't know the specifics myself, but one of the paragraphs in this
section gives a bit of a hint:

[[[
When merging your branch back to the trunk, however, the underlying
mathematics are quite different. Your feature branch is now a mishmash
of both duplicated trunk changes and private branch changes, so
there's no simple contiguous range of revisions to copy over. By
specifying the --reintegrate option, you're asking Subversion to
carefully replicate only those changes unique to your branch. (And in
fact, it does this by comparing the latest trunk tree with the latest
branch tree: the resulting difference is exactly your branch changes!)
]]]

Anyway, as I said: please upgrade to a more recent version of SVN,
which automatically determines the algorithm to use, and you don't
have to worry about it :-).

-- 
Johan
Received on 2017-12-15 12:50:14 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.