Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 45686:17a12f53dd72
revset: add a `node` key for sorting
Sorting by node give an arbitrary, but stable order which is useful for
sampling.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 08 Oct 2020 16:14:06 +0200 |
parents | 9b9071fabcd3 |
children | b90d7e7f39db |
line wrap: on
line diff
--- a/mercurial/revset.py Sun Oct 04 22:32:41 2020 -0700 +++ b/mercurial/revset.py Thu Oct 08 16:14:06 2020 +0200 @@ -2293,6 +2293,7 @@ b'user': lambda c: c.user(), b'author': lambda c: c.user(), b'date': lambda c: c.date()[0], + b'node': lambda c: c.node(), } @@ -2356,6 +2357,7 @@ - ``user`` for user name (``author`` can be used as an alias), - ``date`` for the commit date - ``topo`` for a reverse topographical sort + - ``node`` the nodeid of the revision The ``topo`` sort order cannot be combined with other sort keys. This sort takes one optional argument, ``topo.firstbranch``, which takes a revset that