What is a branch?
Martin Geisler
mg at daimi.au.dk
Thu Feb 14 16:01:26 CST 2008
Yao Zhang <yaoz39 at gmail.com> writes:
> On Thu, Feb 14, 2008 at 10:24:09AM -0200, Martin Marques wrote:
>
>> Let's say I'm on tip (HEAD off the development tree) I want to start
>> to freeze the development to release version 2.0. In cvs this would
>> be done with "cvs tag -b" which makes the branch and tags it (thats
>> like named branches in hg).
>>
>> Now, how is this done in hg?
>
> For example, you are at changeset Cf, which is the freeze point,
> ... -> Cf
> subsequent changeset on the development tree will be Cd1, Cd2, etc.
> ... -> Cf -> Cd1 -> Cd2 -> ... (development trunk)
> To go back to the freeze point and make a branch leading to 2.0
> release,
> hg update -C Cf # go back to the freeze point
> hg branch v2 # start a new branch name "v2"
> # make changes in working directory
> hg commit -m "Changes leading to v2 release." # changeset Cb1 in branch
> Now the history looks like
> ... -> Cf -> Cd1 -> Cd2 -> ... (development trunk)
> \
> -> Cb1 -> ... (branch leading to 2.0)
I have not used named braches so far and I am still trying to understand
what they buy me over using more clones. So I am following this
discussion with interest...
What does a brach give in the situation above that I wouldn't get by
just committing another child revision to Cf, and thereby creating two
heads in the repository?
Is the point that by changing the branch name, I label changesets Cb1,
Cb2, etc., and then it will be easier to see where changes come from
when I merge these changesets with the development trunk?
--
Martin Geisler
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20080214/7b68161b/attachment.pgp
More information about the Mercurial
mailing list