Page MenuHomePhabricator

revset: add a revset for parents in merge state
ClosedPublic

Authored by martinvonz on Wed, Jan 29, 7:56 PM.

Details

Summary

This may be particularly useful soon, when I'm going to change how `hg
rebase` sets its parents during conflict resolution.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Wed, Jan 29, 7:56 PM
pulkit added a subscriber: pulkit.Thu, Jan 30, 9:47 AM
pulkit added inline comments.
mercurial/revset.py
1898

The sentence looks incomplete.

yuja added a subscriber: yuja.Thu, Jan 30, 10:25 AM

+@predicate(b'conflictparents()', safe=True)
+def parents(repo, subset, x):

^^^^^^^

Nit: copy-paste error?

marmoute added inline comments.
relnotes/next
3

Could we call this conflict_sides, using "parents" for things that are not actual parent might be confusing.

What about having a local_conflict_side and other_conflict_side conflict_base revsets ?

In D8041#118684, @yuja wrote:

+@predicate(b'conflictparents()', safe=True)
+def parents(repo, subset, x):

^^^^^^^

Nit: copy-paste error?

Good catch. Done.

mercurial/revset.py
1898

It was actually just an extra "If". Fixed.

relnotes/next
3

Those both sound like good ideas. I'll send an update later today.

martinvonz updated this revision to Diff 19869.Tue, Feb 4, 12:13 PM
martinvonz marked an inline comment as done.Tue, Feb 4, 12:14 PM
martinvonz added inline comments.
relnotes/next
3

I've renamed them conflictlocal() and conflictother(). Hopefully that's clear enough and not too long.

martinvonz updated this revision to Diff 20094.Mon, Feb 10, 7:22 PM
durin42 accepted this revision.Mon, Feb 10, 9:16 PM
This revision is now accepted and ready to land.Mon, Feb 10, 9:16 PM
This revision was automatically updated to reflect the committed changes.