Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/fileset.py @ 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 | ad1d2c952889 |
children | af329a84310c |
comparison
equal
deleted
inserted
replaced
25632:015c0d1087a3 | 25633:0f44d35731d6 |
---|---|
187 return [f for f in mctx.subset if f in s] | 187 return [f for f in mctx.subset if f in s] |
188 | 188 |
189 def func(mctx, a, b): | 189 def func(mctx, a, b): |
190 if a[0] == 'symbol' and a[1] in symbols: | 190 if a[0] == 'symbol' and a[1] in symbols: |
191 return symbols[a[1]](mctx, b) | 191 return symbols[a[1]](mctx, b) |
192 raise error.UnknownIdentifier(a[1], symbols.keys()) | 192 |
193 keep = lambda fn: getattr(fn, '__doc__', None) is not None | |
194 | |
195 syms = [s for (s, fn) in symbols.items() if keep(fn)] | |
196 raise error.UnknownIdentifier(a[1], syms) | |
193 | 197 |
194 def getlist(x): | 198 def getlist(x): |
195 if not x: | 199 if not x: |
196 return [] | 200 return [] |
197 if x[0] == 'list': | 201 if x[0] == 'list': |