7

In the TortoiseSVN documentation about merging, the instructions for "Merging Two Different Trees" state the following (emphasis mine):

In both the From Revision field and the To Revision field, enter the last revision number at which the two trees were synchronized.

Is this correct? This makes no sense to me. Take this illustrative example in which we wish to merge "branch" at revision 105 back into "trunk":

enter image description here

If nothing had been committed to trunk after branching (i.e. if revision 101 didn't exist), we would merge from trunk HEAD (which would be revision 100) to branch HEAD (revision 105). Makes sense.

But 101 does exist. The docs say we must merge from trunk at the last revision number at which the two trees were synchronized (i.e. revision 100, which makes total sense) to branch at... the last revision number at which the two trees were synchronized... which is what?

  • 102? (no, it's out of sync with trunk)
  • 100? (no, it's not even on branch)
  • Shouldn't it really be 105? This seems to be the only one that makes sense, but to me this contradicts the docs.

What am I missing here? Is the documentation right? Misleading? Wrong?

Jean-François Corbett
  • 37,420
  • 30
  • 139
  • 188
  • If the branch is not synchronized from trunk 'revision 101' may conflict or missing when merge entire branch to trunk – janith1024 Oct 31 '17 at 07:01
  • Could you present a single rational argument for deleting extended text on [tag:parallelism-Amdahl] which has excluded additional details on the original steps, based on which Gene M. AMDAHL has formulated observation on improved process-scheduling? >>> https://stackoverflow.com/posts/18374630/revisions **Has any deleting of facts ever improved a rigorous knowledge building?** – user3666197 Dec 05 '17 at 23:01
  • @user3666197 Um, I believe you are commenting on the wrong meta post... Your princess is in [another castle](https://meta.stackoverflow.com/questions/360170/odd-looking-recent-revision-of-tagparallelism-amdahl-tag-wiki). – Jean-François Corbett Dec 06 '17 at 07:57

2 Answers2

0

I don't understand why you want to merge different trees option. According to the picture, you should use the automatic reintegrate merge. See TortoiseSVN Manual | Merging a Range of Revisions.

Use a working copy of your trunk at HEAD and select the option Merge a range of revisions and click Next-Next-Merge. The merge from the branch to trunk should automatically complete.

bahrep
  • 29,961
  • 12
  • 103
  • 150
0

I wouldn't recommend using svn for git-style branching which seems to me you are trying to do, just use branches if you have good reasons for it (like having a production and development branches or some feature which will take long time to develop, and prevents others from doing their job).

Simply because svn copy-pastes whole folders, instead of just keeping changes like git does, for example.

I've burned 4 ssd drives merging stuff on daily basis on my projects...

You do not have to rely on Tortoise SVN and their documentation, Tortoise SVN is just a GUI for svn.

So basically in SVN, there is no difference between branch/tag or whatever, it always behaves the same way, so IMHO, Tortoise SVN documentation is misleading, there is no difference if you are merging branch into trunk, or vice-versa.

It also depends upon which underlying version of SVN do you have, it's best to have versions which rely on svn 1.7 or above.

So if you want to "reintegrate branch", simply from command line, navigate to your trunk, or whatever directory is called and type

 svn merge ^/branch/branch_name

And delete branch after that...

Tortoise SVN also let you have svn in console, just re-start it's installation, and enable svn command line feature.

Aleksandar Pavić
  • 3,143
  • 1
  • 34
  • 36