Mercurial > hg-stable
changeset 25633:0f44d35731d6
fileset: don't suggest private or undocumented queries
Unlike revsets, it looks like all of the filesets are documented, so there's
really nothing to test. This is aimed more at parity with revsets and
future-proofing.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 20 Jun 2015 11:07:36 -0400 |
parents | 015c0d1087a3 |
children | 1ddefcfcd3e6 |
files | mercurial/fileset.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/fileset.py Sat Jun 20 10:59:56 2015 -0400 +++ b/mercurial/fileset.py Sat Jun 20 11:07:36 2015 -0400 @@ -189,7 +189,11 @@ def func(mctx, a, b): if a[0] == 'symbol' and a[1] in symbols: return symbols[a[1]](mctx, b) - raise error.UnknownIdentifier(a[1], symbols.keys()) + + keep = lambda fn: getattr(fn, '__doc__', None) is not None + + syms = [s for (s, fn) in symbols.items() if keep(fn)] + raise error.UnknownIdentifier(a[1], syms) def getlist(x): if not x: