exchange: convert bookmark nodes from hex to bin ASAP
Differential Revision: https://phab.mercurial-scm.org/D6831
exchange: avoid unnecessary conversion of bookmark nodes to hex (API)
Differential Revision: https://phab.mercurial-scm.org/D6830
highlight: fix encoding issues to enable Py3 compatibility
This commit fixes various encoding issues with the `highlight` extension
to enable compatibility with Python 3. Python `.encode()` and `.decode()`
requires the target encoding to be passed as a `str`, so the value of
`mercurial.encoding.encoding` must be converted before passing to the
function. Pygments also assumes the `str` type for values it works with,
so we must perform conversions before and after receiving values from its
APIs.
After applying this patch, `test-highlight.t` passes under Python 3. We
add it to `python3-whitelist` as well.
Tested with Pygments 2.4.2.
Differential Revision: https://phab.mercurial-scm.org/D6832
hgweb: add a `message` attribute to `hgweb.common.ErrorResponse`
This fixes a Python 3 bug where hgweb assumes an Exception
subclass will have a `.message` attribute after running
`Exception.__init__`.[1] The Python 3 way to get this info would
be `e.args[0]`, but adding a new named attribute is more
ergonomic in my view.
[1] https://www.mercurial-scm.org/repo/hg-committed/file/
6ccf539aec71/mercurial/hgweb/hgwebdir_mod.py#l459
Differential Revision: https://phab.mercurial-scm.org/D6840
uncommit: make -D/--date and -U/--user mutually exclusive
This is how amend and graft work (but not MQ). I'm not sure why this didn't
work for me when I first tried it.
Differential Revision: https://phab.mercurial-scm.org/D6842
uncommit: drop the hyphen from --current-user and --current-date
I didn't pay enough attention to these long forms- graft, amend and MQ already
use the old style naming. It's probably more important to be consistent than
modern. The hypenated style came from evolve.
Yuya mentioned this naming discrepancy in
4145fd3569c3, but it didn't attract
any discussion[1]. There's also a bit of inconsistency in that the default
parameter for `currentdate` is `False` for graft, and `None` for the rest.
[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2019-January/126767.html
Differential Revision: https://phab.mercurial-scm.org/D6841