--- a/mercurial/revset.py Tue Apr 09 14:41:48 2024 +0200
+++ b/mercurial/revset.py Fri Apr 05 11:05:54 2024 +0200
@@ -149,6 +149,22 @@
return x & subset
+def raw_node_set(repo, subset, x, order):
+ """argument is a list of nodeid, resolve and use them"""
+ nodes = _ordered_node_set(repo, x)
+ if order == followorder:
+ return subset & nodes
+ else:
+ return nodes & subset
+
+
+def _ordered_node_set(repo, nodes):
+ if not nodes:
+ return baseset()
+ to_rev = repo.changelog.index.rev
+ return baseset([to_rev(r) for r in nodes])
+
+
def rangeset(repo, subset, x, y, order):
m = getset(repo, fullreposet(repo), x)
n = getset(repo, fullreposet(repo), y)
@@ -2772,6 +2788,7 @@
b"parent": parentspec,
b"parentpost": parentpost,
b"smartset": rawsmartset,
+ b"nodeset": raw_node_set,
}
relations = {