This is an archive of the discontinued Mercurial Phabricator instance.

revset: add a revset for parents in merge state
ClosedPublic

Authored by martinvonz on Jan 29 2020, 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.Jan 29 2020, 7:56 PM
pulkit added a subscriber: pulkit.Jan 30 2020, 9:47 AM
pulkit added inline comments.
mercurial/revset.py
1898

The sentence looks incomplete.

yuja added a subscriber: yuja.Jan 30 2020, 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.Feb 4 2020, 12:13 PM
martinvonz marked an inline comment as done.Feb 4 2020, 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.Feb 10 2020, 7:22 PM
durin42 accepted this revision.Feb 10 2020, 9:16 PM
This revision is now accepted and ready to land.Feb 10 2020, 9:16 PM
This revision was automatically updated to reflect the committed changes.