You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Andrew Durdin <ad...@gmail.com> on 2006/09/01 16:12:43 UTC

Keeping a branch updated

This is the second time that this conundrum has turned up for me, and I
haven't figured out the answer yet:  I'm working on a branch of a
project that is implementing a large feature.  Part way through its
development, I notice that there are significant changes in the trunk
that will cause a conflict with my code when it's merged.  To keep on
top of this, and keep the future conflicts as small as possible, I want
to incorporate this change (or perhaps all the trunk changes up to this
point) into my branch, so that it doesn't get too far out of sync with
the trunk.  Now, this might happen several times during the lifetime of
the branch.

When the feature is completed, and it comes time to merge the branch
features back into the trunk, what's the best way to approach it?  If I
just try to merge the whole branch's history, then I get conflicts due
to the same changes (that were synchronised) being present in both the
trunk and the branch.  If I try to merge the history between
synchronisations of the branch (first from creation up to the first
sync, then after the first sync to the second sync, etc.), then I end
up having to again resolve the conflicts that I resolved at each
synchronisation.

Is there a better way to manage this process?

Andrew

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Keeping a branch updated

Posted by Blair Zajac <bl...@orcaware.com>.
Andrew Durdin wrote:
> This is the second time that this conundrum has turned up for me, and I
> haven't figured out the answer yet:  I'm working on a branch of a
> project that is implementing a large feature.  Part way through its
> development, I notice that there are significant changes in the trunk
> that will cause a conflict with my code when it's merged.  To keep on
> top of this, and keep the future conflicts as small as possible, I want
> to incorporate this change (or perhaps all the trunk changes up to this
> point) into my branch, so that it doesn't get too far out of sync with
> the trunk.  Now, this might happen several times during the lifetime of
> the branch.
> 
> When the feature is completed, and it comes time to merge the branch
> features back into the trunk, what's the best way to approach it?  If I
> just try to merge the whole branch's history, then I get conflicts due
> to the same changes (that were synchronised) being present in both the
> trunk and the branch.  If I try to merge the history between
> synchronisations of the branch (first from creation up to the first
> sync, then after the first sync to the second sync, etc.), then I end
> up having to again resolve the conflicts that I resolved at each
> synchronisation.
> 
> Is there a better way to manage this process?

Yes, use svnmerge.py to set up merging in either direction.

http://www.orcaware.com/svn/wiki/index.php/Svnmerge.py

We use it at work for per-developer branches and it works great.

You set up svnmerge.py on the branch and on the trunk and with the -b command 
line option, if you only use svnmerge.py to do your merges, then svnmerge.py 
will not merge changes from your branch back into the trunk the originated from 
the trunk.

Regards,
Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Re: Keeping a branch updated

Posted by Andrew Durdin <ad...@gmail.com>.
On 9/1/06, Mark Phippard <ma...@softlanding.com> wrote:
>
> When you want to merge back you have to do a final synch merge of your
> branch to update it to trunk.  Then just do a merge back to trunk where
> the old URL is trunk and the new URL is the branch.  This will show just
> the differences between trunk and the branch.

Thanks Mark! That's the answer I was looking for but couldn't figure
out.  It makes sense now.

Cheers, Andrew.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Keeping a branch updated

Posted by Ch...@qimonda.com.
Read the sections on branches, tags, and merges
in the manual to get you started... 

>-----Original Message-----
>From: Andrew Durdin [mailto:adurdin@gmail.com] 
>Sent: Friday, September 01, 2006 12:13 PM
>To: users@subversion.tigris.org
>Subject: Keeping a branch updated
>
>This is the second time that this conundrum has turned up for 
>me, and I haven't figured out the answer yet:  I'm working on 
>a branch of a project that is implementing a large feature.  
>Part way through its development, I notice that there are 
>significant changes in the trunk that will cause a conflict 
>with my code when it's merged.  To keep on top of this, and 
>keep the future conflicts as small as possible, I want to 
>incorporate this change (or perhaps all the trunk changes up to this
>point) into my branch, so that it doesn't get too far out of 
>sync with the trunk.  Now, this might happen several times 
>during the lifetime of the branch.
>
>When the feature is completed, and it comes time to merge the 
>branch features back into the trunk, what's the best way to 
>approach it?  If I just try to merge the whole branch's 
>history, then I get conflicts due to the same changes (that 
>were synchronised) being present in both the trunk and the 
>branch.  If I try to merge the history between 
>synchronisations of the branch (first from creation up to the 
>first sync, then after the first sync to the second sync, 
>etc.), then I end up having to again resolve the conflicts 
>that I resolved at each synchronisation.
>
>Is there a better way to manage this process?
>
>Andrew
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: users-help@subversion.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Keeping a branch updated

Posted by Mark Phippard <ma...@softlanding.com>.
"Andrew Durdin" <ad...@gmail.com> wrote on 09/01/2006 12:12:43 PM:

> This is the second time that this conundrum has turned up for me, and I
> haven't figured out the answer yet:  I'm working on a branch of a
> project that is implementing a large feature.  Part way through its
> development, I notice that there are significant changes in the trunk
> that will cause a conflict with my code when it's merged.  To keep on
> top of this, and keep the future conflicts as small as possible, I want
> to incorporate this change (or perhaps all the trunk changes up to this
> point) into my branch, so that it doesn't get too far out of sync with
> the trunk.  Now, this might happen several times during the lifetime of
> the branch.
> 
> When the feature is completed, and it comes time to merge the branch
> features back into the trunk, what's the best way to approach it?  If I
> just try to merge the whole branch's history, then I get conflicts due
> to the same changes (that were synchronised) being present in both the
> trunk and the branch.  If I try to merge the history between
> synchronisations of the branch (first from creation up to the first
> sync, then after the first sync to the second sync, etc.), then I end
> up having to again resolve the conflicts that I resolved at each
> synchronisation.
> 
> Is there a better way to manage this process?

When you want to merge back you have to do a final synch merge of your 
branch to update it to trunk.  Then just do a merge back to trunk where 
the old URL is trunk and the new URL is the branch.  This will show just 
the differences between trunk and the branch.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org