Reputation: 38530
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":
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?
What am I missing here? Is the documentation right? Misleading? Wrong?
Upvotes: 7
Views: 137
Reputation: 3430
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.
Upvotes: 0
Reputation: 30662
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.
Upvotes: 0