You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Elliston <bj...@air.net.au> on 2002/12/22 02:06:55 UTC

applying patches to multiple branches

While reading the Subversion book, it occured to me that there might be
something that Subversion can do to make my work easier.  Perhaps it falls
outside the scope of the tool, in which case I will start thinking about
ways to script something to do the job for me.  I'd just like to throw
this idea out there and get some criticism :-P.

Suppose I have a large source tree on the trunk which has been branched
repeatedly over a few years.  Now suppose a customer reports a bug in a
version of the software from their branch made in 1997.  That bug may
affect either:

  * every branch (including the trunk); or
  * the branch in question and all branches made from that branch 
    after the branch was created.

Since I may have a huge tree and not want to check it all out into a local
working copy, I am faced with the problem of not being easily able to
apply that patch "everywhere"  that it would make sense to apply it.  
That is, there is a looming issue of patch management:

  * where are all my branches, exactly (presumable solved by policy?); and
  * how do I apply my patch to all affected branches in a bandwidth and 
    time efficient manner?

It would be great if I could, at the very least:

  * identify branches that are missing the patch;
  * have subversion tell me if my patch would apply cleanly to each of 
    the affected branches;
  * perhaps even apply them for me without requiring a working copy of 
    each branch.  (I realise this is a little foolish in that all branches
    should be checked out, built and tested, but often, we are able to
    make that call on sufficiently trivial patches that affect enough
    branches)

Comments?

Ben


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

Re: applying patches to multiple branches

Posted by Nathanael Nerode <ne...@twcny.rr.com>.
Karl Fogel wrote:
> Ben Elliston <bj...@air.net.au> writes:
> 
>>It would be great if I could, at the very least:
>>
>>  * identify branches that are missing the patch;
Classic way to do this is to examine the files involved to see if they 
have the post-patch version. :-/  A true changeset tool would be able to 
tell you whether the patch had been (at some point) applied to a 
particular branch.  (Though not whether a subsequent patch had 
reintroduced the bug, of course.)

>>  * have subversion tell me if my patch would apply cleanly to each of 
>>    the affected branches;
>>  * perhaps even apply them for me without requiring a working copy of 
>>    each branch.  (I realise this is a little foolish in that all branches
>>    should be checked out, built and tested, but often, we are able to
>>    make that call on sufficiently trivial patches that affect enough
>>    branches)
>>
>>Comments?
> 
> 
> Congratulations, you've just described the changeset problem :-).

Indeed.  The case of merging two branches *after* this patch is applied 
to both of them is the most common one such that 3-way merge often gives 
false conflicts and full changeset handling works properly.

> This is very complex, and we've decided to defer it until after 1.0
> (excepting any small, simple accommodations that can be made earlier
> to partially alleviate the problem).


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

Re: applying patches to multiple branches

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Ben Elliston <bj...@air.net.au> writes:
> It would be great if I could, at the very least:
> 
>   * identify branches that are missing the patch;
>   * have subversion tell me if my patch would apply cleanly to each of 
>     the affected branches;
>   * perhaps even apply them for me without requiring a working copy of 
>     each branch.  (I realise this is a little foolish in that all branches
>     should be checked out, built and tested, but often, we are able to
>     make that call on sufficiently trivial patches that affect enough
>     branches)
> 
> Comments?

Congratulations, you've just described the changeset problem :-).

This is very complex, and we've decided to defer it until after 1.0
(excepting any small, simple accommodations that can be made earlier
to partially alleviate the problem).

There really ought to be a FAQ on this...

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