Joerg Sonnenberger <joerg@bec.de> [Wed, 27 Jan 2021 01:43:17 +0100] rev 46508
revlog: change addrevision to return the new revision, not node
Differential Revision: https://phab.mercurial-scm.org/D9882
Joerg Sonnenberger <joerg@bec.de> [Wed, 27 Jan 2021 00:55:20 +0100] rev 46507
revlog: change addrawrevision to return the revision
Differential Revision: https://phab.mercurial-scm.org/D9881
Joerg Sonnenberger <joerg@bec.de> [Tue, 26 Jan 2021 23:56:11 +0100] rev 46506
revlog: change _addrevision to return the new revision
The node is passed as argument already, so returning it is quite
pointless. The revision number on the other is useful as it decouples
the caller from the revlog internals.
Differential Revision: https://phab.mercurial-scm.org/D9880
Simon Sapin <simon.sapin@octobus.net> [Mon, 08 Feb 2021 23:41:58 +0100] rev 46505
rhg: add limited support for the `config` sub-command
Only with one argument and no flag. This is mostly for testing.
Differential Revision: https://phab.mercurial-scm.org/D9972
Simon Sapin <simon.sapin@octobus.net> [Mon, 08 Feb 2021 23:08:44 +0100] rev 46504
rhg: Add support for --config CLI arguments
Differential Revision: https://phab.mercurial-scm.org/D9971
Simon Sapin <simon.sapin@octobus.net> [Mon, 08 Feb 2021 21:37:30 +0100] rev 46503
rhg: Add support for -R and --repository command-line arguments
Differential Revision: https://phab.mercurial-scm.org/D9970
Simon Sapin <simon.sapin@octobus.net> [Mon, 08 Feb 2021 21:28:52 +0100] rev 46502
rhg: Replace subcommand boilerplate with a macro
This removes some repetition, and will avoid additional repetition
in the next commit.
Differential Revision: https://phab.mercurial-scm.org/D9969
Simon Sapin <simon.sapin@octobus.net> [Mon, 08 Feb 2021 21:05:36 +0100] rev 46501
rhg: Move subcommand CLI arguments definitions to respective modules
Differential Revision: https://phab.mercurial-scm.org/D9968
Simon Sapin <simon.sapin@octobus.net> [Mon, 08 Feb 2021 20:33:04 +0100] rev 46500
rhg: replace command structs with functions
The `Command` trait was not used in any generic context,
and the struct where nothing more than holders for values parsed from CLI
arguments to be available to a `run` method.
Differential Revision: https://phab.mercurial-scm.org/D9967
Simon Sapin <simon.sapin@octobus.net> [Mon, 08 Feb 2021 11:13:56 +0100] rev 46499
rust: Use the DisplayBytes trait in config printing
This is similar to `std::fmt::Display`, but for arbitrary bytes instead
of Unicode. Writing to an abstract output stream helps avoid allocating
intermediate `Vec<u8>` buffers.
Differential Revision: https://phab.mercurial-scm.org/D9966
Martin von Zweigbergk <martinvonz@google.com> [Thu, 04 Feb 2021 13:32:11 -0800] rev 46498
log: respect diff.merge in -p output
Differential Revision: https://phab.mercurial-scm.org/D9958
Martin von Zweigbergk <martinvonz@google.com> [Thu, 04 Feb 2021 13:21:01 -0800] rev 46497
diff: extract function for getting possibly re-merged parent to diff against
We'll want to reuse the logic that `hg diff --change` with
`diff.merge` uses. At least `hg log -p` should reuse it. This patch
therefore extracts that code to a function.
Differential Revision: https://phab.mercurial-scm.org/D9957
Martin von Zweigbergk <martinvonz@google.com> [Thu, 04 Feb 2021 13:05:51 -0800] rev 46496
diff: replace --merge option by config option
I can't think of any reason you'd want to enable the merge diff on a
run-to-run basis; you'd probably either always or never want it set
(though I can't see why you'd never want it set). If you have it set,
you'll probably also want the same output in `hg log -p`
output. Having a single config option for the feature makes sense.
Differential Revision: https://phab.mercurial-scm.org/D9956
Matt Harbison <matt_harbison@yahoo.com> [Thu, 24 Dec 2020 11:21:23 -0500] rev 46495
tagcache: distinguish between invalid and missing entries
The TortoiseHg repo has typically not had a newly applied tag accessible by name
for recent releases, for unknown reasons. Deleting and rebuilding the tag cache
doesn't fix it, though deleting the cache and running `hg log -r $new_tag` does.
Eventually the situation does sort itself out for new clones from the server.
In an effort to figure out what the issue is, Pierre-Yves David suggested
listing these entries in the debug output more specifically.
This isn't complete yet- the second test change that says "missing" is more like
"invalid", since it was truncated. The problem there is the code that reads the
raw array truncates any partial records and then fills it with 0xFF, which
signifies that it is missing. As a side note, that means the check for the
length when validating an existing entry never fails.
Differential Revision: https://phab.mercurial-scm.org/D9811
Martin von Zweigbergk <martinvonz@google.com> [Thu, 11 Feb 2021 20:36:46 -0800] rev 46494
branching: merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 10 Feb 2021 23:03:54 +0100] rev 46493
hooks: add a `auto` value for `hooks.*run-with-plain`
That setting restore the behavior pre-5.6. The current HGPLAIN value is simply
passed to the hooks.
This allow user who needs it to fully mitigate the behavior change introduced
in Mercurial 5.7 by restoring the older behavior.
Differential Revision: https://phab.mercurial-scm.org/D9982
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 10 Feb 2021 23:21:21 +0100] rev 46492
hooks: introduce a `:run-with-plain` option for hooks
This option control if HGPLAIN should be set or not for the hooks. This is the
first step to give user some control of the HGPLAIN setting for they hooks.
Some hooks (eg: consistency checking) deserve to be run with HGPLAIN, some other
(eg: user set visual helper) might need to respect the user config and setting.
So both usage are valid and we need to restore the ability to run -without-
HGPLAIN that got lost in Mercurial 5.7.
This does not offer a way to restore the pre-5.7 behavior yet (respect whatever
HGPLAIN setting from the shell), this will be dealt with in the next changeset.
The option name is a bit verbose because implementing this highlighs the need
for another option: `:run-if-plain`. That would make it possible for some hooks
to be easily disabled if HG PLAIN is set. However such option would be a new
feature, not something introduced to mitigate a behavior change introduced in
5.7, so the `:run-if-plain` option belong to the default branch and is not part
of this series.
Differential Revision: https://phab.mercurial-scm.org/D9981
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 10 Feb 2021 22:43:16 +0100] rev 46491
hooks: add some test about HGPLAIN setting and hooks
In Mercurial 5.7, hooks are now ran with HGPLAIN set, which is a behavior change
in. I could not find explicit test about it so I am adding one. The next
changesets will introduce more change to help user mitigate the behavior change
when needed.
Differential Revision: https://phab.mercurial-scm.org/D9979
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 10 Feb 2021 21:05:05 +0100] rev 46490
hooks: forbid ':' in hook name
The `:` character is a special separator in the config and it seems same do to
the same for hooks. This is necessary to improve the experience around the
HGPLAIN behavior change in 5.7. See next changesets for details.
Differential Revision: https://phab.mercurial-scm.org/D9978
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Feb 2021 21:46:29 +0100] rev 46489
rust-status: honor matcher when using the dirstate-only fast-path (
issue6483)
Differential Revision: https://phab.mercurial-scm.org/D9977
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Feb 2021 22:01:23 +0100] rev 46488
status: add test that shows that the Rust implementation has a bug
Differential Revision: https://phab.mercurial-scm.org/D9976
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 10 Feb 2021 19:23:56 +0100] rev 46487
tweak-default: no longer enable the experimental return code
The change is quite new and undocumented (since it is experimental) so it seems
premature to make it available in tweak default. In addition, I am not sure the
new return code are frozen yet (eg: some of the initial feedback have not been
incorporated). Before the release I doubled check (probably with Martin) that
they were not enabled by default and got replied that they were only enabled in
the tests. Have I been aware that they have been also enabled in tweak default I
would I have lobbied to delay that.
I discovered they were in tweak default from users feedback. They found it an
unpleasant and unexpected surprise of 5.7.
So I suggest we no enable enable this experimental feature for Mercurial 5.7 and
revisit this later, when the feature will be more mature.
Differential Revision: https://phab.mercurial-scm.org/D9975
Simon Sapin <simon.sapin@octobus.net> [Thu, 04 Feb 2021 15:04:53 +0100] rev 46486
rhg: Parse per-repository configuration
Differential Revision: https://phab.mercurial-scm.org/D9964
Simon Sapin <simon.sapin@octobus.net> [Thu, 04 Feb 2021 14:29:47 +0100] rev 46485
rhg: Abort based on config on share-safe mismatch
Differential Revision: https://phab.mercurial-scm.org/D9963
Simon Sapin <simon.sapin@octobus.net> [Thu, 04 Feb 2021 13:17:55 +0100] rev 46484
rhg: Parse system and user configuration at program start
… and pass it around up to `Repo::find`
Differential Revision: https://phab.mercurial-scm.org/D9962
Simon Sapin <simon.sapin@octobus.net> [Thu, 04 Feb 2021 13:16:21 +0100] rev 46483
rust: Parse system and user configuration
CLI `--config` argument parsing is still missing, as is per-repo config
Differential Revision: https://phab.mercurial-scm.org/D9961
Simon Sapin <simon.sapin@octobus.net> [Mon, 01 Feb 2021 13:32:00 +0100] rev 46482
rust: Remove unnecessary check for absolute path before joining
`Path::join` does the right thing if its argument is absolute.
Differential Revision: https://phab.mercurial-scm.org/D9960
Simon Sapin <simon.sapin@octobus.net> [Mon, 01 Feb 2021 12:25:53 +0100] rev 46481
rust: replace read_whole_file with std::fs::read
It does the same thing
Differential Revision: https://phab.mercurial-scm.org/D9959
Martin von Zweigbergk <martinvonz@google.com> [Tue, 09 Feb 2021 09:37:39 -0800] rev 46480
wireprotopeer: clarify some variable names now that we allow snake_case
"encargsorres" is hard to parse ("encarg sorres" sounds like it might
be Spanish to me, and indeed Google Translate tells me that it's
Catalan for "order sands"). Let's clarify with some added underscores
and longer names.
Differential Revision: https://phab.mercurial-scm.org/D9973
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 02 Feb 2021 07:02:25 +0100] rev 46479
copy-tracing: add a --compute flag to debugchangedfiles
This will help analysis of possible misbehaving cases.
Differential Revision: https://phab.mercurial-scm.org/D9946