How to maintain clean history in main branch?

Bela Babik teki321 at gmail.com
Thu Apr 24 02:04:41 CDT 2008


Just one more note, the mainline will not be "clean".
Merge does not create a big patch from the named branch, you can not
get rid of it.

What workflow I would consider:
- a clean mainline repo (could be cloned from the dev repo)
- if I really would like to archive everything, use a separate dev
repo where everyone can push everything (the mainline could be part of
this repo as the default branch, and could be protected by some hooks
[ex: by a code from the reviewers])
- use http://www.review-board.org/ for review, the patch can be easily
generated by mercurial
- commit the whole reviewed developer branch as a single commit into
the mainline (use the reviewed and accepted patch)
- if a patch is part of the mainline, any modification needs to be
applied to the mainline anyway, so it's not a problem that the history
is not available (it is available in the dev repo, the corresponding
node id could be specified in the commmit message)

teki

On Thu, Apr 24, 2008 at 4:38 PM, Brian Wallis
<brian.wallis at infomedix.com.au> wrote:
> I am trying to follow a similar way of working and hadn't thought of
>  this. I had sort of assumed that it would just work.
>
>  I had a bit of a play and you can do this quite easily *if* you name
>  the branch. So the first thing you do is "hg branch branchname" and
>  then continue working. When you are done you switch back to the
>  default branch "hg update default" which takes you back to the branch
>  point and then merge "hg merge branchname".


More information about the Mercurial mailing list