What is a branch?
Yao Zhang
yaoz39 at gmail.com
Thu Feb 14 13:51:12 CST 2008
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)
Regards,
--
張堯
Q: How many hardware engineers does it take to change a light bulb?
A: None. We'll fix it in software.
Q: How many system programmers does it take to change a light bulb?
A: None. The application can work around it.
Q: How many software engineers does it take to change a light bulb?
A: None. We'll document it in the manual.
Q: How many tech writers does it take to change a light bulb?
A: None. The user can figure it out.
More information about the Mercurial
mailing list