Re: People using code from hg should be aware about tazwok/tazkg/slitaz-dev-tools branching.

[ Thread Index | Date Index | More lists.tuxfamily.org/slitaz Archives ]


On Sat, 05 Mar 2011 18:39:49 +0000
Paul Issott <paul@xxxxxxxxxxxxxxxxxxx> wrote:

> Hi
Hi

> 
> Did you check with the other developers before you started branching the
> repos?
No.

> Because I need to do some work in there and will probably have to
> wait until all the branches are merged again (I'm not a developer).

I saw you already pushed some tiny edits.
Well, you don't have to wait, you can push changes to the default
branche as usual. I will merge all changes into default to 4.3 myself
if it's not done by commiters (= you don't have to bother with that,
expecially if you don't want to deal with the code).

Branching is generally harmless using mercurial, the only importants
things are:
* Know in which branch you are (hg summary) - you commited your edits
to default.
* Be carefull when performing merges, branch should be created and
merged using a precise way. Merge inside a branch, when commits
overlap, should do with care to.

To get an idea about how branches are working, you can use the graphlog
extension (http://doc.slitaz.org/en:cookbook:advancedhg) or the graph
webpage on hg.slitaz.org: http://hg.slitaz.org/tazwok/graph/tip.

How-to merge when using branches (I know, it's not you're question but
can be usefull to some people on the list; and it's a base for a
future doc explaining fully how-to use a branching model).

The two things you need to know before merging:
* As usual, especialy using branches, know which rev is the current one
(hg summary)
* Know which rev you want to merge into this one (hg log/hg glog/etc)

You can specify which revision you want to merge into the current one
using -r option with hg merge.

Examples:

* Merging default changes into testing (here 4.3) branch:
# Go to 4.3 head.
hg up 4.3
# Merge default head into 4.3.
hg merge -r default
# Commit
hg ci -m "Merging default changes/bugfixes/edits into 4.3"

* Releasing 4.3 (merging it into default branch):
# Go to 4.3 head.
hg up 4.3
# Close 4.3 branch.
hg ci --close-branch
# Go to default head.
hg up default
# Merge 4.3 branch into default
hg merge -r 4.3
# Commit
hg ci -m "Release 4.3"
# Tag default as 4.3
hg tag 4.3
# Now, 4.3 refer to a specific revision, no more to a branch head.


* Merge several commits which are into the same branch (let's say
default).
# Go to branch head.
hg up default
# Find revision you want to merge into default tip.
# option -l allow to specify: output last NUMBER revs
hg log -l number # or
hg glog -l number # (better)
# Perform the merge
hg merge -r REV
# Commit
hg ci "Merge"

-- 
GoKhlaYeh <gokhlayeh@xxxxxxxxxx>


---
SliTaz GNU/Linux Mailing list - http://www.slitaz.org/


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/