Simon Sapin <simon.sapin@octobus.net> [Tue, 12 Oct 2021 15:29:05 +0200] rev 48190
dirstate-v2: Only convert from SystemTime to Timestamp and not back
Converting from Timestamp back to SystemTime was only used for equality
comparison, but this can also be done on Timestamp values.
Differential Revision: https://phab.mercurial-scm.org/D11631
Simon Sapin <simon.sapin@octobus.net> [Fri, 08 Oct 2021 12:57:24 +0200] rev 48189
dirstate-v2: Swap the order of size and mtime on disk
This makes the dirstate-v2 file format match dirstate-v1 for the order of
`mode`, `size`, and `mtime`. This order does not matter as long as these
components are handled through named fields/attributes in code, but in a few
places we still have tuples so having the same order everywhere might help
avoid a bug that might not be obvious since those components have the same type.
Differential Revision: https://phab.mercurial-scm.org/D11620
Simon Sapin <simon.sapin@octobus.net> [Mon, 11 Oct 2021 18:23:17 +0200] rev 48188
dirstate-v2: Document flags/mode/size/mtime fields of tree nodes
This file format modification was previously left incomplete because of
planned upcoming changes. Not all of these changes have been made yet,
but documenting what exists today will help talking more widely about it.
Differential Revision: https://phab.mercurial-scm.org/D11625
Raphaël Gomès <rgomes@octobus.net> [Wed, 08 Sep 2021 10:47:10 +0200] rev 48187
help: update help text for debug-repair-
issue6528
The changegroup fix was put in 5.9.1, this is now out of date. Alson, this can
maybe encourage people to upgrade?
Differential Revision: https://phab.mercurial-scm.org/D11392
Martin von Zweigbergk <martinvonz@google.com> [Tue, 02 Mar 2021 09:33:25 -0800] rev 48186
dispatch: use detailed exit code 250 for keyboard interrupt
Among our users at Google, we're still seeing several percent of
commands fail with exit code 255. I suspect keyboard interrupts is an
important remaining reason.
This is a resend of D10086 with some fixes for pager handling added
ahead of it.
Differential Revision: https://phab.mercurial-scm.org/D11628
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Oct 2021 13:36:02 -0700] rev 48185
dispatch: ignore failure to flush ui
When the pager dies, we get a `SIGPIPE`. That causes
`error.SignalInterrupt` to be raised ` (from `ui._catchterm()`). Any
further writes or flushes will cause further `SIGPIPE`s and furhter
`error.SignalInterrupt`. If we write or flush outside of the
try/except that handle `KeyboardInterrupt` (which
`error.SignalInterrupt` is a subclass of), then control will escape
from the `dispatch` module. Let's fix that by ignoring errors from
flushing the ui.
I would have rather fixed this by restoring the stdout and stderr
streams when the pager dies, but it gets complicated because of
multiple ui instances (ui/lui) and different pager setups between
regular hg and chg.
This changes a test in `test-pager.t`, but I don't understand why. I
would have thought that all the output from the command should have
gone to the broken pager.
Differential Revision: https://phab.mercurial-scm.org/D11627
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Oct 2021 13:34:33 -0700] rev 48184
dispatch: don't change error status if flushing stdio fails
If we already have a non-zero exit code, I don't think we should
change it to 255 because we fail to flush stdio. This may not matter
yet, but it will matter when I make a killed pager result in exit code
250 (it's currently 255).
Differential Revision: https://phab.mercurial-scm.org/D11626
Simon Sapin <simon.sapin@octobus.net> [Mon, 11 Oct 2021 17:31:27 +0200] rev 48183
dirstate-v2: Use "byte sequence" in docs
The patch originally sent as https://phab.mercurial-scm.org/D11546
used "byte string" but that was changed during review to avoid suggesting
Unicode or character encodings.
However "byte range" sounds to be like a range of *indices* within a byte
string/sequence elsewhere.
This changes to "byte sequence". Python docs use "sequence" a lot when
discussing the `bytes` type: https://docs.python.org/3/library/stdtypes.html
Differential Revision: https://phab.mercurial-scm.org/D11623
Simon Sapin <simon.sapin@octobus.net> [Fri, 08 Oct 2021 11:06:03 +0200] rev 48182
rust: Make the hg-cpython crate default to Python 3
This default is used when running `cargo` manually such as for `cargo test`.
`setup.py` and `Makefile` both configure the Python major version explicitly.
Differential Revision: https://phab.mercurial-scm.org/D11618
Matt Harbison <matt_harbison@yahoo.com> [Sun, 03 Oct 2021 20:11:42 -0400] rev 48181
packaging: update the certifi dependency
Not sure if this helps with recent certificate issues[1], but we might as well
keep this modern.
Note that certifi no longer claims py2 support, and there's a PR to add it back
in[2]. Py2 support was dropped in 2020.04.05.2 (which predates what's being
updated here). None of the *.py files have changed since the 2020.6.20 release,
and I was able to call `certifi.where()` in both a virtualenv and with
`hg debugshell` from an MSI install with this version, so we shouldn't be any
worse off than before.
[1] https://foss.heptapod.net/mercurial/tortoisehg/thg/-/issues/5745
[2] https://github.com/certifi/python-certifi/pull/154
Differential Revision: https://phab.mercurial-scm.org/D11609