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

Laurens Holst laurens.nospam at grauw.nl
Thu Mar 14 06:15:54 CDT 2013


Op 14-03-13 12:01, Pierre-Yves David schreef:
> I forget to finish what I'm doing before moving to something else:
> - I forget to commit my merge after conflict resolution

Updating while there is an uncommitted merge is I think a separate check 
that should remain in place, even when updating to an ancestor.

> - I forget to amend my change in the relevant commit before moving to something else.
>
> And I'm usually reminded by mercurial telling me:
> - uncommited merge
> - refuse to update with uncommited changes
> So I can avoid the error early.

But you *can* update with uncommitted changes. Just not to another 
topological branch. So if that’s the rationale, then you can’t 
consistently apply it unless you use the --check flag. And if you use 
that flag, then you won’t be affected by the change in default behaviour.

So I don’t think that is a good, or at least consistent argument to 
prevent updating across branches by default. It would be an argument for 
making --check default, however I think nobody wants that because it 
makes the tool more obnoxious and less convenient to use.

Similarly, the tool complaining just about cross branch updates is 
obnoxious and inconvenient, and if we have a means to roll back an 
update with merge conflict, this particular restriction by itself does 
not seem to serve any purpose in preventing the user from shooting 
himself in the foot.

~Laurens



More information about the Mercurial-devel mailing list