Mercurial > hg-stable
diff tests/test-revset.t @ 25632:015c0d1087a3
revset: don't suggest private or undocumented queries
I noticed when I mistyped 'matching', that it suggested '_matchfiles' as well.
Rather than simply exclude names that start with '_', this excludes anything
without a docstring. That way, if it isn't in the help text, it isn't
suggested, such as 'wdir()'.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 20 Jun 2015 10:59:56 -0400 |
parents | a26a55406c0a |
children | 70a2082f855a |
line wrap: on
line diff
--- a/tests/test-revset.t Thu Jun 18 15:42:40 2015 -0500 +++ b/tests/test-revset.t Sat Jun 20 10:59:56 2015 -0400 @@ -1334,6 +1334,17 @@ hg: parse error: unknown identifier: babar [255] +Bogus function with a similar internal name doesn't suggest the internal name + $ log 'matches()' + hg: parse error: unknown identifier: matches + (did you mean 'matching'?) + [255] + +Undocumented functions aren't suggested as similar either + $ log 'wdir2()' + hg: parse error: unknown identifier: wdir2 + [255] + multiple revspecs $ hg log -r 'tip~1:tip' -r 'tip~2:tip~1' --template '{rev}\n'