Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 18251:a6483f827512
revset: retrieve hidden from filteredrevs
This prepare the dropping of the `repo.hiddenrevs` property
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Thu, 03 Jan 2013 18:48:14 +0100 |
parents | bea754715961 |
children | f3b21beb9802 |
comparison
equal
deleted
inserted
replaced
18250:f54898526aad | 18251:a6483f827512 |
---|---|
11 import bookmarks as bookmarksmod | 11 import bookmarks as bookmarksmod |
12 import match as matchmod | 12 import match as matchmod |
13 from i18n import _ | 13 from i18n import _ |
14 import encoding | 14 import encoding |
15 import obsolete as obsmod | 15 import obsolete as obsmod |
16 import repoview | |
16 | 17 |
17 def _revancestors(repo, revs, followfirst): | 18 def _revancestors(repo, revs, followfirst): |
18 """Like revlog.ancestors(), but supports followfirst.""" | 19 """Like revlog.ancestors(), but supports followfirst.""" |
19 cut = followfirst and 1 or None | 20 cut = followfirst and 1 or None |
20 cl = repo.changelog | 21 cl = repo.changelog |
890 """``hidden()`` | 891 """``hidden()`` |
891 Hidden changesets. | 892 Hidden changesets. |
892 """ | 893 """ |
893 # i18n: "hidden" is a keyword | 894 # i18n: "hidden" is a keyword |
894 getargs(x, 0, 0, _("hidden takes no arguments")) | 895 getargs(x, 0, 0, _("hidden takes no arguments")) |
895 return [r for r in subset if r in repo.hiddenrevs] | 896 hiddenrevs = repoview.filteredrevs(repo, 'hidden') |
897 return [r for r in subset if r in hiddenrevs] | |
896 | 898 |
897 def keyword(repo, subset, x): | 899 def keyword(repo, subset, x): |
898 """``keyword(string)`` | 900 """``keyword(string)`` |
899 Search commit message, user name, and names of changed files for | 901 Search commit message, user name, and names of changed files for |
900 string. The match is case-insensitive. | 902 string. The match is case-insensitive. |