Martin von Zweigbergk <martinvonz@google.com> [Fri, 29 Jan 2021 10:32:19 -0800] rev 46452
relnotes: copy "next" to "5.7" and clear "next"
The same procedure as every year^Wcycle.
Differential Revision: https://phab.mercurial-scm.org/D9909
Matt Harbison <matt_harbison@yahoo.com> [Mon, 01 Feb 2021 15:37:03 -0500] rev 46451
relnotes: elaborate on the side effects of hooks having HGPLAIN=1
Differential Revision: https://phab.mercurial-scm.org/D9943
Matt Harbison <matt_harbison@yahoo.com> [Sun, 31 Jan 2021 19:56:52 -0500] rev 46450
packaging: replace a documentation reference to `python3` on Windows
Sadly, there's not `python3.exe` on Windows.
Differential Revision: https://phab.mercurial-scm.org/D9937
Augie Fackler <augie@google.com> [Mon, 01 Feb 2021 11:57:18 -0500] rev 46449
diff: suppress `merging foo` output lines when performing a merge diff
Differential Revision: https://phab.mercurial-scm.org/D9939
Augie Fackler <augie@google.com> [Thu, 07 May 2020 16:50:26 -0400] rev 46448
diff: add experimental support for "merge diffs"
The way this works is it re-runs the merge and "stores" conflicts, and then
diffs against the conflicted result. In a normal merge, you should only see
diffs against conflicted regions or in cases where there was a semantic
conflict but not a textual one. This makes it easier to detect "evil merges"
that contain substantial new work embedded in the merge commit.
Differential Revision: https://phab.mercurial-scm.org/D8504
Simon Sapin <simon.sapin@octobus.net> [Mon, 01 Feb 2021 12:55:31 +0100] rev 46447
rust: use HgError in ConfigError
Differential Revision: https://phab.mercurial-scm.org/D9938
Simon Sapin <simon.sapin@octobus.net> [Thu, 28 Jan 2021 20:31:42 +0100] rev 46446
rust: Fold find_root and check_requirements into Repo::find
Differential Revision: https://phab.mercurial-scm.org/D9906
Simon Sapin <simon.sapin@octobus.net> [Thu, 28 Jan 2021 19:13:55 +0100] rev 46445
rhg: Simplify CommandError based on its use
Differential Revision: https://phab.mercurial-scm.org/D9905
Simon Sapin <simon.sapin@octobus.net> [Thu, 28 Jan 2021 19:21:57 +0100] rev 46444
rust: replace ToString impls with Display
ToString is automatically implementing for everything that implements
Display, and Display can avoid allocating intermediate strings.
Differential Revision: https://phab.mercurial-scm.org/D9904
Simon Sapin <simon.sapin@octobus.net> [Wed, 27 Jan 2021 14:45:25 +0100] rev 46443
rust: use HgError in RevlogError and Vfs
Differential Revision: https://phab.mercurial-scm.org/D9897
Simon Sapin <simon.sapin@octobus.net> [Wed, 27 Jan 2021 14:59:09 +0100] rev 46442
rust: replace RequirementsError with HgError
Differential Revision: https://phab.mercurial-scm.org/D9896
Simon Sapin <simon.sapin@octobus.net> [Wed, 27 Jan 2021 15:04:51 +0100] rev 46441
rhg: Print an error message in more cases
Differential Revision: https://phab.mercurial-scm.org/D9895
Simon Sapin <simon.sapin@octobus.net> [Wed, 27 Jan 2021 14:00:21 +0100] rev 46440
rust: Remove DirstateParseError and ListDirstateTrackedFilesError
Use HgError instead.
Differential Revision: https://phab.mercurial-scm.org/D9894
Simon Sapin <simon.sapin@octobus.net> [Wed, 27 Jan 2021 13:41:28 +0100] rev 46439
rust: Replace DirstatePackError with HgError
Differential Revision: https://phab.mercurial-scm.org/D9893
Simon Sapin <simon.sapin@octobus.net> [Wed, 27 Jan 2021 13:19:49 +0100] rev 46438
rust: Introduce an `HgError` enum for common error cases
Differential Revision: https://phab.mercurial-scm.org/D9892
Simon Sapin <simon.sapin@octobus.net> [Tue, 26 Jan 2021 20:42:36 +0100] rev 46437
rust: remove three enums that were identical to `RevlogError`
Differential Revision: https://phab.mercurial-scm.org/D9877
Simon Sapin <simon.sapin@octobus.net> [Tue, 26 Jan 2021 20:31:26 +0100] rev 46436
rhg: replace `map_*_error` functions with `From` impls
Differential Revision: https://phab.mercurial-scm.org/D9876
Simon Sapin <simon.sapin@octobus.net> [Tue, 26 Jan 2021 20:05:37 +0100] rev 46435
rust: replace trivial `impl From …` with `#[derive(derive_more::From)]`
Crate docs: https://jeltef.github.io/derive_more/derive_more/from.html
Differential Revision: https://phab.mercurial-scm.org/D9875
Simon Sapin <simon.sapin@octobus.net> [Tue, 26 Jan 2021 19:07:24 +0100] rev 46434
rust: remove `FooError` structs with only `kind: FooErrorKind` enum field
Use the enum directly as `FooError` instead.
Differential Revision: https://phab.mercurial-scm.org/D9874
Simon Sapin <simon.sapin@octobus.net> [Tue, 26 Jan 2021 18:31:46 +0100] rev 46433
rhg: centralize parsing of `--rev` CLI arguments
This new module will be the place to implement more of the revset language
when we do so.
Differential Revision: https://phab.mercurial-scm.org/D9873
Simon Sapin <simon.sapin@octobus.net> [Mon, 25 Jan 2021 18:25:26 +0100] rev 46432
rust: Remove hex parsing from the nodemap
Separating concerns simplifies error types.
Differential Revision: https://phab.mercurial-scm.org/D9864
Simon Sapin <simon.sapin@octobus.net> [Mon, 25 Jan 2021 11:48:47 +0100] rev 46431
rust: Make NodePrefix allocation-free and Copy, remove NodePrefixRef
The `*Ref` struct only existed to avoid allocating `Vec`s
when cloning `NodePrefix`, but we can avoid having `Vec`
in the first place by using an inline array instead.
This makes `NodePrefix` 21 bytes (with 1 for the length)
which is smaller than before as `Vec` alone is 24 bytes.
Differential Revision: https://phab.mercurial-scm.org/D9863
Aay Jay Chan <aayjaychan@itopia.com.hk> [Sat, 30 Jan 2021 18:30:11 +0800] rev 46430
churn: count lines that look like diff headers but are not
Previously, churn cannot count added lines that start with "++ " or removed
lines that start with "-- ".
Differential Revision: https://phab.mercurial-scm.org/D9929
Simon Sapin <simon.sapin@octobus.net> [Mon, 25 Jan 2021 12:31:40 +0100] rev 46429
rust: Exclude empty node prefixes
We presumably don’t want `--rev ""` to select every single revision,
even though the empty string is a prefix of all strings.
Differential Revision: https://phab.mercurial-scm.org/D9862
Simon Sapin <simon.sapin@octobus.net> [Mon, 25 Jan 2021 12:28:39 +0100] rev 46428
rust: Simplify error type for reading hex node IDs
If a string is not valid hexadecimal it’s not that useful to track the precise reason.
Differential Revision: https://phab.mercurial-scm.org/D9861
Simon Sapin <simon.sapin@octobus.net> [Mon, 25 Jan 2021 12:00:23 +0100] rev 46427
rust: replace Node::encode_hex with std::fmt::LowerHex
This avoids allocating intermediate strings.
Differential Revision: https://phab.mercurial-scm.org/D9860
Simon Sapin <simon.sapin@octobus.net> [Fri, 29 Jan 2021 13:46:19 +0100] rev 46426
rhg: Build in release mode on CI
This follows
e73b40c790ec which made tests use the release executable.
With
e73b40c790ec but not this, tests are skipped on CI
because the executable is missing.
Differential Revision: https://phab.mercurial-scm.org/D9907
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 30 Jan 2021 00:36:54 +0100] rev 46425
config: use the right API to access git-submodule
Differential Revision: https://phab.mercurial-scm.org/D9923
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 29 Jan 2021 14:03:39 +0100] rev 46424
config: use the right API to access template access
Preventing direct access to the underlying dict will help a coming refactoring
of `config`.
Differential Revision: https://phab.mercurial-scm.org/D9922
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 29 Jan 2021 14:03:01 +0100] rev 46423
config: use the right API to access subrepository section
Preventing direct access to the underlying dict will help a coming refactoring
of `config`.
Differential Revision: https://phab.mercurial-scm.org/D9921
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 29 Jan 2021 13:03:50 +0100] rev 46422
config: test priority involving the command line
Differential Revision: https://phab.mercurial-scm.org/D9917
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 29 Jan 2021 11:50:33 +0100] rev 46421
config: test priority involving include
Differential Revision: https://phab.mercurial-scm.org/D9916
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 29 Jan 2021 11:42:27 +0100] rev 46420
config: add a test for priority when includes are involved
Differential Revision: https://phab.mercurial-scm.org/D9915
Martin von Zweigbergk <martinvonz@google.com> [Fri, 29 Jan 2021 16:26:53 -0800] rev 46419
errors: use InputError for incorrectly formatted dates
Differential Revision: https://phab.mercurial-scm.org/D9913
Martin von Zweigbergk <martinvonz@google.com> [Fri, 29 Jan 2021 15:56:08 -0800] rev 46418
errors: use StateError more in merge module
Differential Revision: https://phab.mercurial-scm.org/D9912
Martin von Zweigbergk <martinvonz@google.com> [Fri, 29 Jan 2021 12:16:55 -0800] rev 46417
errors: use exit code 40 for when a hook fails
A hook can be used for checking inputs, state, configuration,
security, etc., so it's unclear which of the existing exit codes to
use. Let's instead add one specifically for failed hooks. I picked 40.
Differential Revision: https://phab.mercurial-scm.org/D9910
Augie Fackler <augie@google.com> [Fri, 29 Jan 2021 12:50:10 -0500] rev 46416
context: add missing manifest invalidation after write in overlayworkingctx
This was breaking my merge-diff logic that will be in the next patch.
Differential Revision: https://phab.mercurial-scm.org/D9908
Kyle Lippincott <spectral@google.com> [Wed, 27 Jan 2021 10:29:21 -0800] rev 46415
wix: tell ComponentSearch that it is finding a directory (not a file)
This is to fix an issue we've noticed where fresh installations start at
`C:\Program Files\Mercurial`, and then upgrades "walk up" the tree and end up in
`C:\Program Files` and finally `C:\` (where they stay).
ComponentSearch defaults to finding files, which I think means "it produces a
string like `C:\Program Files\Mercurial`", whereas with the type being
explicitly a directory, it would return `C:\Program Files\Mercurial\` (note the
final trailing backslash). Presumably, a latter step then tries to turn that
file name into a proper directory, by removing everything after the last `\`.
This could likely also be fixed by actually searching for the component for
hg.exe itself. That seemed a lot more complicated, as the GUID for hg.exe isn't
known in this file (it's one of the "auto-derived" ones). We could also consider
adding a Condition that I think could check the Property and ensure it's either
empty or ends in a trailing slash, but that would be an installer runtime check
and I'm not convinced it'd actually be useful.
This will *not* cause existing installations that are in one of the bad
directories to fix themselves. Doing that would require a fair amount more
understanding of wix and windows installer than I have, and it *probably*
wouldn't be possible to be 100% correct about it either (there's nothing
preventing a user from intentionally installing it in C:\, though I don't know
why they would do so).
If someone wants to tackle fixing existing installations, I think that the first
installation is actually the only one that shows up in "Add or Remove Programs",
and that its registry keys still exist. You might be able to find something
under HKEY_USERS that lists both the "good" and the "bad" InstallDirs. Mine was
under `HKEY_USERS\S-1-5-18\Software\Mercurial\InstallDir` (C:\), and
`HKEY_USERS\S-1-5-21-..numbers..\Software\Mercurial\InstallDir` (C:\Program
Files\Mercurial). If you find exactly two, with one being the default path, and
the other being a prefix of it, the user almost certainly hit this bug :D
We had originally thought that this bug might be due to unattended
installations/upgrades, but I no longer think that's the case. We were able to
reproduce the issue by uninstalling all copies of Mercurial I could find,
installing one version (it chose the correct location), and then starting the
installer for a different version (higher or lower didn't matter). I did not
need to deal with an unattended or headless installation/upgrade to trigger the
issue, but it's possible that my system was "primed" for this bug to happen
because of a previous unattended installation/upgrade.
Differential Revision: https://phab.mercurial-scm.org/D9891
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 29 Jan 2021 17:32:09 +0530] rev 46414
merge with stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 27 Jan 2021 00:54:57 -0500] rev 46413
copyright: update to 2021
Differential Revision: https://phab.mercurial-scm.org/D9885
Simon Sapin <simon.sapin@octobus.net> [Thu, 28 Jan 2021 13:15:34 +0100] rev 46412
persistent-nodemap: Fix Rust declarations for Revlog_CAPI signatures
Use Rust’s `libc::ssize_t` as the closest match to C’s `Py_ssize_t`.
See details in test comment.
Going forward we should find a way to have such Rust declarations
auto-generated from C headers at build time,
or auto-checked against them in a test.
Differential Revision: https://phab.mercurial-scm.org/D9901
Simon Sapin <simon.sapin@octobus.net> [Thu, 28 Jan 2021 13:25:37 +0100] rev 46411
persistent-nodemap: add test case reproducing a Rust panic
Thanks to Mitchell Plamann for reporting this bug.
The next commit fixes it.
Differential Revision: https://phab.mercurial-scm.org/D9900
Martin von Zweigbergk <martinvonz@google.com> [Thu, 28 Jan 2021 00:14:15 -0800] rev 46410
copies: fix an incorrect comment in graftcopies() from recent D9802
I don't think the bit about creating a merge in the filelog was
correct. Or at least I couldn't find a case where it happened.
Differential Revision: https://phab.mercurial-scm.org/D9899
Martin von Zweigbergk <martinvonz@google.com> [Wed, 27 Jan 2021 22:10:57 -0800] rev 46409
narrow: delete a stale TODO about not sending groups the client already has
2c5835b4246b changed the changegroup generation to not send
treemanifests for directories the client had before widening. As that
commit mentions, we had already stopped before that commit to send the
changelog and filelogs for files the client already had.
Differential Revision: https://phab.mercurial-scm.org/D9898
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 16 Jan 2021 00:03:18 +0100] rev 46408
copies: add an devel option to trace all files
Filelog based copy tracing only trace copy for file that have been added. This
is a trade off between skipping some rare copy case in exchange for avoiding
atrocious-to-the-point-of-unusable performance.
The changeset centric copy tracing does not need this trade off and naturally
trace all copy, include the one involving non-new files.
In order to ease the comparison from both algorithm, we add a small devel option
to trace copy for all files in the target revisions.
Differential Revision: https://phab.mercurial-scm.org/D9796
Raphaël Gomès <rgomes@octobus.net> [Thu, 28 Jan 2021 15:26:33 +0100] rev 46407
revlog: prepare pure parser for being overloaded
The current class uses module-level variables which don't allow for reusing the
current logic for a slightly different revlog version.
Differential Revision: https://phab.mercurial-scm.org/D9903
Raphaël Gomès <rgomes@octobus.net> [Thu, 28 Jan 2021 15:12:48 +0100] rev 46406
revlog: use a less probable revlog version for backwards compatibility
This allows us to define a usable v2.
Differential Revision: https://phab.mercurial-scm.org/D9902
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 27 Jan 2021 15:06:02 +0100] rev 46405
clang-format: show required version in skip message
This will help people to configure their black
Differential Revision: https://phab.mercurial-scm.org/D9890