mercurial/revset.py
changeset 16657 b6081c2c4647
parent 16647 14913fcb30c6
child 16661 de4b42daf396
equal deleted inserted replaced
16656:4ae3ba9e4d7a 16657:b6081c2c4647
   461 
   461 
   462 def draft(repo, subset, x):
   462 def draft(repo, subset, x):
   463     """``draft()``
   463     """``draft()``
   464     Changeset in draft phase."""
   464     Changeset in draft phase."""
   465     getargs(x, 0, 0, _("draft takes no arguments"))
   465     getargs(x, 0, 0, _("draft takes no arguments"))
   466     return [r for r in subset if repo._phaserev[r] == phases.draft]
   466     pc = repo._phasecache
       
   467     return [r for r in subset if pc.phase(repo, r) == phases.draft]
   467 
   468 
   468 def filelog(repo, subset, x):
   469 def filelog(repo, subset, x):
   469     """``filelog(pattern)``
   470     """``filelog(pattern)``
   470     Changesets connected to the specified filelog.
   471     Changesets connected to the specified filelog.
   471     """
   472     """
   850 
   851 
   851 def public(repo, subset, x):
   852 def public(repo, subset, x):
   852     """``public()``
   853     """``public()``
   853     Changeset in public phase."""
   854     Changeset in public phase."""
   854     getargs(x, 0, 0, _("public takes no arguments"))
   855     getargs(x, 0, 0, _("public takes no arguments"))
   855     return [r for r in subset if repo._phaserev[r] == phases.public]
   856     pc = repo._phasecache
       
   857     return [r for r in subset if pc.phase(repo, r) == phases.public]
   856 
   858 
   857 def remote(repo, subset, x):
   859 def remote(repo, subset, x):
   858     """``remote([id [,path]])``
   860     """``remote([id [,path]])``
   859     Local revision that corresponds to the given identifier in a
   861     Local revision that corresponds to the given identifier in a
   860     remote repository, if present. Here, the '.' identifier is a
   862     remote repository, if present. Here, the '.' identifier is a
  1029 
  1031 
  1030 def secret(repo, subset, x):
  1032 def secret(repo, subset, x):
  1031     """``secret()``
  1033     """``secret()``
  1032     Changeset in secret phase."""
  1034     Changeset in secret phase."""
  1033     getargs(x, 0, 0, _("secret takes no arguments"))
  1035     getargs(x, 0, 0, _("secret takes no arguments"))
  1034     return [r for r in subset if repo._phaserev[r] == phases.secret]
  1036     pc = repo._phasecache
       
  1037     return [r for r in subset if pc.phase(repo, r) == phases.secret]
  1035 
  1038 
  1036 def sort(repo, subset, x):
  1039 def sort(repo, subset, x):
  1037     """``sort(set[, [-]key...])``
  1040     """``sort(set[, [-]key...])``
  1038     Sort set by keys. The default sort order is ascending, specify a key
  1041     Sort set by keys. The default sort order is ascending, specify a key
  1039     as ``-key`` to sort in descending order.
  1042     as ``-key`` to sort in descending order.