Merge union order

Cédric Krier cedric.krier at b2ck.com
Thu Jan 26 10:20:23 UTC 2023


On 2023-01-24 11:47, Raphaël Gomès wrote:
> On 1/24/23 11:35, Cédric Krier via Mercurial wrote:
> > 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))
> >
> I don't see why not, maybe call it "union-reverse". Could you send a MR?

FYI, I created https://foss.heptapod.net/mercurial/mercurial-devel/-/merge_requests/408

-- 
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