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

Re: branching best practice

From: Jon Scott Stevens <jon_at_latchkey.com>
Date: 2007-05-20 03:11:28 CEST

Sweet. That validates what I thought and it's nice to hear it from
you Karl. =)

cheers!

jon

On May 19, 2007, at 6:03 PM, Karl Fogel wrote:

> Jon Scott Stevens <jon@latchkey.com> writes:
>> Say I'm working on a WC off of trunk. I've made a whole bunch of
>> changes. renamed directories, moved files around, blah blah blah.
>> These changes aren't complete and if I checked them back into trunk,
>> they would break the build.
>>
>> I need to hand these changes off to someone else and I don't want to
>> break trunk, so I want to commit these changes onto a branch.
>>
>> What's the best practice steps for doing this? The documentation
>> about branching in the book assumes you are working from an unchanged
>> WC.
>
> Hi, Jon! One way is this:
>
> $ svn cp . http://blahblahblah/repos/branches/my_new_branch
>
> In other words, you can create a branch from a working copy -- even a
> mixed-revision, rearranged working copy :-).
>
> Another way is to create a branch from a pristine revision:
>
> $ svn cp http://blah/repos/trunk http://blah/repos/branches/
> my_new_branch
>
> Then switch your working copy to that branch:
>
> $ svn switch http://blah/repos/branches/my_new_branch
>
> (Note that that preserves your local changes.) Then commit the
> changes:
>
> $ svn commit
>
> ...perhaps after testing them to make sure everything still works.
>
> HTH,
> -Karl
>
> --
> Subversion support & consulting <> http://producingoss.com/
> consulting.html
>
> ---------------------------------------------------------------------
> 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
Received on Sun May 20 03:11:43 2007

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

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