Subject: Re: [boost] [git] Mercurial? easy merging in svn, how about git/hg?
From: Martin Geisler (mg_at_[hidden])
Date: 2012-04-02 18:09:54
Frank Birbacher <bloodymir.crap_at_[hidden]> writes:
> Am 02.04.12 10:49, schrieb Martin Geisler:
>> Frank Birbacher <bloodymir.crap_at_[hidden]> writes:
>>> This means the person to do the fix has to do a merge, too.
>> Not necessarily: I can commit a bugfix to stable without being the
>> one who merges stable in dev.
>> In practice, I'm probably the one who are in the best position to do
>> the merge since I understand my bugfix and so I can decide how to
>> apply it on dev. But I can delay the merge or ask someone else to do
>> it instead.
> Well, if there is one guy to do the merge of stable into dev and
> everyone on the team would send an email request that states which
> changes not to merge then this guy will have a hard time.
> In svn the blocking merge is recorded in the system. So whenever
> anyone will merge the stable into dev svn will know which changes not
> to merge. How does hg/git help in communicating this? Imagine a branch
> where many developers do bugfixes and someone will once a week merge
> things into dev. How shall he know which changes to skip?
You cannot skip changes -- you really must merge them from stable into
dev (really 'default' when using Mercurial). What you can do is to
hg update default
hg merge stable
hg revert --all --rev default
The last step reverts all files to how they looked on default. You can
then re-implement the bugfix the right way and commit the merge.
In my experience, there isn't that many bugfix commits and/or the
branches haven't drifted that far away from each other.
The whole workflows obviously builds on the idea that you can normally
merge stable into default and benefit from the merge, i.e., that the
branches are close enough for this to make sense so that you don't get
enormous merge conflicts on every stable->default merge.
We've used this workflow for several years in Mercurial itself and it's
very smooth. You can read a bit about it here:
I'll be on vacation for a week, so I'll probably reply very slowly, if
at all. You're welcome to ask about this on mercurial_at_[hidden] where
many other guys will be able to talk about this for hours :)
-- Martin Geisler Mercurial links: http://mercurial.ch/