Commit Graph

8 Commits

Author SHA1 Message Date
Jun Wu
b04dda41f1 hint: point people to gitignore QA page
Summary:
As requested by https://fburl.com/qw620t12.

Didn't add another option to make the message configurable as it'll eventually
be removed.

Reviewed By: singhsrb

Differential Revision: D9405366

fbshipit-source-id: 1aef69b4d01be976c3c4465cd542642e586599ca
2018-08-20 13:51:32 -07:00
Jun Wu
79ce2d436f hgignore: show hgignore deprecation hint
Summary: This makes it cleaner that we're migrating to gitignore.

Reviewed By: DurhamG

Differential Revision: D9232209

fbshipit-source-id: a1accdb1935f553fd2e52b6367219860b62c9cec
2018-08-08 17:06:11 -07:00
Jun Wu
190087e4a2 hint: pick the user config file that exists
Summary:
When running `hg hint --ack ...`, pick the file that exists to write,
instead of using the first default one.

Reviewed By: singhsrb

Differential Revision: D8230173

fbshipit-source-id: 90375653ffa16cfbf77eed4f967b5250b649a532
2018-05-31 20:16:07 -07:00
Jun Wu
584656dff3 codemod: join the auto-formatter party
Summary:
Turned on the auto formatter. Ran `arc lint --apply-patches --take BLACK **/*.py`.
Then run `arc lint` again so some other autofixers like spellchecker etc. looked
at the code base. Manually accept the changes whenever they make sense, or use
a workaround (ex. changing "dict()" to "dict constructor") where autofix is false
positive. Disabled linters on files that are hard (i18n/polib.py) to fix, or less
interesting to fix (hgsubversion tests), or cannot be fixed without breaking
OSS build (FBPYTHON4).

Conflicted linters (test-check-module-imports.t, part of test-check-code.t,
test-check-pyflakes.t) are removed or disabled.

Duplicated linters (test-check-pyflakes.t, test-check-pylint.t) are removed.

An issue of the auto-formatter is lines are no longer guarnateed to be <= 80
chars. But that seems less important comparing with the benefit auto-formatter
provides.

As we're here, also remove test-check-py3-compat.t, as it is currently broken
if `PYTHON3=/bin/python3` is set.

Reviewed By: wez, phillco, simpkins, pkaush, singhsrb

Differential Revision: D8173629

fbshipit-source-id: 90e248ae0c5e6eaadbe25520a6ee42d32005621b
2018-05-25 22:17:29 -07:00
Mark Thomas
d1b5faa3ac hint: allow hints to be defined and triggered in config
Summary:
Add a new config section, `[hint-definitions]` that describes additional hint
messages.  This can also be used to override built-in hint definitions.

Add a new template function `triggerhint(name)` that triggers the given hint.

Reviewed By: quark-zju

Differential Revision: D8056847

fbshipit-source-id: 5ffc945343133eb635ae0820190ecad9f16bc731
2018-05-18 11:19:35 -07:00
Jun Wu
29ea02db78 hint: silence all hints by HGPLAIN=hint
Summary: `HGPLAIN` could specify features. Let's use it.

Reviewed By: farnz

Differential Revision: D7639140

fbshipit-source-id: 5e9215221a8eb6a6a14f2eaba326c19feb114811
2018-04-16 10:35:15 -07:00
Jun Wu
0252fce55c hint: add a command to silence hints
Summary:
This allows people to silence hints as they like. It's done by modifying
user hgrc.

Reviewed By: markbt

Differential Revision: D7392133

fbshipit-source-id: 1365294217db92dfb3a0c81332a9fefd164795d4
2018-04-13 21:51:49 -07:00
Jun Wu
14783221f6 hint: add a simple framework for registering hint messages
Summary:
This allows us to have a unified way to print hint messages at the end of a
command. It would be helpful for feature discovery in general.

Reviewed By: mjpieters

Differential Revision: D7392132

fbshipit-source-id: 8b4e94cc2176266652459ecca3428bd86d95bfe2
2018-04-13 21:51:48 -07:00