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

Kevin Bullock kbullock+mercurial at ringworld.org
Fri Feb 22 10:50:57 CST 2013


On 22 Feb 2013, at 7:24 AM, Laurens Holst wrote:

> I’m not entirely clear why this isn’t the default? Any update with local changes is performing a merge anyway (with all its risks for conflicts), so why would updating across branches need to be prohibited?

Much greater likelihood of conflicts, and no way to get your local changes back if you want to bail.

In a normal linear update with changes in the working copy, all Mercurial has to do is apply the changes in the working dir to the target head, and write the result back into the working copy.

To update across branches, it would have to apply _all_ the changes between the common ancestor and the working copy, and write the result into the working copy. Thus the likelihood of clobbering uncommitted changes is much greater (and much more subject to operator error in your merge tool of choice).

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list