fuzz: extract Python initialization to utility package
Avoids code duplication between fuzzers of parsers.so.
Differential Revision: https://phab.mercurial-scm.org/D5461
fuzz: remove probably-wrong -fsanitize from fuzzutil.o rule
Differential Revision: https://phab.mercurial-scm.org/D5460
parsers: remove long-dead parse_manifest method
We haven't used this in years, I think it's fine to ditch it now. We
had previously kept it around to ease bisecting with built extensions,
but these days we've got a better versioning scheme anyway. Noticed
this method kicking around while looking in parsers.so for likely
fuzzing targets.
Differential Revision: https://phab.mercurial-scm.org/D5459
help: hide default value for default-off flags
If we no longer show the "[no-]" for default-off flags, it also seems
unnecessary to show the "default: off" for them, since that's quite
clearly the default. It's extra confusing for action flags like `hg
bookmarks --delete`.
Differential Revision: https://phab.mercurial-scm.org/D5455
help: show "[no-]" only for default-on Flags
As Anton (av6) pointed out, the "[no-]" is confusing for action flags
like `hg bookmark --delete`. We could come up with a way of indicating
which flags are action flags (e.g. use None for the default value
instead of False). However, it's probably also unlikely that users
will want to negate even non-action flags like --hidden.
One of the more common flags where the "[no-]" prefix would be useful
is `hg evolve --update`. The reason it's helpful there is that it
defaults to on. So I think we can simply include "[no-]" only for
flags that are on by default (and thus require the user to add the
"[no-]" for the option to have any effect).
Note that there are use cases for negating flags that already off by
default. For example, you may have an alias for `hg log -G --hidden -T
foo` and now want to pass "--no-hidden" to that alias. However, I
think that users who want that are likely to be advanced enough that
they've already learnt about the "no-" prefix by seeing it somewhere
else.
Differential Revision: https://phab.mercurial-scm.org/D5454
shelve: drop unnecessary backup of narrowspec
I mechanically added the backup code everywhere in
ad24b581e4d9
(narrow: call narrowspec.{save,restore,clear}backup directly,
2018-08-03), but I can't think of a reason it would be needed in the
shelve code, so let's drop it.
Differential Revision: https://phab.mercurial-scm.org/D5457
shelve: pass transaction around to clarify where it's used
Differential Revision: https://phab.mercurial-scm.org/D5456
py3: byteify docchecker
The exception is printed as str because I'm too lazy to convert it and the
pieces.
py3: byteify gendoc.py
This is mostly b'' prefixing, with some cargoculting of help.py to get around
`textwrap.dedent()` and __doc__ string requirements.