Wed, 16 Oct 2024 18:56:19 +0200 merge: move the filtering of ambiguous files to a dedicated function
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.
Wed, 16 Oct 2024 18:41:49 +0200 timestamp: make the reliable comparison more usable from outside
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.
Wed, 16 Oct 2024 18:40:59 +0200 timestamp: add type information to the module
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.
Wed, 16 Oct 2024 17:19:38 +0200 rust-dirstate: make the reliable timestamp comparison more usable from outside
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.
Thu, 03 Oct 2024 16:35:31 +0200 rust-dirstate-map: use a more precise identity
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.
Mon, 14 Oct 2024 14:14:21 +0200 dirstate-map: add a missing debug wait point when accessing the v2 docket
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.
Thu, 03 Oct 2024 00:31:25 +0200 rust-parsers: use the same error message as with the higher-level code
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.
Thu, 03 Oct 2024 01:52:44 +0200 rust-pathauditor: make sure we actually test the nested repo case
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.
Wed, 02 Oct 2024 20:29:48 +0200 rust-pathauditor: match more of Python's behavior and display messages
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.
Wed, 02 Oct 2024 18:31:32 +0200 rust-dirstate: pass dirstate tracked key from the requirements
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
Wed, 02 Oct 2024 13:39:43 +0200 rust-files: check for empty manifests caused by narrow
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
Wed, 02 Oct 2024 13:36:51 +0200 rust-repo: don't use on-disk dirstate parents in v1
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.
Tue, 01 Oct 2024 13:45:18 +0200 rust-cpython: add a util to get a `Repo` from a python path
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.
Tue, 01 Oct 2024 13:20:40 +0200 rust: improve `InvalidRevision` error message
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!
Mon, 30 Sep 2024 17:19:35 +0200 rust-dirstate: use a struct as arguments for the high-level `reset_state`
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.
Mon, 30 Sep 2024 16:55:11 +0200 rust: implement `From<SparseConfigWarning>` for `HgError`
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.
Mon, 30 Sep 2024 16:04:51 +0200 rust-hg-cpython: add an `HgProgressBar` util
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.
Mon, 30 Sep 2024 16:02:30 +0200 rust: add `Progress` trait for progress bars
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.
Mon, 30 Sep 2024 19:15:19 +0200 rust-files: separate the listing of files from a revset and a revision
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.
Mon, 30 Sep 2024 19:12:42 +0200 rust-files: add a `Sync` bound to the matcher
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.
Mon, 30 Sep 2024 12:10:35 +0200 rust-files: also return filenode and flags when listing a revision's files
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.
Mon, 30 Sep 2024 12:08:49 +0200 rust-manifest: encode flags as `Option<NonZeroU8>`
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.
Mon, 30 Sep 2024 17:46:52 +0200 rust-repo: add a method to set the current parents
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.
Mon, 30 Sep 2024 17:46:24 +0200 rust-repo: add a method to get a `Node` from a `Revision` to the `Repo`
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
Mon, 30 Sep 2024 17:45:10 +0200 rust-utils: move the `filesystem_now` function to a util
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.
Mon, 30 Sep 2024 17:43:51 +0200 rust-dirstate: actually remember the identity
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.
Wed, 21 Aug 2024 09:48:14 +0200 mergestate: reduce the number of attribute lookups
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.
Wed, 23 Oct 2024 14:02:28 +0200 test-lfs-serve-access: account for output differences in Python 3.12 stable
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.
Wed, 23 Oct 2024 13:49:54 +0200 patchbomb: don't test ambiguous address stable
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
Mon, 21 Oct 2024 11:48:09 -0400 contrib: install pip 24.2 in the Windows dependency installer script
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`.
Sat, 19 Oct 2024 01:22:25 -0400 contrib: install the latest py 3.11-3.13 in the Windows dependency script
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.
Sat, 19 Oct 2024 01:05:50 -0400 contrib: update to the latest py3.9 and 3.10 in the Windows dependency script
Matt Harbison <matt_harbison@yahoo.com> [Sat, 19 Oct 2024 01:05:50 -0400] rev 52027
contrib: update to the latest py3.9 and 3.10 in the Windows dependency script Python3.8 was already at its last version with an installer, FWIW.
Sat, 19 Oct 2024 00:57:52 -0400 contrib: drop python 3.7 from the Windows dependency installer script
Matt Harbison <matt_harbison@yahoo.com> [Sat, 19 Oct 2024 00:57:52 -0400] rev 52026
contrib: drop python 3.7 from the Windows dependency installer script I'm tempted to drop 3.8 too, since we use 3.9 on Windows.
Sat, 19 Oct 2024 00:50:49 -0400 contrib: drop python 3.5 requirements file for Linux automation
Matt Harbison <matt_harbison@yahoo.com> [Sat, 19 Oct 2024 00:50:49 -0400] rev 52025
contrib: drop python 3.5 requirements file for Linux automation The new minimum this cycle is py3.8.
Wed, 16 Oct 2024 18:06:36 -0400 windows: implement `util.cachestat` to fix numerous dirstate problems stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 16 Oct 2024 18:06:36 -0400] rev 52024
windows: implement `util.cachestat` to fix numerous dirstate problems I got here by bisecting the issue1790 related failure on Windows to keep an entry from being marked "unset" in `test-dirstate.t` back to eedbf8256263. There were a handful of other tests failing with an unexpected dirstate entry state like this, as well as numerous "skip updating dirstate: identity mismatch" messages added to various tests, as well as an issue with dirstate wrapping with the largefiles extension[1], all of which appear to be fixed by this. In total, ~25 tests are fully fixed on Windows with this change on default. This is basically a copy/paste of the posix implementation, but we drop the `st_mode` comparison- I think the only reason we care about the mode on posix is to detect +/-x mode changes, but the executable bits on Windows are synthesized based on the name of the file[2]. None of the other parts of the codebase are equipped to handle executable bits in the filesystem on Windows anyway, so it doesn't make sense to worry about them here. Note that `st_uid` and `st_gid` seem to always be 0 on Windows (and I can't find them being initialized), so they can probably be dropped from the comparison. But I doubt they matter any more on posix, since we don't track ownership. The `st_ino`, `st_dev`, and `st_nlink` attributes all seem to have reasonable values for comparing like on posix[3]. Also note that `st_ctime` is apparently deprecated in 3.12+ (for reasons I haven't explored)[4]. [1] https://foss.heptapod.net/mercurial/mercurial-devel/-/merge_requests/884 [2] https://github.com/python/cpython/blob/aab3210271136ad8e8fecd927b806602c463e1f2/Modules/posixmodule.c#L1948 [3] https://github.com/python/cpython/blob/aab3210271136ad8e8fecd927b806602c463e1f2/Python/fileutils.c#L1158 [4] https://github.com/python/cpython/blob/aab3210271136ad8e8fecd927b806602c463e1f2/Modules/posixmodule.c#L2200
Mon, 04 Feb 2019 23:32:20 -0800 extdiff: don't run gui programs when in a cli-only environment
Ludovic Chabant <ludovic@chabant.com> [Mon, 04 Feb 2019 23:32:20 -0800] rev 52023
extdiff: don't run gui programs when in a cli-only environment In order to provide a useful error message to override the behavior, we also need to slightly change the way that tool.gui is found in the config. Before, it had to be where tool.diffargs is located, which might not exist. Now, tool.isgui can exist on its own. A test is added for the new error message. We also need to force procutil.isgui() to return true, so we set $DISPLAY to a non-empty value before running any test expecting to have a gui.
Wed, 28 Dec 2022 21:33:44 -0800 bookflow: fix bullet list indentation in docstring
Ludovic Chabant <ludovic@chabant.com> [Wed, 28 Dec 2022 21:33:44 -0800] rev 52022
bookflow: fix bullet list indentation in docstring
Mon, 09 Oct 2023 22:14:24 -0700 doc: generate separate commands/topics/extension pages
Ludovic Chabant <ludovic@chabant.com> [Mon, 09 Oct 2023 22:14:24 -0700] rev 52021
doc: generate separate commands/topics/extension pages This change modifies gendoc.py and Makefile so that individual pages for commands, help topics, and extensions can be generated. A new index page is also generated with links to all these pages. This makes it easier to look up and search the help text of a given command or topic, instead of having to deal with the giant hg.1 "all-in-one" page. Since the list of individual pages varies based on the source code, we generate a dynamic Makefile that contains this list of files as individual targets. This gives us fine-grained control over output files. However, it greatly increases the time spent generating all help pages. It's recommended to run make with -j to make use of multi-core archs. Individual man pages are produced in doc/man, and HTML ones are in doc/html
Mon, 09 Oct 2023 22:11:21 -0700 doc: refactor gendoc for better reusability
Ludovic Chabant <ludovic@chabant.com> [Mon, 09 Oct 2023 22:11:21 -0700] rev 52020
doc: refactor gendoc for better reusability This change separates the gathering of commands/topics/etc from the logic of printing their documentation out.
Tue, 01 Oct 2024 16:07:51 +0200 stream: prefer keeping an open file handle to volatile file instead of copy
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 01 Oct 2024 16:07:51 +0200] rev 52019
stream: prefer keeping an open file handle to volatile file instead of copy We will still do copy if too many file handle are open. Currently, have less than 10 volatile files in typical usage, so we should be fine. See inline documentation for details.
Tue, 01 Oct 2024 15:55:49 +0200 stream: remove __getitem__ from the VolatileManager
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 01 Oct 2024 15:55:49 +0200] rev 52018
stream: remove __getitem__ from the VolatileManager It is no longer used and that API will get in the way of the new order.
Tue, 01 Oct 2024 15:55:29 +0200 stream: open volatile file through the manager
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 01 Oct 2024 15:55:29 +0200] rev 52017
stream: open volatile file through the manager To do more subtle things, we need more control.
Mon, 14 Oct 2024 15:11:49 +0200 stream: rename TempCopyManager to VolatileManager
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 14 Oct 2024 15:11:49 +0200] rev 52016
stream: rename TempCopyManager to VolatileManager We are going to be more subtle in our management of volatile file, so use a more semantic name.
Mon, 14 Oct 2024 12:12:34 -0400 ci: only use the macOS runner if manually invoked
Matt Harbison <matt_harbison@yahoo.com> [Mon, 14 Oct 2024 12:12:34 -0400] rev 52015
ci: only use the macOS runner if manually invoked Right now, we only have a single machine with a single runner, so don't create a bottleneck by default.
Tue, 08 Oct 2024 18:59:44 -0400 ci: add a runner for macos
Matt Harbison <matt_harbison@yahoo.com> [Tue, 08 Oct 2024 18:59:44 -0400] rev 52014
ci: add a runner for macos This is running from a venv, created with the packages from the requirements file in the `test-setup-future-work` topic being discussed separately. We can basically reuse the existing `test_c` configuration as-is, but there was one small issue- if the clone from the previous CI run is still present in `/tmp`, the clone for the current run fails. It's not a problem for the current setup because a new container is instantiated, so the easy fix is to simply delete the clone first. (The Windows CI avoids this by not cloning in the first place.) It looks like it takes ~80m to run the whole test suite on the current system.
Tue, 15 Oct 2024 13:52:21 +0200 branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 15 Oct 2024 13:52:21 +0200] rev 52013
branching: merge stable into default
Mon, 14 Oct 2024 16:46:25 +0200 tests: use shlex.quote instead of pipes.quote stable
Julien Cristau <jcristau@debian.org> [Mon, 14 Oct 2024 16:46:25 +0200] rev 52012
tests: use shlex.quote instead of pipes.quote The pipes module got removed in python 3.13. https://bugs.debian.org/1084553
Tue, 01 Oct 2024 12:29:10 +0200 branchmap-v3: make sure we write the cache after detecting pure-topo mode
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 01 Oct 2024 12:29:10 +0200] rev 52011
branchmap-v3: make sure we write the cache after detecting pure-topo mode We were properly detecting the pure topo-case but in some case the one disk cache file was never updated with that information.
(0) -30000 -10000 -3000 -1000 -300 -100 -48 +48 +100 tip