poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: Subvert? Re: [IMPORTANT] Changes to branch.
Date Thu, 03 Jul 2003 20:10:56 GMT
On Thu, Jul 03, 2003 at 09:51:51AM -0400, Andrew C. Oliver wrote:
> On 7/2/03 7:51 PM, "Glen Stampoultzis" <gstamp@iinet.net.au> wrote:
> > At 12:28 AM 3/07/2003, you wrote:
> > 
> > Ahh but it isn't as simple as that...  The problems are these:
> > 
> > 1. Someone commits stuff to the head the realizes their mistake and commits
> > to the branch.  Now i'm faced with the problem of merging changes back
> > except for those particular changes.  Can't be done that I know
> > of.  Changes aren't atomic and CVS and I can't pick and choose which ones
> > to merge back.
> > 2. Someone commits stuff to the branch that they don't want to go back into
> > the head.  Here I face the same problem as with 1.  I can't pick and choose
> > which changes to merge.
> > 
> > You see the problem?
> > 
> > BTW, does anyone know enough about subversion as to whether it lets you
> > pick and choose which commits to merge?  I believe bitkeeper allows this.
> 
> No but I know who does...

Heh.

Subversion commits are atomic changesets. You can select which changes to
merge into the trunk or a branch or wherever. Bitkeeper has more flexibility
in selecting changesets, but for the use cases you describe, Subversion is
*very* capable.

Note that Subversion uses a global revision number. Each commit generates a
new revision. It is the deltas between these revisions which are effectively
your change sets. These revision numbers make it very easy to select what to
merge. Below are examples for your two use cases:

Case 1:

[.../trunk]$ svn commit -m "super duper changes"
<output>
Committed revision 1234.
[.../trunk]$

Oh damn! Wrong branch. Let's switch over to the branch and commit this.

[.../trunk]$ svn switch http://svn.apache.org/repos/asf/branches/FOO
<output>

This switched the working copy to the branch. Much like 'cvs up -r FOO'.

[.../trunk]$ svn merge -r1233:1234 http://svn.apache.org/repos/asf/trunk
<output>
[.../trunk]$ svn commit -m "merged super duper changes from trunk"


Case 2:

# grab 1100 thru 1300, except revisions 1200 and 1210
[.../trunk]$ svn merge -r 1100:1199 http://svn.apache.org/repos/asf/branches/FOO
<output>
[.../trunk]$ svn merge -r 1200:1209 http://svn.apache.org/repos/asf/branches/FOO
<output>
[.../trunk]$ svn merge -r 1210:1300 http://svn.apache.org/repos/asf/branches/FOO
<output>
[.../trunk]$ svn commit -m "merged changes from branch FOO"


There ya go...

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message