Merge union order

Cédric Krier cedric.krier at b2ck.com
Tue Jan 24 10:35:14 UTC 2023


On 2023-01-14 10:54, Cédric Krier via Mercurial wrote:
> Hi,
> 
> In our repository we are filling a CHANGELOG text file when developing
> new feature. The rule is to append on top of the file new entries.
> The problem is that obviously we have very often merge conflict with
> that file. So in order to simplify the merge process, I though about
> using `internal:union` tool. This works great but instead of having the
> new entry on top, it is merged at the bottom of the conflict.
> So is there a way to tell `internal:union` to unify the other way?

I see in simplemerge of mercurial/simplemerge.py that:

if mode == b'union':
    lines = _resolve(m3, (1, 2))

Would it be acceptable to add another mode with:

    lines = _resolve(m3, (2, 1))

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.krier at b2ck.com
Tel: +32 472 54 46 59
Website: https://www.b2ck.com/


More information about the Mercurial mailing list