# HG changeset patch # User Matt Harbison # Date 2015-06-20 15:07:36 # Node ID 0f44d35731d69937c98ad9e1368cb6bd2ca6d029 # Parent 015c0d1087a327de9b1b9cc2cb17b9d129ebabf8 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. diff --git a/mercurial/fileset.py b/mercurial/fileset.py --- a/mercurial/fileset.py +++ b/mercurial/fileset.py @@ -189,7 +189,11 @@ def clean(mctx, x): 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: