dummy merge (two branches) for dummies
Kevin Bullock
kbullock+mercurial at ringworld.org
Fri Aug 19 15:13:03 UTC 2016
> On Aug 18, 2016, at 17:39, Becker, Mischa J <mischa.becker at kroger.com> wrote:
>
> After that here are three example merges that keep foo changes:
>
> 1) hg update uwe
> hg merge foo --tool internal:other
> hg commit -m "Merge foo internal:other"
This may work in this particular case, but will cause surprising results in the general case. If you skip the `hg revert` step, you will have merged the changes from 'foo' that were resolved mechanically by Mercurial's internal 3-way merge, without invoking the merge tool.
> 2) hg update foo
> hg debugsetparents uwe foo
> hg branch uwe
> hg commit -m "Merge using debugsetparents"
As Matt pointed out, this relies on a magical debug* command and isn't generally to be recommended.
> 3) hg update uwe
> hg merge foo --tool internal:other
> hg revert --all -r foo
> hg commit -m "Merge foo, discard uwe changes"
This is the correct, generally-recommended pattern for a dummy merge.
pacem in terris / мир / शान्ति / سَلاَم / 平和
Kevin R. Bullock
More information about the Mercurial
mailing list