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
Simon Sapin <simon.sapin@octobus.net> [Tue, 09 Nov 2021 19:55:46 +0100] rev 48335
rhg: Enable `rhg status` in most tests
This subcommand is disabled by default because of bugs that make some test fail.
Enable it in the rest of the tests in order to avoid regressing them.
As with `RHG_ON_UNSUPPORTED`, an environment variable is used instead of
a configuration file and `HGRCPATH` because some tests override `HGRCPATH`.
Running `unset RHG_STATUS` at the start of a test restores the default of
`rhg status` being disabled. Hopefully it can be increasingly removed
from test files as bugs are fixed.
Differential Revision: https://phab.mercurial-scm.org/D11756
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 23 Nov 2021 15:35:31 +0530] rev 48334
Added signature for changeset
5d08b289e2e5
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 23 Nov 2021 15:35:21 +0530] rev 48333
Added tag 6.0 for changeset
5d08b289e2e5
Mathias De Mare <mathias.de_mare@nokia.com> [Wed, 17 Nov 2021 13:47:25 +0100] rev 48332
packaging: make rpm relocatable
This makes it possible to install multiple Mercurial rpms on the same machine
in different locations.
Differential Revision: https://phab.mercurial-scm.org/D11768
Mathias De Mare <mathias.de_mare@nokia.com> [Wed, 17 Nov 2021 13:28:22 +0100] rev 48331
dockerrpm: always use current user and group
Using uid 1000 and gid 1000 works by default in some cases,
but 'id -u' and 'id -g' should work in all cases.
Differential Revision: https://phab.mercurial-scm.org/D11767
Mads Kiilerich <mads@kiilerich.com> [Thu, 18 Nov 2021 12:31:37 +0100] rev 48330
cext: fix Python 3.11 compatibility - Py_SIZE is not an lvalue (
issue6610)
Py_SIZE was made a static inline function during Python 3.10 development, as
described on https://vstinner.github.io/c-api-opaque-structures.html .
e92ca942ddca updated the Mercurial code base accordingly, but somehow missed a
couple of cases introduced long time ago in
a8c948ee3668.
The Python change was dropped for 3.10, but is coming back again in 3.11 .
Raphaël Gomès <rgomes@octobus.net> [Fri, 19 Nov 2021 11:20:10 +0100] rev 48329
branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Tue, 16 Nov 2021 16:38:37 +0100] rev 48328
heptapod-ci: re-introduce Windows CI
We have Windows runners for now, and we're trying to find more, so let's share
the joy of flaky tests with everyone.
Differential Revision: https://phab.mercurial-scm.org/D11765
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 15 Nov 2021 19:53:01 -0800] rev 48327
cext: define S_IFLNK on Python 2.7 and Windows
Before this change, building on Python 2.7 on Windows fails due to
S_IFLNK being undefined. This regression was introduced by
a32a96079e2d / D11518.
It worked on Python 3 because its pyport.h (which is included via
Python.h) contains effectively the same code as added by this
changeset.
Differential Revision: https://phab.mercurial-scm.org/D11763
Thomas Klausner <wiz@gatalith.at> [Mon, 15 Nov 2021 12:03:28 +0100] rev 48326
tests: dd status=noxfer is not portable (
issue6523)
Differential Revision: https://phab.mercurial-scm.org/D11754
Thomas Klausner <wiz@gatalith.at> [Mon, 15 Nov 2021 00:15:21 +0100] rev 48325
tests: use more portable mkdir -p instead of --parents (
issue6591)
Differential Revision: https://phab.mercurial-scm.org/D11755
Thomas Klausner <wiz@gatalith.at> [Mon, 15 Nov 2021 00:08:02 +0100] rev 48324
tests: fix test-censor by improving regexp (
issue6585)
Differential Revision: https://phab.mercurial-scm.org/D11753
Martin von Zweigbergk <martinvonz@google.com> [Wed, 10 Nov 2021 08:09:34 -0800] rev 48323
ci: stop running with Python 2
We're dropping support for Python 2 after hg 6.0.
Differential Revision: https://phab.mercurial-scm.org/D11748
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Nov 2021 11:43:22 +0100] rev 48322
internals: typo pass on the dirstate-v2 help file
Differential Revision: https://phab.mercurial-scm.org/D11747
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Nov 2021 11:42:13 +0100] rev 48321
dirstate-v2: fix confusion between requirement and format config variable
None of those outputs failed on the CI because dirstate-v2 is not fully tested
yet. This also updates the documentation.
Differential Revision: https://phab.mercurial-scm.org/D11746
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Nov 2021 10:58:13 +0100] rev 48320
internals: correct dirstate-v2 format variable in the documentation
Differential Revision: https://phab.mercurial-scm.org/D11745
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Nov 2021 10:50:54 +0100] rev 48319
hghave: update dirstate-v2 format config option
It wasn't kept in sync with the new change in format name.
Differential Revision: https://phab.mercurial-scm.org/D11744
Augie Fackler <augie@google.com> [Wed, 10 Nov 2021 14:54:55 -0500] rev 48318
merge: with stable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 09 Nov 2021 22:06:40 +0530] rev 48317
Added signature for changeset
a44bb185f6bd
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 09 Nov 2021 22:06:26 +0530] rev 48316
Added tag 6.0rc0 for changeset
a44bb185f6bd
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 09 Nov 2021 21:56:04 +0530] rev 48315
merge with default
pacien <pacien.trangirard@pacien.net> [Tue, 09 Nov 2021 02:19:43 +0100] rev 48314
tests: accept alternative privileged port allocation failure
This registers an additional failure message on failed privileged port
allocation, equally funcionally valid but previously not handled and causing
the test to fail when run in the NixOS sandbox.
Differential Revision: https://phab.mercurial-scm.org/D11741
pacien <pacien.trangirard@pacien.net> [Tue, 09 Nov 2021 02:16:43 +0100] rev 48313
tests: allow the true command to be provided by coreutils
The `true` command is sometimes provided as a symbolic link to the `coreutils`
single binary. This is the case on NixOS, on which the test was failing because
the symbolic link fully resolves to the latter name, equally valid but not
previously accepted by the test's golden output.
Differential Revision: https://phab.mercurial-scm.org/D11740
pacien <pacien.trangirard@pacien.net> [Tue, 09 Nov 2021 02:08:18 +0100] rev 48312
tests: add guard check for suid support
This adds a check for setuid and setgid support and guards a part of a test
requiring this particular filesystem feature.
Such feature is notably missing in the Nix/NixOS build sandbox and was causing
the whole test to fail for the mercurial package.
Differential Revision: https://phab.mercurial-scm.org/D11739
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 26 Oct 2021 19:47:30 +0100] rev 48311
rhg: more efficient `HgPath::join`
This commit makes `HgPath::join` slightly more efficient
by avoiding one copy.
It also avoids a particularly inefficient (quadratic) use of
`HgPath::join` by using a new mutating function `HgPathBuf::push` instead.
The name for `HgPathBuf::push` is chosen by analogy to `PathBuf::push`.
Differential Revision: https://phab.mercurial-scm.org/D11721
Raphaël Gomès <rgomes@octobus.net> [Tue, 09 Nov 2021 15:25:38 +0100] rev 48310
relnotes: update 6.0 with the last changes for the release
Differential Revision: https://phab.mercurial-scm.org/D11742
Simon Sapin <simon.sapin@octobus.net> [Tue, 09 Nov 2021 15:43:29 +0100] rev 48309
rhg: Fix `rhg status` file content comparison
This is only used when a file’s metadata make its status ambiguous,
which depends on timing of previous command executions.
Differential Revision: https://phab.mercurial-scm.org/D11743
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 27 Oct 2021 19:37:46 +0100] rev 48308
rhg: make it possible to opt out of `rhg cat`
The reason an opt-out is needed is that there are still behavior
differences between `rhg cat` and `hg cat`:
- it does not interpret relative paths correctly
- it does not interpret patterns correctly, e.g. 're:foobar$' would be interpreted as a verbatim filename
- it does not implement the correct semantics of relpath matcher: if given a directory, `hg` concatenates all files in this directory, while `rhg` simply complains
Differential Revision: https://phab.mercurial-scm.org/D11723
pacien <pacien.trangirard@pacien.net> [Tue, 09 Nov 2021 02:00:25 +0100] rev 48307
tests: run the whole hg-core/path_auditor test in a clean temp dir
This makes the whole test happen in a clean temporary directory in
`$TMPDIR/$random`, and simplifies the test a bit by eliminating unnecessarily
dynamic path elements computations.
Before this patch, the first part of the test was happening in `/tmp` itself.
This allowed coincidentally named files placed in that directory to impact the
outcome of the test. Additionally, this made the second part of the test fail
on systems on which `$TMPDIR != /tmp`, because the inspected directory was
different from the one in which the mock files were being written. This fully
fixes the issue only partially solved in
db2bc9e667a1.
Differential Revision: https://phab.mercurial-scm.org/D11738
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Oct 2021 10:25:51 +0200] rev 48306
fsmonitor: fix traceback after removal of nonnormalset (
issue6600)
This basically does the same thing it used to do, but in the only place it's
needed.
Differential Revision: https://phab.mercurial-scm.org/D11707
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Oct 2021 10:26:39 +0200] rev 48305
fsmonitor: fix traceback about bytes and str incompatibility
This didn't work anymore in Python 3, switching to a `repr` based reporting does
Differential Revision: https://phab.mercurial-scm.org/D11708
Raphaël Gomès <rgomes@octobus.net> [Wed, 27 Oct 2021 15:18:52 +0200] rev 48304
backout: backed out changeset
67d14d4e036c
Same as the previous patch, this breaks the Windows CI for some yet unknown
reason.
Differential Revision: https://phab.mercurial-scm.org/D11727
Raphaël Gomès <rgomes@octobus.net> [Wed, 27 Oct 2021 12:07:58 +0200] rev 48303
backout: backed out changeset
f78d8b8c46d7
This and the following backout exist because the original patches break the
Windows CI for some yet unknown reason.
Differential Revision: https://phab.mercurial-scm.org/D11726
Raphaël Gomès <rgomes@octobus.net> [Thu, 04 Nov 2021 12:35:05 +0100] rev 48302
relnotes: clear next release notes
Differential Revision: https://phab.mercurial-scm.org/D11737
Raphaël Gomès <rgomes@octobus.net> [Thu, 04 Nov 2021 12:34:51 +0100] rev 48301
relnotes: add 6.0 release notes
Differential Revision: https://phab.mercurial-scm.org/D11736
Raphaël Gomès <rgomes@octobus.net> [Thu, 04 Nov 2021 09:55:37 +0100] rev 48300
relnotes: fix wrong command name in 5.9 relnotes
Differential Revision: https://phab.mercurial-scm.org/D11735
Kyle Lippincott <spectral@google.com> [Wed, 03 Nov 2021 14:11:11 -0700] rev 48299
pyoxidizer: use in-memory resources on non-Windows platforms
In-memory resources were disabled for macOS in
7bc1beed, and for all platforms
in
c900d962. Unfortunately this made it so that we were no longer producing
standalone binaries on these platforms, and would have to ship the .py and .pyc
files alongside the pyoxidized binary.
These changes are no longer necessary after
f6b04591, which disabled pep517 and
solved the issue we were encountering.
Differential Revision: https://phab.mercurial-scm.org/D11734
Raphaël Gomès <rgomes@octobus.net> [Wed, 03 Nov 2021 12:35:57 +0100] rev 48298
compat: don't rely on cpython-specific builtins manipulation
Pierre Augier signaled on the mailing list that this fails on Pypy and pointed
out the correct solution.
Differential Revision: https://phab.mercurial-scm.org/D11732
Raphaël Gomès <rgomes@octobus.net> [Wed, 03 Nov 2021 17:06:01 +0100] rev 48297
rust-format: update rustfmt version
This hasn't been updated in a while, and since we're updating the MSRV to
1.48.0, we might as well do this.
Differential Revision: https://phab.mercurial-scm.org/D11733
Raphaël Gomès <rgomes@octobus.net> [Wed, 25 Aug 2021 17:53:19 +0200] rev 48296
rust: update the minimum version of Rust
Debian Bullseye has just been released, and it carries `rustc 1.48.0`.
This actually implies a regression that we can't really do anything about in
`rhg`. See https://github.com/rust-lang/rust/issues/88825. In short, closed (or
bad) standard file descriptors are reopened silently with no way of telling by
the Rust runtime before `main` is executed. This means that closed fds are not
forwarded to the subprocess we run in case of fallback. This is a bit sad, but
probably not something worth worrying too much about.
Differential Revision: https://phab.mercurial-scm.org/D11341
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 20 Oct 2021 00:57:02 +0200] rev 48295
dirstate-v2: freeze the on-disk format
It seems the format as reached a good balance. With a core of new capabilities
that motivated it initially and enough new feature and room for future
improvement to be a clear progress we can set a milestone for.
Having the format frozen will help the feature to get real life testing, outside
of the test suite.
The feature itself stay experimental but the config gains a new name to avoid
people enable non-frozen version by default.
If too many bugs are reported during the RC we might move the format back to
experimental and drop its support in future version (in favor of a new one)
Differential Revision: https://phab.mercurial-scm.org/D11709
Augie Fackler <augie@google.com> [Mon, 01 Nov 2021 14:59:07 -0400] rev 48294
merge: with stable
Raphaël Gomès <rgomes@octobus.net> [Fri, 22 Oct 2021 09:45:35 +0200] rev 48293
windows: use raw string in test log paths
Otherwise the backslashes will work as escapes on Windows and break everything.
Differential Revision: https://phab.mercurial-scm.org/D11725
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 29 Oct 2021 14:40:46 +0200] rev 48292
pull: make the new argument a keyword argument
As per feedback from Dan Villiom Podlaski Christiansen
in https://phab.mercurial-scm.org/D11674#179866
Differential Revision: https://phab.mercurial-scm.org/D11730
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 28 Oct 2021 17:44:58 +0200] rev 48291
dirstate: make sure that status does not overlook the fallback flags
Without this extra checks, file with fallback flags change as the only change
would be overlooked.
In the future we might store proper data in the dirstate and do less lookup.
However, for now this will do to make sure that 6.0 is forward compatible with
later version.
Differential Revision: https://phab.mercurial-scm.org/D11729
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 28 Oct 2021 17:26:03 +0200] rev 48290
dirstate: use a single closure for get_flags
The previous code was overlooking fallback when neither symlink not exec was
supported.
The number of "variants" is getting too high, so I am consolidating this in a
single closure that should be easier to maintains.
This also ensure that fallback flags are always taken into account.
(they are not user code yet, but small experimentation shown that the feature
was working as intended.)
A a small side effect we need to check for symlink support more lazily and this
show up in the test in a couple of places.
Differential Revision: https://phab.mercurial-scm.org/D11728
Kyle Lippincott <spectral@google.com> [Fri, 30 Apr 2021 16:00:40 -0700] rev 48289
tests: allow Google's internal builds of clang-format to be used
These builds do not actually include any Google-specific formatting changes; the
only reason they don't include the LLVM version number is due to a decision to
elide the version number from *all* LLVM/clang projects.
For most builds of clang-format, even "unofficial" ones, the LLVM version will
be displayed; example:
```
clang-format version 14.0.0 (https://github.com/llvm/llvm-project.git
1830ec94ac022ae0b6d6876fc2251e6b91e5931e)
```
The Google-internal build looks like this:
```
clang-format version google3-trunk (
1830ec94ac022ae0b6d6876fc2251e6b91e5931e)
```
Differential Revision: https://phab.mercurial-scm.org/D10538
Augie Fackler <augie@google.com> [Tue, 26 Oct 2021 10:23:14 -0400] rev 48288
merge: with stable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 26 Oct 2021 18:53:58 +0530] rev 48287
Added signature for changeset
6ee0244fc1cf
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 26 Oct 2021 18:53:51 +0530] rev 48286
Added tag 5.9.3 for changeset
6ee0244fc1cf
Raphaël Gomès <rgomes@octobus.net> [Mon, 25 Oct 2021 17:57:01 +0200] rev 48285
relnotes: update release notes for upcoming 5.9.3
Differential Revision: https://phab.mercurial-scm.org/D11720
Matt Harbison <matt_harbison@yahoo.com> [Sat, 23 Oct 2021 17:13:57 -0400] rev 48284
typing: add more type hints to the errors module
These were found by looking for `Any` types in the generated `*.pyi` file after
running the tests. There are some more complicated types that I'm not sure of,
and am leaving untyped. I also can't figure out how to get `self.hint` to be
anything other than `Any` in most classes.
Differential Revision: https://phab.mercurial-scm.org/D11719
Matt Harbison <matt_harbison@yahoo.com> [Sat, 23 Oct 2021 16:04:05 -0400] rev 48283
typing: add a few assertions to revlog.py to help pytype
I've seen this before, but this was seen as potentially `None` with pytype
2021.10.18.
Differential Revision: https://phab.mercurial-scm.org/D11718
Raphaël Gomès <rgomes@octobus.net> [Thu, 21 Oct 2021 09:22:06 +0200] rev 48282
dirstate: group return logic and clarify each function in flagfunc
As suggested by spectral during review of my fix of the missing return, this
makes it more obvious that all cases are covered and improves readability of
the functions with new names and a small docstring.
Differential Revision: https://phab.mercurial-scm.org/D11715
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Oct 2021 18:40:03 +0200] rev 48281
dirstate: add missing return on platforms without exec or symlink
Differential Revision: https://phab.mercurial-scm.org/D11713
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Oct 2021 18:25:49 +0200] rev 48280
parsers: don't ask about symlinks on platforms that don't support them
Otherwise the compiler gets quite sad.
Differential Revision: https://phab.mercurial-scm.org/D11712
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Oct 2021 18:05:16 +0200] rev 48279
parsers: don't ask about the exec bit on platforms that don't have it
Otherwise the compiler gets quite sad.
Differential Revision: https://phab.mercurial-scm.org/D11711
Kyle Lippincott <spectral@google.com> [Tue, 19 Oct 2021 18:06:07 -0700] rev 48278
tests: fix test-convert-git to work w/ "git pull" requiring strategy
A recent change to git (
031e2f7ae195) made it an error to not specify a strategy
(`--rebase`, `--no-rebase`, `--ff-only`), instead of just the warning it was
previously. As far as I can tell, `--no-rebase` is the behavior we were getting
before, and the only one that makes the test work.
Differential Revision: https://phab.mercurial-scm.org/D11714
Raphaël Gomès <rgomes@octobus.net> [Thu, 21 Oct 2021 17:25:41 +0200] rev 48277
branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Thu, 21 Oct 2021 14:03:33 +0200] rev 48276
heptapod-ci: actually give pytest more time before timeout
`HGTEST_TIMEOUT` is overridden by `HGTEST_SLOWTIMEOUT` for tests marked as
slow, which `test-check-pytype.t` is. So this whole time the timeout was 1500s
(or 25 minutes), which is unfortunately not long enough for a *lot* of the
times it's run on the CI.
Differential Revision: https://phab.mercurial-scm.org/D11717
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 20 Oct 2021 18:44:26 +0100] rev 48275
tests: better determinism in test-chg.t
chg tests fail pretty often with "Sample count: *" line disappearing.
It disappears because the sample count is zero, in which case a custom message is printed.
This commit makes the test succeed in that case.
Differential Revision: https://phab.mercurial-scm.org/D11716
David Demelier <markand@malikania.fr> [Thu, 21 Oct 2021 11:21:21 +0200] rev 48274
hg: remove reserved identifiers
Per 7.1.3 paragraph, from C draft:
All identifiers that begin with an underscore and either an uppercase letter or
another underscore are always reserved for any use.
Raphaël Gomès <rgomes@octobus.net> [Tue, 19 Oct 2021 16:05:20 +0200] rev 48273
python: compatibility for python 3.11 (
issue6604)
The `unittest._TextTestResult` alias has been removed.
The "new" name has been available since 3.2, and we only support 3.5.3+.
Differential Revision: https://phab.mercurial-scm.org/D11690
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Oct 2021 16:54:43 +0200] rev 48272
pyoxidizer: force pip to not use pep517 in order to be able to install hg
Mercurial is not (yet) a pep517 package, but the presence of a pyproject.toml
file tells newer-ish versions of pip that it should be one.
This is related to
58fe6d127a01, and fixes pyoxidizer builds for the Heptapod
CI.
Differential Revision: https://phab.mercurial-scm.org/D11710
Kyle Lippincott <spectral@google.com> [Tue, 19 Oct 2021 16:14:53 -0700] rev 48271
merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Differential Revision: https://phab.mercurial-scm.org/D11706
Kyle Lippincott <spectral@google.com> [Tue, 19 Oct 2021 16:14:46 -0700] rev 48270
merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Differential Revision: https://phab.mercurial-scm.org/D11705
Georges Racinet <georges.racinet@octobus.net> [Tue, 19 Oct 2021 19:05:41 +0200] rev 48269
rust-nodemap: backed out mitigation for issue 6554
This is a backout of changeset
3fffb48539ee.
Issue 6554 is now considered solved, hence its mitigation
has to be removed, if only for its performance cost.
Differential Revision: https://phab.mercurial-scm.org/D11703
Kyle Lippincott <spectral@google.com> [Mon, 18 Oct 2021 16:24:00 -0700] rev 48268
pyoxidizer: update README.md with several small fixes
Currently, pyoxidizer.bzl does not mention the git commit that should be checked
out, so these instructions are a bit difficult to follow right now (impossible,
technically), so I removed the instruction to `git checkout <Git commit>` and
the admonition to use a specific version of PyOxidizer. I don't even know if the
project currently builds with the "0.7.0-pre" version that was previously
recommended.
As fallout from that change to not "pin" to a specific PyOxidizer, I had to
update the Python version to use when running the tests.
While here, I added a recommendation to use `--release`, as the primary reason
for this project is performance, and it may have been leaving some on the table
to not have that there.
Differential Revision: https://phab.mercurial-scm.org/D11698
Kyle Lippincott <spectral@google.com> [Mon, 18 Oct 2021 16:18:41 -0700] rev 48267
pyoxidizer: disable using in-memory resources
It's possible that the errors are due to using an incompatible version of
PyOxidizer; unfortunately the README.md file in this directory says to fetch a
copy of PyOxidizer matching the commit in this pyoxidizer.bzl file, and yet the
pyoxidizer.bzl file does not actually have a commit mentioned in it.
By disabling in-memory modules, this appears to work on all platforms using the
current head version of PyOxidizer, so let's disable them for now.
Sample error (during `pyoxidizer build`):
```
error[PYOXIDIZER_PYTHON_EXECUTABLE]: adding PythonExtensionModule<name=hgext.fsmonitor.pywatchman.bser>
Caused by:
extension module hgext.fsmonitor.pywatchman.bser cannot be loaded from memory but memory loading required
--> ./pyoxidizer.bzl:140:5
|
140 | exe.add_python_resources(exe.pip_install(["--verbose", ROOT]))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ add_python_resources()
error: adding PythonExtensionModule<name=hgext.fsmonitor.pywatchman.bser>
Caused by:
extension module hgext.fsmonitor.pywatchman.bser cannot be loaded from memory but memory loading required
```
Differential Revision: https://phab.mercurial-scm.org/D11697
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 20 Oct 2021 00:21:41 +0200] rev 48266
dirstate-v2: reorder flag to group related one together
Since the format is not frozen yet, it seems like the right moment to do it.
Differential Revision: https://phab.mercurial-scm.org/D11704
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Oct 2021 20:14:17 +0200] rev 48265
dirstate-v2: read the fallback value in Rust
This was overlooked in a previous commit.
Differential Revision: https://phab.mercurial-scm.org/D11695
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Oct 2021 18:18:05 +0200] rev 48264
dirstate-v2: adjust the meaning of directory flags
Tracking directory "explicitly" give use the opportunity to distinct between
entry that are untracked because they are part of the directory structure and
entry that are ignored/unknown files on the files system.
The help is adjusted to the new semantic and the code now comply to it for both
read and write.
Differential Revision: https://phab.mercurial-scm.org/D11694
Simon Sapin <simon.sapin@octobus.net> [Wed, 13 Oct 2021 15:58:14 +0200] rev 48263
dirstate-v2: actually use sub-second mtime precision
Instead of zero, set the nanoseconds field to its correct value whenever
possible and preserve it across serialization+parsing.
Differential Revision: https://phab.mercurial-scm.org/D11702
Simon Sapin <simon.sapin@octobus.net> [Thu, 14 Oct 2021 13:54:39 +0200] rev 48262
dirstate: ignore sub-second component when either is zero in mtime
When comparing mtimes for equality.
Some APIs simply return zero when more precision is not available.
When comparing values from different sources, if only one is truncated in
that way, doing a simple comparison would cause many false negatives.
Differential Revision: https://phab.mercurial-scm.org/D11701
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Oct 2021 22:04:14 +0200] rev 48261
dirstate-v2: add a new MTIME_SECOND_AMBIGUOUS flags
This flag will let us use more `mtime` value in the future. For now we have a
minimal handling of the flag at read time, but we will never put ourself in a
situation where we will needs to writes it.
See the flag documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11700
Simon Sapin <simon.sapin@octobus.net> [Mon, 18 Oct 2021 11:23:07 +0200] rev 48260
dirstate: store mtimes with nanosecond precision in memory
Keep integer seconds since the Unix epoch,
together with integer nanoseconds in the `0 <= n < 1e9` range.
For now, nanoseconds are still always zero.
This commit is about data structure changes.
Differential Revision: https://phab.mercurial-scm.org/D11684
Simon Sapin <simon.sapin@octobus.net> [Tue, 19 Oct 2021 21:03:13 +0200] rev 48259
rust: remove now-unused DirstateEntry::clear_ambiguous_mtime method
Differential Revision: https://phab.mercurial-scm.org/D11696
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Oct 2021 22:14:48 +0200] rev 48258
dirstate: align Rust function name to `need_delay`
The rest of the code use this name. It is not a great name, but it is better to
stay consistent.
Differential Revision: https://phab.mercurial-scm.org/D11699
Simon Sapin <simon.sapin@octobus.net> [Mon, 18 Oct 2021 19:02:40 +0200] rev 48257
dirstate: rename a `very_likely_equal` method to `likely_equal`
No need to oversell it.
Differential Revision: https://phab.mercurial-scm.org/D11691
Raphaël Gomès <rgomes@octobus.net> [Tue, 19 Oct 2021 19:03:39 +0200] rev 48256
backout: backed out changeset
2f2107c01dee
After discussion on the original phab patch, we've decided to wait until
Python 2 support is dropped to do this since the behavior differs for
relatively obscure reasons.
Differential Revision: https://phab.mercurial-scm.org/D11692
Raphaël Gomès <rgomes@octobus.net> [Tue, 19 Oct 2021 19:04:11 +0200] rev 48255
backout: backed out changeset
6edc8800dbc3
Same as the previous changeset.
Differential Revision: https://phab.mercurial-scm.org/D11693
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 18 Oct 2021 10:56:54 +0200] rev 48254
dirstate-v2: preserve the fallback values on disk
When the fallback values are set, they are now read and written to disk.
See format documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11688
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 18 Oct 2021 20:02:05 +0200] rev 48253
dirstate: make DirstateItem constructor accept fallback value
This could arguably goes in the previous changeset, but I wanted to keep that
previous changeset small to focus more on the user code and the documentation.
Differential Revision: https://phab.mercurial-scm.org/D11687
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 18 Oct 2021 20:02:15 +0200] rev 48252
dirstate: add a concept of "fallback" flags to dirstate item
The concept is defined and "used" by the flag code, but it is neither persisted
nor set anywhere yet. We currently focus on defining the semantic of the
attribute. More to come in the next changesets
Check the inline documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11686
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Oct 2021 16:33:19 +0200] rev 48251
dirstate-v2: adds two flag to track the presence of some unrecorded files
Right now, we don't record ignored or unknown files in the dirstate. However
the structure would allow it. So we introduce two flags that can be used to
clarify whether all unknown/ignored children are recorded or not. This will
allow for more information to be stored in the future if this end up being
relevant.
Differential Revision: https://phab.mercurial-scm.org/D11682
Simon Sapin <simon.sapin@octobus.net> [Fri, 15 Oct 2021 16:12:00 +0200] rev 48250
dirstate-v2: adds a flag to mark a file as modified
Right now, a files with a file system state that requires a lookup (same size,
different mtime) will requires a lookup. If the result of that lookup is a
modified files, it will remains ambiguous, requiring a lookup on the next status
run too.
To fix this, we introduce a dedicated flag in the new format. Such flag will
allow to record such file as "known modified" avoiding an extra lookup later.
As None of the associate code currently exist in the status code, we do the
minimal implementation: if we read a dirstate entry with this flag set, we make
it as "ambiguous" so that the next status code has to look it up. The same as it
would have to without this flag existing anyway.
Differential Revision: https://phab.mercurial-scm.org/D11681
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 19 Oct 2021 10:52:13 +0100] rev 48249
rhg: simplify split_metadata
It turns out that it's possible to implement `FilelogEntry.into_data`
on top of `split`, as proposed by @spectral.
Differential Revision: https://phab.mercurial-scm.org/D11689
Raphaël Gomès <rgomes@octobus.net> [Fri, 27 Aug 2021 14:40:09 +0200] rev 48248
pyoxidizer: default to a meaningless release instead of hardcoding 5.8
This way we don't advertise the wrong version, or if we do it's really obvious.
To be honest, I'm not even sure that `VERSION` should be optional, but I also
have never used the packaging tools so far, this is simply something I saw.
Differential Revision: https://phab.mercurial-scm.org/D11360
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Oct 2021 10:58:39 -0700] rev 48247
copy: recommend `--at-rev .` if target was added in parent commit
If the target file was added in the working copy parent, it's much
more likely that the user meant to use `--at-rev .` (to record the
copy/rename in the that commit) than `--force` (to replace the
just-added file by another file).
Differential Revision: https://phab.mercurial-scm.org/D11667
Raphaël Gomès <rgomes@octobus.net> [Mon, 18 Oct 2021 10:14:44 +0200] rev 48246
fix: appease pyflakes and make unused variables more obvious
pyflakes is complaining that `baserevs` is redefined by the list comprehension,
and while this lint can be valuable, it's not actually a problem here.
Differential Revision: https://phab.mercurial-scm.org/D11683
Raphaël Gomès <rgomes@octobus.net> [Mon, 18 Oct 2021 17:11:48 +0200] rev 48245
rewrite: fix
issue6599
Explanation inside.
Differential Revision: https://phab.mercurial-scm.org/D11685
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Oct 2021 04:41:24 +0200] rev 48244
bookmarks: add a `ignore` variant of the bookmark mode
This new mode allow to disable bookmark exchange with some path (or all path).
Differential Revision: https://phab.mercurial-scm.org/D11677
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Oct 2021 04:25:58 +0200] rev 48243
bookmarks: add support for `mirror` mode to `incoming`
This is more consistent.
Differential Revision: https://phab.mercurial-scm.org/D11676
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Oct 2021 03:49:05 +0200] rev 48242
bookmarks: move the `mirror` option to the `paths` section
A new `bookmarks` section with a `mirror` option have been added. That option
has never been released yet.
This new options is limited since it affect all paths without distinction. In
case where a repository is interacting with multiple peers, being able to
control behavior on a path basis can be quite valuable.
In addition, having more variant of behavior would be interesting, especially a
mode where no bookmark exchanged is tried at all. Such new mode (implemented
later) make a lot of sense for configuration on a path-basis.
Configuration of the default behavior is still possible through the usage of
generic path configuration. The "old" config, becomes:
[bookmarks]
mirror=True
becomes:
[path]
*:bookmarks.mode=mirror
Differential Revision: https://phab.mercurial-scm.org/D11675
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Oct 2021 03:28:28 +0200] rev 48241
path: keep the path instance in the `pulloperation`
This will allow more pull code to use the path options. Ideally we would modify
the peer API to keep the path instance. However that is much more churn that I
can deal with for my current goal: adjusting a user facing API for a new
feature before we release it in the 6.0 changesets. So I am taking a shortcut
that seems reasonable.
Differential Revision: https://phab.mercurial-scm.org/D11674
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Oct 2021 02:44:14 +0200] rev 48240
path: return path instance directly from get_pull_paths
This means the caller has to do a bit more work, however it give access to the
`path` instance and the information it contains.
Differential Revision: https://phab.mercurial-scm.org/D11673
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Oct 2021 02:36:54 +0200] rev 48239
path: unify path creation in `get_pull_paths`
This remove a special case and will make it possible to return `path` instance
directly.
Differential Revision: https://phab.mercurial-scm.org/D11672
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Oct 2021 02:36:38 +0200] rev 48238
path: add a new argument to control path validation
During pull, unvalidated path might be used, having the option to do so directly will allow use to simplify some code and unlock more `path` usage later in the series.
Differential Revision: https://phab.mercurial-scm.org/D11671
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 15 Oct 2021 14:05:20 +0100] rev 48237
rhg: internally, return a structured representation from hg cat
The purpose of this change is to make it possible to support limited templating in `hg cat`, so we could print separators between files etc.
The templating itself is not implemented yet, so this functionality is unused in `rhg cat`.
However, in our fork of hg we're implementing a slightly different command `hg jscat` which makes use of this.
So accepting this change will let us minimize the size of the patch we're maintaining on our side.
Differential Revision: https://phab.mercurial-scm.org/D11679
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 14 Oct 2021 19:02:08 +0100] rev 48236
rhg: fix `hg cat` interaction with null revision
Differential Revision: https://phab.mercurial-scm.org/D11664
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Oct 2021 01:27:39 +0200] rev 48235
dirstate-v2: add an option to prevent unintentional slow dirstate-v2
This is the project policy discussed in November 2020 and already put to use for
the persistent nodemap.
Differential Revision: https://phab.mercurial-scm.org/D11668
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Oct 2021 22:35:46 -0700] rev 48234
rhg: fix formatting error reported by test-check-format-rust.t
Differential Revision: https://phab.mercurial-scm.org/D11670
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Oct 2021 13:54:06 -0700] rev 48233
chistedit: add option to show order of commits in opposite order
Many users (including me) expect the order of commits in histedit to
match the order in `hg log -G` and are confused because it
doesnn't. This patch adds an option to show later commits first in the
list. I've only added support for it in chistedit for now. As a
consequence, I've marked the config option experimental (I think it
should apply to both interfaces before it graduates).
Differential Revision: https://phab.mercurial-scm.org/D11669
Simon Sapin <simon.sapin@octobus.net> [Thu, 14 Oct 2021 16:39:16 +0200] rev 48232
dirstate-v2: Separate HAS_FILE_MTIME and HAS_DIRECTORY_MTIME flags
Previously the same flag was used, with its meaning based on whether the node
otherwise identifies a file tracked anywhere.
In addition to being more explicit, this enables storing a directory mtime
if a given path used to be tracked in a parent commit (so the dirstate still
has data about it) but became a directory in the working copy.
(However this is not done yet as it would require a larger change,
replacing the `dirstate_map::NodeData` enum with struct fields.)
Differential Revision: https://phab.mercurial-scm.org/D11662
Simon Sapin <simon.sapin@octobus.net> [Thu, 14 Oct 2021 16:06:31 +0200] rev 48231
dirstate-v2: Extend node flags to 16 bits
Only 7 out of 8 available bits are used right now. Reserve some more.
Future versions of Mercurial may assign meaning to some of these bits,
with the limitation that then-older versions will always reset those bits to
unset when writing nodes.
(A new node is written for any mutation in its subtree, leaving the bytes of
the old node unreachable until the data file is rewritten entirely.)
Differential Revision: https://phab.mercurial-scm.org/D11661
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Oct 2021 08:58:07 -0700] rev 48230
narrow: raise StateError when working copy is stale (for detailed exit code)
Differential Revision: https://phab.mercurial-scm.org/D11663
Simon Sapin <simon.sapin@octobus.net> [Thu, 14 Oct 2021 15:05:04 +0200] rev 48229
dirstate-v2: Use attributes as intended instead of properties in v2_data()
The property return other integer values instead of None, so `is not None`
does not work.
This fixes test-dirstate-race.t in pure-Python mode, which currently fails
on the default branch.
Differential Revision: https://phab.mercurial-scm.org/D11660
Simon Sapin <simon.sapin@octobus.net> [Thu, 14 Oct 2021 13:59:18 +0200] rev 48228
dirstate: Remove unused variable
This fixes test-check-pyflakes.t which is currently failing
on the default branch.
Differential Revision: https://phab.mercurial-scm.org/D11658
Simon Sapin <simon.sapin@octobus.net> [Thu, 14 Oct 2021 13:58:25 +0200] rev 48227
rust: Reformat source code
This fixes test-check-rust-format.t which is currently failing
on the default branch.
Differential Revision: https://phab.mercurial-scm.org/D11657
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 14 Oct 2021 13:34:37 +0100] rev 48226
rhg: do not try to open a nodemap for an inline index
This saves an [open] system call per file, which is a small saving, but
it showed up in the profile at large file counts (it accounted for 30ms
out of 400ms needed for catting 10000 files, on a ZFS filesystem on Linux,
so ~3us per syscall).
Differential Revision: https://phab.mercurial-scm.org/D11659
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 05 Oct 2021 15:10:42 +0100] rev 48225
rhg: stop manifest traversal when no more files are needed
Stopping the traversal early can skip a significant part
of the manifest traversal, to avoid some of its cost.
The worst-case benchmarks are favorable, as well.
Running [hg cat] on the last file in the manifest of
a large repo, I'm seeing a ~4ms improvement (150ms -> 146ms),
so this time is now almost indistinguishable from the
baseline ("brute force") implementation.
Running [hg cat] on ~220 files together with the last file
of the repo is further improved by ~5ms or so.
I suspect the raw performance improvements are caused by splitting
the manifest search and the file data access into separate phases,
instead of interleaving them.
Differential Revision: https://phab.mercurial-scm.org/D11616
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 04 Oct 2021 19:06:45 +0100] rev 48224
rhg: faster hg cat when many files are requested
With this patch I'm seeing a ~39ms improvement (220ms -> 181ms) when
running [hg cat] on ~220 files in a ~260k-file repo.
The timing for [hg cat] on an individual file becomes slightly worse
(losing 5ms: 145ms -> 150ms).
A follow-up commit is intended to improve that.
Differential Revision: https://phab.mercurial-scm.org/D11615
Simon Sapin <simon.sapin@octobus.net> [Fri, 16 Jul 2021 18:42:20 +0200] rev 48223
dirstate-v2: Add support when Rust is not enabled
This wires into `dirstatemap` the parser and serializer added in previous
changesets. The memory representation is still the same, with a flat `dict`
for `DirstateItem`s and another one for copy sources. Serialization always
creates a new dirstate-v2 data file and does not support (when Rust is not
enabled) appending to an existing one, since we don’t keep track of which
tree nodes are new or modified. Instead the tree is reconstructed during
serialization.
Differential Revision: https://phab.mercurial-scm.org/D11520
Raphaël Gomès <rgomes@octobus.net> [Thu, 22 Jul 2021 17:31:37 +0200] rev 48222
dirstate-v2: Initial Python serializer
This adds code seralizing a `map` and `copy_map` dicts into dirstate-v2
file formate. This is not used yet.
Differential Revision: https://phab.mercurial-scm.org/D11519
Simon Sapin <simon.sapin@octobus.net> [Sun, 03 Oct 2021 13:18:03 +0200] rev 48221
dirstate-v2: initial Python parser
The dirstate-v2 file format should be supported even if Rust extensions are
not enabled. This changeset adds parsing code that is not used yet.
Differential Revision: https://phab.mercurial-scm.org/D11518
Simon Sapin <simon.sapin@octobus.net> [Fri, 08 Oct 2021 13:15:22 +0200] rev 48220
dirstate: Move more methods to the _dirstatemapcommon base class
This reduces duplication slightly and will help with supporting dirstate-v2
when Rust is not enabled.
Differential Revision: https://phab.mercurial-scm.org/D11621