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

RE: Confused about how to merge changes from branch to trunk

From: Bob Archer <Bob.Archer_at_amsi.com>
Date: Thu, 26 Sep 2013 14:42:23 +0000

> On 9/26/2013 10:13 AM, Quoth Ian L:
> > So I merged all the changes from trunk into my branch working copy. I
> > think committed all of that to the branch.
>
> When you did this merge, it should have shown a property change for
> svn:mergeinfo on the folder where you did the merge (which should have been
> the root of your working copy -- while it's possible to merge elsewhere, it gets
> messy, so it's best to always do merges at the root).
>
> You need to make sure that you commit this along with the actual changes.
>
> You also need to make sure that your server is running SVN 1.5 or later.
>
> > I then checked out a copy of trunk and went to do a merge a range of
> > revisions. I select revisions 154, 159 and 160 (160 is the commit to
> > the branch of all the code i got from trunk)
>
> While TSVN would normally say that it's merging revision 160, it should not
> actually change any files when doing so -- this is because the mergeinfo
> property tells it that this revision came from the trunk and does not need to be
> merged.
>
> (It doesn't quite actually work that way but that's the easiest way to think of it.)
>
> The problems you're having sounds like the mergeinfo property may not have
> been committed when you did the original merge.
>
> Also, when merging from a branch back to trunk typically you would just leave
> the box blank to merge all revisions. The only reason to cherry-pick is when
> merging individual bugfixes to a release branch or if you want to pull a bugfix
> from a branch before the complete feature has been finished.

I agree with Gavin here. Make sure you always merge from the root of your project. Make sure you commit ALL the changes, including the merge info properties.

As far as needing to check out the trunk... yes, that is the way svn works. When you merge it's just a fancy diff, the diff needs to be applied somewhere. This also gives you the opportunity to verify the merge, compile, run your tests, etc before it gets commited to the repository.

I would suggest at this point since you say it is trying to merge stuff it shouldn't that you merge your trunk into your branch, ALL REVISIONS, in the merge options page select "Only record the merge". This will update the merge info on your project root folder. Commit that. Then do the same thing into trunk from branch. Once you do this, future merges should automatically only select revisions that weren't previously merged.

BOb

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3065306

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2013-09-26 16:42:34 CEST

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

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