colocated branches and auto nicknaming may solve merge&push problem.

INADA Naoki songofacandy at gmail.com
Mon Feb 8 06:56:30 GMT 2010


Many users use single working directory for hacking and be confused by
merge&push DAG problem.

I don't know about git much but Mercurial solves the problem with
colocated branches.

* "hg pull" makse two heads and the "tip" is pulled head.
* "hg merge && hg commit" merges two heads. commit's left most rev is
pulled head
   because it is the "tip".

Hg uses single (not dotted) revision number and "hg log" shows
revisions from all branches.
So it can handle heads without name easily.

Bazaar's branch is more heavy than hg.
"bzr log" shows revisions in a branch and revision number is branch specific.
So bzr requires naming branch in some way.

But naming branch by hand should not be required for just a merging.
I think auto naming is good to solve such a problem.

1. "bzr pull BRANCH" stores current branch if two branches are diverged and
   current tree is colocated. Current nick used for the stored branch.
If current
   nick conflicts against other colocated branches' nick, nick is
autonumbered like
   "somenick-1"
2. "bzr merge colo:nick"   (1&2 in one "pull --merge" command seems good for me)
3. "bzr commit -m "merge some improvements.""
4. "bzr push"

I prefer this workflow.
Any suggestion about auto-nicknaming?

-- 
INADA Naoki  <songofacandy at gmail.com>



More information about the bazaar mailing list