You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jacob Weber <ja...@jacobweber.com> on 2010/02/18 15:17:47 UTC

Partially reintegrate changes

Let's say I have a branch where I develop two features, X and Y. I then want to merge only X back into the trunk. I want to do some further development on Y, and merge it into trunk later.

Is this possible with Subversion?

If I do a reintegrate into trunk, I could revert all the changes for Y, keeping only X. But then, since you have to revert your branch after a reintegrate, I would lose Y.

Is there another way?

Thanks,
Jacob

Re: Partially reintegrate changes

Posted by Tyler Roscoe <ty...@cryptio.net>.
On Thu, Feb 18, 2010 at 08:20:10AM -0800, Jacob Weber wrote:
> > On Thu, Feb 18, 2010 at 7:17 AM, Jacob Weber <ja...@jacobweber.com> wrote:
> >> Let's say I have a branch where I develop two features, X and Y. I then want to merge only X back
> >> into the trunk. I want to do some further development on Y, and merge it into trunk later.
> >> 
> >> Is this possible with Subversion?
> > 
> > Yes.  When merging from branch to trunk, you would need to specify the
> > specific revisions to merge.  You could not use reintegrate.  Let's
> > assume when you commit this merge to trunk that revision 200 is
> > created.
> > 
> > Back on the branch you should run:
> > 
> > svn merge --record-only -c200 ^/trunk
> > 
> > To record the merge.  Now you can just do normal synch merges with
> > trunk and reintegrate the branch when you are done.
> 
> 
> Thanks! I'll give that a try.
> 
> But I was under the impression that if I did a non-reintegrate merge
> back into the trunk, it would cause self-referential mergeinfo to be
> written there. That is, the trunk would have mergeinfo for the trunk.
> And then that ends up screwing up things later on.

The --record-only merge is what keeps you away from this problem.

tyler

Re: Partially reintegrate changes

Posted by Stein Somers <ss...@opnet.com>.
> Maybe the self-referential mergeinfo I saw was being introduced some other way.

I see some self-refenertial mergeinfo in our /trunk, after lots of 
merges to and from. Maybe I explicitly added it with a record-only in 
some state of confusion. But it doesn't scare me at all. It would only 
matter if you explicitly merged /trunk to /trunk. And then, as far as I 
can tell, it would only cause svn merge to do less than it does without 
the self-refenertial mergeinfo, and as far as I can tell a 
self-referential foward merge doesn't do anything anyway.

-- 
Stein

Re: Partially reintegrate changes

Posted by Jacob Weber <ja...@jacobweber.com>.
On Feb 18, 2010, at 7:37 AM, Mark Phippard wrote:

> On Thu, Feb 18, 2010 at 7:17 AM, Jacob Weber <ja...@jacobweber.com> wrote:
>> Let's say I have a branch where I develop two features, X and Y. I then want to merge only X back
>> into the trunk. I want to do some further development on Y, and merge it into trunk later.
>> 
>> Is this possible with Subversion?
> 
> Yes.  When merging from branch to trunk, you would need to specify the
> specific revisions to merge.  You could not use reintegrate.  Let's
> assume when you commit this merge to trunk that revision 200 is
> created.
> 
> Back on the branch you should run:
> 
> svn merge --record-only -c200 ^/trunk
> 
> To record the merge.  Now you can just do normal synch merges with
> trunk and reintegrate the branch when you are done.


Thanks! I'll give that a try.

But I was under the impression that if I did a non-reintegrate merge back into the trunk, it would cause self-referential mergeinfo to be written there. That is, the trunk would have mergeinfo for the trunk. And then that ends up screwing up things later on.

Or am I wrong about that? Maybe the self-referential mergeinfo I saw was being introduced some other way.

Thanks,
Jacob

Re: Partially reintegrate changes

Posted by Mark Phippard <ma...@gmail.com>.
On Thu, Feb 18, 2010 at 7:17 AM, Jacob Weber <ja...@jacobweber.com> wrote:
> Let's say I have a branch where I develop two features, X and Y. I then want to merge only X back
> into the trunk. I want to do some further development on Y, and merge it into trunk later.
>
> Is this possible with Subversion?

Yes.  When merging from branch to trunk, you would need to specify the
specific revisions to merge.  You could not use reintegrate.  Let's
assume when you commit this merge to trunk that revision 200 is
created.

Back on the branch you should run:

svn merge --record-only -c200 ^/trunk

To record the merge.  Now you can just do normal synch merges with
trunk and reintegrate the branch when you are done.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/