##// END OF EJS Templates
revset: don't suggest private or undocumented queries...
Matt Harbison -
r25632:015c0d10 default
parent child Browse files
Show More
@@ -391,7 +391,11 b' def listset(repo, subset, a, b):'
391 def func(repo, subset, a, b):
391 def func(repo, subset, a, b):
392 if a[0] == 'symbol' and a[1] in symbols:
392 if a[0] == 'symbol' and a[1] in symbols:
393 return symbols[a[1]](repo, subset, b)
393 return symbols[a[1]](repo, subset, b)
394 raise error.UnknownIdentifier(a[1], symbols.keys())
394
395 keep = lambda fn: getattr(fn, '__doc__', None) is not None
396
397 syms = [s for (s, fn) in symbols.items() if keep(fn)]
398 raise error.UnknownIdentifier(a[1], syms)
395
399
396 # functions
400 # functions
397
401
@@ -1334,6 +1334,17 b' Bogus function gets suggestions'
1334 hg: parse error: unknown identifier: babar
1334 hg: parse error: unknown identifier: babar
1335 [255]
1335 [255]
1336
1336
1337 Bogus function with a similar internal name doesn't suggest the internal name
1338 $ log 'matches()'
1339 hg: parse error: unknown identifier: matches
1340 (did you mean 'matching'?)
1341 [255]
1342
1343 Undocumented functions aren't suggested as similar either
1344 $ log 'wdir2()'
1345 hg: parse error: unknown identifier: wdir2
1346 [255]
1347
1337 multiple revspecs
1348 multiple revspecs
1338
1349
1339 $ hg log -r 'tip~1:tip' -r 'tip~2:tip~1' --template '{rev}\n'
1350 $ hg log -r 'tip~1:tip' -r 'tip~2:tip~1' --template '{rev}\n'
General Comments 0
You need to be logged in to leave comments. Login now