Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 44692:48b99af7b4b3
revset: import `unstable()` from the evolve extension
Differential Revision: https://phab.mercurial-scm.org/D8404
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 13 Apr 2020 01:19:09 -0400 |
parents | f913ece27ff5 |
children | 1ac74f653fa5 |
line wrap: on
line diff
--- a/mercurial/revset.py Fri Apr 10 22:33:14 2020 +0200 +++ b/mercurial/revset.py Mon Apr 13 01:19:09 2020 -0400 @@ -2507,6 +2507,21 @@ return subset & orphan +@predicate(b'unstable()', safe=True) +def unstable(repo, subset, x): + """Changesets with instabilities. (EXPERIMENTAL) + """ + # i18n: "unstable" is a keyword + getargs(x, 0, 0, b'unstable takes no arguments') + _unstable = set() + _unstable.update(obsmod.getrevs(repo, b'orphan')) + _unstable.update(obsmod.getrevs(repo, b'phasedivergent')) + _unstable.update(obsmod.getrevs(repo, b'contentdivergent')) + _unstable = baseset(_unstable) + _unstable.sort() # set is non-ordered, enforce order + return subset & _unstable + + @predicate(b'user(string)', safe=True, weight=10) def user(repo, subset, x): """User name contains string. The match is case-insensitive.