patchbomb: use procutil.shellquote() instead of shlex to escape email address
This basically backs out
2cc453284d5c, and inserts procutil.shellquote()
instead. I don't care about Windows compatibility here, but shlex.quote()
can't handle byte strings on Python 3.
formatting: introduce a `test-check-format-black.t` that enforce formatting
This should prevent use to drift away from the expect format.
formatting: run black on all file again
Apparently, since the blackgnarok, we divergence from the expected formatting.
Formatted using::
grey.py -S $(hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**" - hgext/fsmonitor/pywatchman/** - contrib/grey.py')
# skip-blame mass-reformatting only
# no-check-commit reformats foo_bar functions
formatting: make black --quiet in the example `hg fix` config
I do like cake, but I cannot have so many of them.
formatting: remove the data-ogre from the config example
Without he final `-`, black ignore the stdin and just looks at file provided as
command line argument.
Since `hg fix` feeds the file content through stdin and does not pass file
argument, this meant black happily exited successful (all files passed as
argument were formatted) without any output. Fix picked this "no output" as the
new file content, deleting all previous content.
I appreciate the fact this effectively removed all buggy code in any files
processing that way, but this also ate all my data.
The example config is now fixed in that regards.
py3: stop normalizing .encode()/.decode() arguments to unicode
Now that we don't byte transform string literals, we no longer need
this transform.
While we're here, we also drop some superfluous u'' prefix in existing
callers.
Differential Revision: https://phab.mercurial-scm.org/D7011
py3: manually import pycompat.delattr where it is needed
And with this change, we no longer need the auto-inserted import statement
in the source transformer, so it has been removed!
Differential Revision: https://phab.mercurial-scm.org/D7010