mercurial/revset.py
changeset 50396 386737600689
parent 50387 92f71d40fc1d
child 50929 18c8c18993f0
equal deleted inserted replaced
50395:71a2c061865d 50396:386737600689
  1965 def _phase(repo, subset, *targets):
  1965 def _phase(repo, subset, *targets):
  1966     """helper to select all rev in <targets> phases"""
  1966     """helper to select all rev in <targets> phases"""
  1967     return repo._phasecache.getrevset(repo, targets, subset)
  1967     return repo._phasecache.getrevset(repo, targets, subset)
  1968 
  1968 
  1969 
  1969 
       
  1970 @predicate(b'_internal()', safe=True)
       
  1971 def _internal(repo, subset, x):
       
  1972     getargs(x, 0, 0, _(b"_internal takes no arguments"))
       
  1973     return _phase(repo, subset, *phases.all_internal_phases)
       
  1974 
       
  1975 
  1970 @predicate(b'_phase(idx)', safe=True)
  1976 @predicate(b'_phase(idx)', safe=True)
  1971 def phase(repo, subset, x):
  1977 def phase(repo, subset, x):
  1972     l = getargs(x, 1, 1, b"_phase requires one argument")
  1978     l = getargs(x, 1, 1, b"_phase requires one argument")
  1973     target = getinteger(l[0], b"_phase expects a number")
  1979     target = getinteger(l[0], b"_phase expects a number")
  1974     return _phase(repo, subset, target)
  1980     return _phase(repo, subset, target)