Raphaël Gomès <rgomes@octobus.net> [Thu, 24 Oct 2024 18:04:26 +0200] rev 52087
test-lfs-serve-access: vastly simplify the error output check
The traceback differences between all supported Python versions is about to
become insane to handle, so let's check what we're actually looking to check.
Felipe Resende <felipe@fcresende.dev.br> [Sun, 31 Mar 2024 17:57:46 -0300] rev 52086
subrepo: propagate non-default path on outgoing
There was already a fix made in
5dbff89cf107 for pull and push commands. I did
the same for the outgoing command.
The problem I identified is that when the parent repository has multiple paths,
the outgoing command was not respecting the parent path used and was always
using the default path for subrepositories.
Felipe Resende <felipe@fcresende.dev.br> [Fri, 25 Oct 2024 01:14:53 +0200] rev 52085
outgoing: pre-indent some code
This will make the next changeset clearer.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 25 Oct 2024 01:23:24 +0200] rev 52084
outgoing: move sorting in the display function
This make the core code simpler.
Felipe Resende <felipe@fcresende.dev.br> [Fri, 25 Oct 2024 01:04:38 +0200] rev 52083
outgoing: extract changeset display in its own function
This will clarify future patches.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 11 Jun 2024 14:35:52 +0200] rev 52082
subrepo: move code around
Arseniy Alekseyev <aalekseyev@janestreet.com [Thu, 24 Oct 2024 17:35:53 +0200] rev 52081
merge: add a config to allow conflict-free merge of changes on adjacent lines
This change adds a config to make it no longer a conflict to merge changes
made on adjacent lines.
The reason these changes are considered a conflict is that there's no
region of text at the relevant position (sync region) that's kept unchanged
by both sides of the merge.
The problem can be solved by making the sync regions being a bit more
powerful: we can keep a 0-length sync region if we find that
a block unchanged by one side is ajacent to a block unchanged by the
other side.
Since these 0-length sync regions are emitted using the ~same algorithm
as the normal non-empty sync regions, this change involves no arbitrary
decisions and I expect it to work pretty well.
0-length sync regions do create an ambiguity in a special case where two
pairs of adjacent regions "meet" at the same point. This corresponds to
an insertion made at the same place by the two sides of the merge, and
this still results in a conflict.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 17:08:57 -0400] rev 52080
localrepo: drop the CamelCase name for `localrepo.ilocalrepositorymain`
See
61557734c0ae for the reasoning. This one is slightly different, however,
because the `localrepository` class already subclasses the interface class in
the type checking phase.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 17:04:59 -0400] rev 52079
localrepo: drop the CamelCase name for `localrepo.revlognarrowfilestorage`
See
61557734c0ae for the reasoning.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 17:03:33 -0400] rev 52078
localrepo: drop the CamelCase name for `localrepo.revlogfilestorage`
See
61557734c0ae for the reasoning.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 17:01:35 -0400] rev 52077
localrepo: drop the CamelCase name for `localrepo.locallegacypeer`
See
61557734c0ae for the reasoning.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:59:43 -0400] rev 52076
localrepo: drop the CamelCase name for `localrepo.localpeer`
See
61557734c0ae for the reasoning.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:51:18 -0400] rev 52075
localrepo: drop the CamelCase name for `localrepo.localcommandexecutor`
See
61557734c0ae for the reasoning.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:48:46 -0400] rev 52074
manifest: drop the CamelCase name for `manifest.treemanifestctx`
See
61557734c0ae for the reasoning.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:45:12 -0400] rev 52073
manifest: drop the CamelCase name for `manifest.memtreemanifestctx`
See
61557734c0ae for the reasoning.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:43:22 -0400] rev 52072
manifest: drop the CamelCase name for `manifest.manifestctx`
See
61557734c0ae for the reasoning.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:41:02 -0400] rev 52071
manifest: drop the CamelCase name for `manifest.memmanifestctx`
See
61557734c0ae for the reasoning.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:39:12 -0400] rev 52070
manifest: drop the CamelCase name for `manifest.manifestlog`
See
61557734c0ae for the reasoning.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:36:50 -0400] rev 52069
manifest: drop the CamelCase name for `manifest.manifestrevlog`
See
61557734c0ae for the reasoning.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:32:34 -0400] rev 52068
manifest: drop the CamelCase name for `manifest.treemanifest`
See
61557734c0ae for the reasoning.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:30:23 -0400] rev 52067
manifest: drop the CamelCase name for `manifest.manifestdict`
See
61557734c0ae for the reasoning.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:24:18 -0400] rev 52066
filelog: drop the CamelCase name for `filelog.filelog`
See
61557734c0ae for the reasoning.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:22:21 -0400] rev 52065
revlog: drop the CamelCase name for `revlog.revlogproblem`
See
61557734c0ae for the reasoning.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:19:24 -0400] rev 52064
revlog: drop the CamelCase name for `revlog.revlogrevisiondelta`
These CamelCase names popped up this cycle because pytype was getting confused
by the zope decorator, and so the decoration was decoupled from the class
declaration. We're in the process of switching all of the zope interfaces to
`typing.Protocol` classes, but we're up against the code freeze. It would be
nice to use CamelCase for protocol classes (or classes in general), but let's
reset to a consistent state and buy some more time to think about this.
Since we're moving to Protocol classes and I disabled the interface tests back
in
ef7d85089952, I'm not bothering to re-add the decorator, and re-confuse
pytype. But do place the interface next to the class, so that these places can
be found with the `grep` when the time comes to subclass.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 23 Oct 2024 16:14:13 +0200] rev 52063
tests: use pyflakes as a tool, not a python module
The usage of pyflakes as a Python module was introduced in
e397c6d74652, to work
around issue between Python 2 and Python 3. This issues are long behind us now
and we can get beck to using pyflakes as a tool, giving us more flexibility
about how we install it.
The `hghave` requirements is modified to check that we have a tool available,
instead of a python module.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 22 Oct 2024 15:50:47 +0200] rev 52062
clang-format: do not accept version above 19.x
This gives me different formatting on latest version available in Debian. So
disabling for now.
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2024 17:21:03 +0200] rev 52061
rust-update: add a config item to disable the Rust update fastpath
Explanations inline.
Raphaël Gomès <rgomes@octobus.net> [Tue, 01 Oct 2024 13:49:11 +0200] rev 52060
update: add a Rust fast-path when updating from null (and clean)
This case is easy to detect and we have all we need to generate a valid
working copy and dirstate entirely in Rust, which speeds things up
considerably:
On my machine updating a repo of ~300k files goes from 10.00s down to 4.2s,
all while consuming 50% less system time, with all caches hot.
Something to note is that further improvements will probably happen
with the upcoming `InnerRevlog` series that does smarter
mmap hanlding, especially for filelogs.
Here are benchmark numbers on a machine with only 4 cores (and no SMT enabled)
```
### data-env-vars.name = heptapod-public-2024-03-25-ds2-pnm
# benchmark.name = hg.command.update
# bin-env-vars.hg.py-re2-module = default
# bin-env-vars.hg.changeset.node = <this change>
# benchmark.variants.atomic-update = no
# benchmark.variants.scenario = null-to-tip
# benchmark.variants.worker = default
default: 5.328762 ~~~~~
rust: 1.308654 (-75.44%, -4.02)
### data-env-vars.name = mercurial-devel-2024-03-22-ds2-pnm
# benchmark.name = hg.command.update
# bin-env-vars.hg.py-re2-module = default
# bin-env-vars.hg.changeset.node = <this change>
# benchmark.variants.atomic-update = no
# benchmark.variants.scenario = null-to-tip
# benchmark.variants.worker = default
default: 1.693271 ~~~~~
rust: 1.151053 (-32.02%, -0.54)
### data-env-vars.name = mozilla-unified-2024-03-22-ds2-pnm
# benchmark.name = hg.command.update
# bin-env-vars.hg.py-re2-module = default
# bin-env-vars.hg.changeset.node = <this change>
# benchmark.variants.atomic-update = no
# benchmark.variants.scenario = null-to-tip
# benchmark.variants.worker = default
default: 38.901613 ~~~~~
rust: 11.637880 (-70.08%, -27.26)
### data-env-vars.name = netbsd-xsrc-public-2024-09-19-ds2-pnm
# benchmark.name = hg.command.update
# bin-env-vars.hg.py-re2-module = default
# bin-env-vars.hg.changeset.node = <this change>
# benchmark.variants.atomic-update = no
# benchmark.variants.scenario = null-to-tip
# benchmark.variants.worker = default
default: 4.793727 ~~~~~
rust: 1.505905 (-68.59%, -3.29)
```
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2024 19:14:30 +0200] rev 52059
merge: improve working-copy mtime race handling
Explanations inline. This also makes use of `make_mtime_reliable`, which
unifies our mtime raciness logic from the status.
On top of this, this fixes the handling of the pure dirstate status to better
catch racy status, as we've been doing in Rust for a long time now.
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2024 18:56:19 +0200] rev 52058
merge: move the filtering of ambiguous files to a dedicated function
I have multiple reasons:
- The body of `_update` is way too long
- This adds typing which will help our tooling and brains understand this
code more easily
- This function will get more nested and complex in the next patch
I've taken the liberty of rewrapping and typo-passing the docstring.
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2024 18:41:49 +0200] rev 52057
timestamp: make the reliable comparison more usable from outside
This is going to be used with pre-computed times unlike in status.
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2024 18:40:59 +0200] rev 52056
timestamp: add type information to the module
This is easy to do and helps both Pytype and developpers understand what
objects they are dealing with.
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2024 17:19:38 +0200] rev 52055
rust-dirstate: make the reliable timestamp comparison more usable from outside
This is going to be used with pre-computed times unlike in status.
Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Oct 2024 16:35:31 +0200] rev 52054
rust-dirstate-map: use a more precise identity
This is closer to the behavior of what Python does. So far, we were checking
only the inode, but this might not be good enough for the v1 case.
Raphaël Gomès <rgomes@octobus.net> [Mon, 14 Oct 2024 14:14:21 +0200] rev 52053
dirstate-map: add a missing debug wait point when accessing the v2 docket
fc8e37c380d3 added synchronization points to the dirstate to allow for race
condition testing without actually requiring a time-based race condition
to happen.
This changes adds the `pre-read-file` wait point before we read the docket,
since callers might ask for the parents before anything else is
read, leading to the first read being done before the wait point.
This removes some differences in test output which were presumed to be
speed related, but weren't.
Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Oct 2024 00:31:25 +0200] rev 52052
rust-parsers: use the same error message as with the higher-level code
This can happen at two places, but it's not really enough time to justify it
being refactored. Let's ensure we have the same error message, the newer one
being slightly more helpful.
Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Oct 2024 01:52:44 +0200] rev 52051
rust-pathauditor: make sure we actually test the nested repo case
This covers the *on-disk* case, where the path itself does not have a `.hg`
component.
Raphaël Gomès <rgomes@octobus.net> [Wed, 02 Oct 2024 20:29:48 +0200] rev 52050
rust-pathauditor: match more of Python's behavior and display messages
We will make use of the path auditor when running our update fast-path,
and we want to output of it to be close enough.
Raphaël Gomès <rgomes@octobus.net> [Wed, 02 Oct 2024 18:31:32 +0200] rev 52049
rust-dirstate: pass dirstate tracked key from the requirements
We will make use of this with the `hg update` fastpath
Raphaël Gomès <rgomes@octobus.net> [Wed, 02 Oct 2024 13:39:43 +0200] rev 52048
rust-files: check for empty manifests caused by narrow
Explanations inline
Raphaël Gomès <rgomes@octobus.net> [Wed, 02 Oct 2024 13:36:51 +0200] rev 52047
rust-repo: don't use on-disk dirstate parents in v1
This mistake was not causing any problems yet since we were never updating
parents from Rust code. This is about to change, so let's fix it.
Raphaël Gomès <rgomes@octobus.net> [Tue, 01 Oct 2024 13:45:18 +0200] rev 52046
rust-cpython: add a util to get a `Repo` from a python path
I suspect this will not be the last time we need to do something like this.
Raphaël Gomès <rgomes@octobus.net> [Tue, 01 Oct 2024 13:20:40 +0200] rev 52045
rust: improve `InvalidRevision` error message
I encountered this when debugging earlier and felt like we were losing some
information along the way, which we were!
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 17:19:35 +0200] rev 52044
rust-dirstate: use a struct as arguments for the high-level `reset_state`
This makes the interface a lot clearer at the call site and prevents silly
mistakes, as an API with a bunch of booleans is prone to errors.
This refactor adds a `from_empty` parameter for a fast-path when resetting
and entry we're sure does not exist. It will be used in the upcoming update
Rust fastpath, and was not split to prevent more churn.
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 16:55:11 +0200] rev 52043
rust: implement `From<SparseConfigWarning>` for `HgError`
This will be useful in a future patch to avoid a lot of boilerplate.
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 16:04:51 +0200] rev 52042
rust-hg-cpython: add an `HgProgressBar` util
This will be the entry point for all progress bars from a Python context
in upcoming patches. Like the `Progress` trait, this is subject to change
once we have more use cases, but this is good enough for now.
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 16:02:30 +0200] rev 52041
rust: add `Progress` trait for progress bars
This will be used in the next few changes to introduce a progress bar for
the `hg update` fastpath.
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 19:15:19 +0200] rev 52040
rust-files: separate the listing of files from a revset and a revision
We won't need to parse a revset all the time, and an upcoming patch will make
use of this new util.
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 19:12:42 +0200] rev 52039
rust-files: add a `Sync` bound to the matcher
This enables us to use this code in multithreaded environements, which we
very much want to do.
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 12:10:35 +0200] rev 52038
rust-files: also return filenode and flags when listing a revision's files
This is going to be useful when implementing parts of `update` and makes it
so we don't have to fetch the manifest and each entry twice.
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 12:08:49 +0200] rev 52037
rust-manifest: encode flags as `Option<NonZeroU8>`
This makes the compiler use the niche optimization for all flags: since 0 is
not a valid representation of any flags, we can use 0 as a replacement for
`None`, which reduces memory footprint and could yield a little performance
improvement over many iterations.
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 17:46:52 +0200] rev 52036
rust-repo: add a method to set the current parents
This will be useful when we start writing an `hg update` fastpath.
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 17:46:24 +0200] rev 52035
rust-repo: add a method to get a `Node` from a `Revision` to the `Repo`
This is going to be more and more useful as we start writing higher-level code
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 17:45:10 +0200] rev 52034
rust-utils: move the `filesystem_now` function to a util
This is going to be useful for an upcoming `hg update` fastpath.
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 17:43:51 +0200] rev 52033
rust-dirstate: actually remember the identity
This was an oversight that likely had no influence on anything since we have
only been writing the dirstate for status. We will start writing the dirstate
for more operations now, so we'll need this fixed.
Raphaël Gomès <rgomes@octobus.net> [Wed, 21 Aug 2024 09:48:14 +0200] rev 52032
mergestate: reduce the number of attribute lookups
This code is called a lot during updates, this is a very small but also very
easy thing to do.
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Oct 2024 14:02:28 +0200] rev 52031
test-lfs-serve-access: account for output differences in Python 3.12
This test is quite noisy, but the fix was very easy.
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Oct 2024 13:49:54 +0200] rev 52030
patchbomb: don't test ambiguous address
This is a bug in Python's `email` package and shouldn't be relied on.
Python 3.12 has fixed this problemĀ¹ and raises an exception. We keep the
multiple `-t` because this is still relevant for testing.
[1] https://github.com/python/cpython/issues/102988
[2] https://docs.python.org/3/whatsnew/changelog.html
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Oct 2024 11:48:09 -0400] rev 52029
contrib: install pip 24.2 in the Windows dependency installer script
One of the modern pythons was crying about the old version importing `distutils`.
Matt Harbison <matt_harbison@yahoo.com> [Sat, 19 Oct 2024 01:22:25 -0400] rev 52028
contrib: install the latest py 3.11-3.13 in the Windows dependency script
Note that python 3.11 adds an installer for arm64, which we ignore here because
I don't have a Windows system running arm64, and it's likely we will be dropping
support for some platforms before I get my hands on one.