Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 15:38:36 -0800] rev 48365
errors: use detailed exit code for non-integer number of diff context lines
Differential Revision: https://phab.mercurial-scm.org/D11826
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 09:17:30 -0800] rev 48364
patch: add hint about mangled whitespace on bad patch
One of the most common reasons that a patch doesn't apply is because
its whitespace has been mangled (e.g. by their mail client or though
copy&paste). Let's provide a hint about that.
Differential Revision: https://phab.mercurial-scm.org/D11825
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 12:57:53 -0800] rev 48363
errors: return more detailed errors when failing to parse or apply patch
This patch adds subclasses of `PatchError` so we can distinguish
between failure to parse a patch from failure to apply it. It updates
the callers to raise either `InputError` or `StateError` depending on
which type of error occurred.
Differential Revision: https://phab.mercurial-scm.org/D11824
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 Nov 2021 17:22:14 +0100] rev 48362
extensions: add a default "*" suboptions prefix
This is similar to what we do in other section (e.g. `paths`) and allow to
change the behavior for all extensions.
Sub options on individual extensions overwrite the default settings.
Differential Revision: https://phab.mercurial-scm.org/D11823
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 Nov 2021 17:17:49 +0100] rev 48361
extension: add a `required` suboption to enforce the use of an extensions
If `required` is set, failing to load an extensions will abort. See the test
and documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11822
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 Nov 2021 13:09:04 +0100] rev 48360
extensions: highlight the name of the faulty extensions in the error message
This make it easier to understand the message when the extensions name is
common.
Differential Revision: https://phab.mercurial-scm.org/D11821
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 Nov 2021 16:55:34 +0100] rev 48359
extensions: refactor handling of loading error make it reusable
We will need this in the next patch.
Differential Revision: https://phab.mercurial-scm.org/D11820
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 Nov 2021 16:51:58 +0100] rev 48358
extensions: ignore "sub-options" when looking for extensions
config suboptions are separated by ":" (see the path one for example). So we
dont want to confuse these config with actual extensions.
We don't have extensions sub option yet, but I am about to introduce one for
making sure an extensions can load. So lets level the floor first.
Differential Revision: https://phab.mercurial-scm.org/D11819
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 23 Nov 2021 17:52:38 -0800] rev 48357
automation: support Python 3.10 on Windows
Python 3.10 is out and we should support it. This commit teaches the
automation code to install and support building for Python 3.10.
Differential Revision: https://phab.mercurial-scm.org/D11776
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 15 Nov 2021 20:10:50 -0800] rev 48356
contrib: update Windows environment to Python 3.9.9
Let's keep the environment modern.
Differential Revision: https://phab.mercurial-scm.org/D11775
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 29 Nov 2021 14:07:47 +0000] rev 48355
rhg: implement the debugignorerhg subcommand
This can be used to inspect the generated pattern, but also to benchmark
the time it takes to parse hgignore.
Differential Revision: https://phab.mercurial-scm.org/D11722
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 29 Nov 2021 14:06:41 +0000] rev 48354
rhg: refactor to use IgnoreFnType alias more widely
Differential Revision: https://phab.mercurial-scm.org/D11818
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 11 Nov 2021 14:26:25 +0000] rev 48353
rhg: only complain about poorly configured fallback when falling back
Differential Revision: https://phab.mercurial-scm.org/D11751
Matt Harbison <matt_harbison@yahoo.com> [Wed, 24 Nov 2021 20:51:01 -0500] rev 48352
packaging: bump pygit2 to 1.7.1
Differential Revision: https://phab.mercurial-scm.org/D11805
Matt Harbison <matt_harbison@yahoo.com> [Wed, 24 Nov 2021 20:45:27 -0500] rev 48351
packaging: bump windows_curses to 2.3.0
This is required for Python 3.10 support.
Differential Revision: https://phab.mercurial-scm.org/D11804
Matt Harbison <matt_harbison@yahoo.com> [Wed, 24 Nov 2021 20:43:05 -0500] rev 48350
packaging: regenerate the requirements files with pip-tools 6.4.0
Somewhere along the line, the formatting changed. There's no change in package
content here- it's just some minor text changes. Py2 doesn't have any packages
we'll be updating, so I'm not bothering there.
Differential Revision: https://phab.mercurial-scm.org/D11803
Simon Sapin <simon.sapin@octobus.net> [Fri, 26 Nov 2021 15:59:09 +0100] rev 48349
rhg: Add support for `rhg status -n`
The `RHG_STATUS=1` bit added here can be removed when `unset RHG_STATUS` near
the top of the file is removed.
Differential Revision: https://phab.mercurial-scm.org/D11815
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 18:48:34 -0800] rev 48348
filemerge: simplify slightly by using filectx.decodeddata()
Differential Revision: https://phab.mercurial-scm.org/D11802
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 18:14:25 -0800] rev 48347
filemerge: rename _formatconflictmarker() since it formats a label
`_formatconflictmarker()`'s name made me think that it would create
something like `<<<<<<<` and maybe some more stuff after it, but it's
actually just the label that comes after on the same line. So let's
rename it to `_formatlabel()`. That's better aligned with the
variables the result is assigned it.
Differential Revision: https://phab.mercurial-scm.org/D11801
Thomas Klausner <wiz@gatalith.at> [Sun, 28 Nov 2021 11:27:08 +0100] rev 48346
tests: fix test-fix on NetBSD
Differential Revision: https://phab.mercurial-scm.org/D11816
Simon Sapin <simon.sapin@octobus.net> [Tue, 23 Nov 2021 20:04:22 +0100] rev 48345
rhg: Fix status desambiguation of symlinks and executable files
Differential Revision: https://phab.mercurial-scm.org/D11774
Simon Sapin <simon.sapin@octobus.net> [Tue, 23 Nov 2021 19:40:29 +0100] rev 48344
rhg: Rename cat_file_is_modified
It hasn’t been based on the "cat operation" for some time already.
Differential Revision: https://phab.mercurial-scm.org/D11773
Simon Sapin <simon.sapin@octobus.net> [Tue, 23 Nov 2021 19:39:51 +0100] rev 48343
rhg: Also parse flags in the manifest parser
Differential Revision: https://phab.mercurial-scm.org/D11772
Simon Sapin <simon.sapin@octobus.net> [Tue, 23 Nov 2021 18:27:42 +0100] rev 48342
rhg: Propogate manifest parse errors instead of panicking
The Rust parser for the manifest file format is an iterator. Now every item
from that iterator is a `Result`, which makes error handling required
in multiple new places.
This makes better recovery on errors possible, compare to a run time panic.
Differential Revision: https://phab.mercurial-scm.org/D11771
Simon Sapin <simon.sapin@octobus.net> [Fri, 19 Nov 2021 17:34:48 +0100] rev 48341
tests: Adapt test-basic.t expected output for rhg
Differential Revision: https://phab.mercurial-scm.org/D11769
Simon Sapin <simon.sapin@octobus.net> [Tue, 09 Nov 2021 19:28:13 +0100] rev 48340
rhg: Colored output is not supported
Fallback if it is requested explicitly.
The default is documented as use color "whenever it seems possible".
rhg proceeds without color in that case.
Differential Revision: https://phab.mercurial-scm.org/D11762
Simon Sapin <simon.sapin@octobus.net> [Tue, 09 Nov 2021 19:09:57 +0100] rev 48339
rhg: [encode] and [decode] config sections are not supported
Differential Revision: https://phab.mercurial-scm.org/D11761
Simon Sapin <simon.sapin@octobus.net> [Tue, 09 Nov 2021 18:56:55 +0100] rev 48338
rhg: Config commands.status.terse is not supported
Differential Revision: https://phab.mercurial-scm.org/D11760
Simon Sapin <simon.sapin@octobus.net> [Tue, 09 Nov 2021 18:39:37 +0100] rev 48337
rhg: Propagate config errors in `rhg status`
This code was calling `Result::unwrap_or` instead of `Option::unwrap_or`
as was presumably intended.
Differential Revision: https://phab.mercurial-scm.org/D11759
Simon Sapin <simon.sapin@octobus.net> [Tue, 09 Nov 2021 17:09:40 +0100] rev 48336
rhg: $HG_PENDING is not supported
Trigger fallback in that case, if configured to do so.
Differential Revision: https://phab.mercurial-scm.org/D11758