comparison 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
comparison
equal deleted inserted replaced
44691:44aff45b556d 44692:48b99af7b4b3
2505 getargs(x, 0, 0, _(b"orphan takes no arguments")) 2505 getargs(x, 0, 0, _(b"orphan takes no arguments"))
2506 orphan = obsmod.getrevs(repo, b'orphan') 2506 orphan = obsmod.getrevs(repo, b'orphan')
2507 return subset & orphan 2507 return subset & orphan
2508 2508
2509 2509
2510 @predicate(b'unstable()', safe=True)
2511 def unstable(repo, subset, x):
2512 """Changesets with instabilities. (EXPERIMENTAL)
2513 """
2514 # i18n: "unstable" is a keyword
2515 getargs(x, 0, 0, b'unstable takes no arguments')
2516 _unstable = set()
2517 _unstable.update(obsmod.getrevs(repo, b'orphan'))
2518 _unstable.update(obsmod.getrevs(repo, b'phasedivergent'))
2519 _unstable.update(obsmod.getrevs(repo, b'contentdivergent'))
2520 _unstable = baseset(_unstable)
2521 _unstable.sort() # set is non-ordered, enforce order
2522 return subset & _unstable
2523
2524
2510 @predicate(b'user(string)', safe=True, weight=10) 2525 @predicate(b'user(string)', safe=True, weight=10)
2511 def user(repo, subset, x): 2526 def user(repo, subset, x):
2512 """User name contains string. The match is case-insensitive. 2527 """User name contains string. The match is case-insensitive.
2513 2528
2514 Pattern matching is supported for `string`. See 2529 Pattern matching is supported for `string`. See