[PATCH RFC] update: add an option to allow to merge local changes when crossing branches

Greg Ward greg at gerg.ca
Wed Mar 13 13:09:03 CDT 2013


On 13 March 2013, Laurens Holst said:
> Op 12-03-13 19:02, Pierre-Yves David schreef:
> >On Fri, Feb 22, 2013 at 11:22:07AM +0100, Gilles Moris wrote:
> >># HG changeset patch
> >># User Gilles Moris <gilles.moris at free.fr>
> >># Date 1361528509 -3600
> >># Node ID 567106adefd309717d8f0538197dc7dde45d34f1
> >># Parent  013fcd112f13f31a35ea6a40d8cd1c6923cdaf20
> >>update: add an option to allow to merge local changes when crossing branches
> >Let's sum up my opinion on that:
> >
> >1) We cannot have this behavior by default. preventing such update by default
> >    frequently save my changes.
> >
> >    The same as mercurial prevent multiple operation in the middle of merge or a
> >    rebase.
> >
> >    We need more of such safety
> >
> 
> Can you elaborate on how this abort saves your changes? Because it
> is not clear to me.

I think Pierre-Yves meant save as in "prevent unexpected/unwanted
merge" rather than "store a backup copy somewhere". 

Here's the scenario: you have uncommitted changes that are valuable
but that you forgot about. You pull and new changesets land, so you
"hg update". Mercurial says "sorry buddy, no cross-branch updates for
you", which reminds you of your uncommitted changes. You can ignore
the pulled changesets and keep working, or commit and merge, or commit
and rebase.

It would perhaps have been more accurate for Pierre-Yves to say

  preventing such update by default frequently saves my bacon

but expecting perfect idiomatic English from everyone is unrealistic. ;-)

       Greg
-- 
Greg Ward                            http://www.gerg.ca
<greg at gerg.ca>                       @gergdotca


More information about the Mercurial-devel mailing list