Fri, 16 Jul 2021 18:42:20 +0200 dirstate-v2: Add support when Rust is not enabled
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
Thu, 22 Jul 2021 17:31:37 +0200 dirstate-v2: Initial Python serializer
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
Sun, 03 Oct 2021 13:18:03 +0200 dirstate-v2: initial Python parser
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
Fri, 08 Oct 2021 13:15:22 +0200 dirstate: Move more methods to the _dirstatemapcommon base class
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
Wed, 13 Oct 2021 17:32:52 +0200 dirstate-v2: Add storage space for nanoseconds precision in file mtimes
Simon Sapin <simon.sapin@octobus.net> [Wed, 13 Oct 2021 17:32:52 +0200] rev 48219
dirstate-v2: Add storage space for nanoseconds precision in file mtimes For now the sub-second component is always set to zero for tracked files and symlinks. (The mtime of directories for the `readdir`-skipping optimization is a different code path and already uses the full precision available.) This extra storage uses the space previously freed by replacing the 32-bit `mode` field by two bits in the existing `flags` field, so the overall size of nodes is unchanged. (This space had been left as padding for this purpose.) Also move things around in the node layout and documentation to have less duplication. Now that they have the same representation, directory mtime and file mtime are kept in the same field. (Only either one can exist for a given node.) Differential Revision: https://phab.mercurial-scm.org/D11655
Wed, 13 Oct 2021 16:21:39 +0200 status: Extract TruncatedTimestamp from fs::Metadata without SystemTime
Simon Sapin <simon.sapin@octobus.net> [Wed, 13 Oct 2021 16:21:39 +0200] rev 48218
status: Extract TruncatedTimestamp from fs::Metadata without SystemTime On Unix, the Rust standard library exposes `mtime` and `mtime_nsec` methods for `std::fs::Metada` whih is exactly what we need to construct a `TruncatedTimestamp`. This skips the computation in the conversion through `SystemTime` and `Result<Duration, Duration>`. Differential Revision: https://phab.mercurial-scm.org/D11654
Fri, 17 Sep 2021 15:07:30 -0400 pyoxidizer: add the user site to `sys.path` on macOS
Matt Harbison <matt_harbison@yahoo.com> [Fri, 17 Sep 2021 15:07:30 -0400] rev 48217
pyoxidizer: add the user site to `sys.path` on macOS This allows 3rd party extensions that are installed with `pip` to be picked up, similar to what we do on Windows. PyOxidizer has a bug that prevents this from working without this extra help (see 95af358fcdfe), though it appears there's another wrinkle here with `sys._framework` too. I needed this to see if the problem[1] loading the keyring extension on Windows also occurs on macOS (it doesn't). [1] https://github.com/indygreg/PyOxidizer/issues/445 Differential Revision: https://phab.mercurial-scm.org/D11452
Fri, 17 Sep 2021 15:02:01 -0400 pyoxidizer: don't use in-memory for resources on macOS
Matt Harbison <matt_harbison@yahoo.com> [Fri, 17 Sep 2021 15:02:01 -0400] rev 48216
pyoxidizer: don't use in-memory for resources on macOS When trying to debug something else on macOS, pyoxidized builds were failing with the following message about pywatchman (and then cext.base85 when I commented out pywatchman): "cannot be loaded from memory but memory loading required" I don't have any immediate plans to do more work on macOS, but maybe this will save someone else time debugging this. Differential Revision: https://phab.mercurial-scm.org/D11451
Tue, 12 Oct 2021 14:12:41 -0700 chistedit: rename a confusingly named variable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Oct 2021 14:12:41 -0700] rev 48215
chistedit: rename a confusingly named variable I would expect `ctxs` contain instances of some class from the `context` module but it actually contains instances of `histeditrule`. Differential Revision: https://phab.mercurial-scm.org/D11653
Tue, 12 Oct 2021 14:28:51 -0700 chistedit: remove some local variable and access state on self instead
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Oct 2021 14:28:51 -0700] rev 48214
chistedit: remove some local variable and access state on self instead Now that we've replaced the state dict by a class, some of the local variables that just do `foo = self.foo` seem unnecessary. Differential Revision: https://phab.mercurial-scm.org/D11652
Tue, 12 Oct 2021 09:41:11 -0700 chistedit: move changeview() onto state class
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Oct 2021 09:41:11 -0700] rev 48213
chistedit: move changeview() onto state class Differential Revision: https://phab.mercurial-scm.org/D11649
Tue, 12 Oct 2021 09:38:04 -0700 chistedit: move cycleaction() onto state class
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Oct 2021 09:38:04 -0700] rev 48212
chistedit: move cycleaction() onto state class Differential Revision: https://phab.mercurial-scm.org/D11648
Tue, 12 Oct 2021 09:22:29 -0700 chistedit: move changeaction() onto state class
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Oct 2021 09:22:29 -0700] rev 48211
chistedit: move changeaction() onto state class Differential Revision: https://phab.mercurial-scm.org/D11647
Tue, 12 Oct 2021 09:20:46 -0700 chistedit: move swap() onto state class
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Oct 2021 09:20:46 -0700] rev 48210
chistedit: move swap() onto state class Differential Revision: https://phab.mercurial-scm.org/D11646
Tue, 12 Oct 2021 09:17:59 -0700 chistedit: move makeselection() onto state class
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Oct 2021 09:17:59 -0700] rev 48209
chistedit: move makeselection() onto state class Differential Revision: https://phab.mercurial-scm.org/D11645
Tue, 12 Oct 2021 09:16:14 -0700 chistedit: move changemode() onto state class
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Oct 2021 09:16:14 -0700] rev 48208
chistedit: move changemode() onto state class Differential Revision: https://phab.mercurial-scm.org/D11644
Tue, 12 Oct 2021 09:00:51 -0700 chistedit: move movecursor() onto state class
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Oct 2021 09:00:51 -0700] rev 48207
chistedit: move movecursor() onto state class Differential Revision: https://phab.mercurial-scm.org/D11643
Tue, 12 Oct 2021 08:56:56 -0700 chistedit: move patchcontents() onto state class
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Oct 2021 08:56:56 -0700] rev 48206
chistedit: move patchcontents() onto state class Differential Revision: https://phab.mercurial-scm.org/D11642
Tue, 12 Oct 2021 08:55:19 -0700 chistedit: move event() onto state class
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Oct 2021 08:55:19 -0700] rev 48205
chistedit: move event() onto state class Differential Revision: https://phab.mercurial-scm.org/D11641
Mon, 11 Oct 2021 23:07:54 -0700 chistedit: move renderpatch() and dependencies onto state class
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Oct 2021 23:07:54 -0700] rev 48204
chistedit: move renderpatch() and dependencies onto state class Differential Revision: https://phab.mercurial-scm.org/D11640
Mon, 11 Oct 2021 23:04:29 -0700 chistedit: move renderrules() onto state class
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Oct 2021 23:04:29 -0700] rev 48203
chistedit: move renderrules() onto state class Differential Revision: https://phab.mercurial-scm.org/D11639
Mon, 11 Oct 2021 23:02:49 -0700 chistedit: move layout() and dependencies onto state class
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Oct 2021 23:02:49 -0700] rev 48202
chistedit: move layout() and dependencies onto state class Differential Revision: https://phab.mercurial-scm.org/D11638
Mon, 11 Oct 2021 22:51:58 -0700 chistedit: move rendercommit() onto state class
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Oct 2021 22:51:58 -0700] rev 48201
chistedit: move rendercommit() onto state class Differential Revision: https://phab.mercurial-scm.org/D11637
Mon, 11 Oct 2021 22:47:37 -0700 chistedit: move view state from a dict to a custom class
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Oct 2021 22:47:37 -0700] rev 48200
chistedit: move view state from a dict to a custom class Differential Revision: https://phab.mercurial-scm.org/D11636
Wed, 13 Oct 2021 10:17:27 -0700 rhg: do not fail when the repo is empty
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 13 Oct 2021 10:17:27 -0700] rev 48199
rhg: do not fail when the repo is empty Differential Revision: https://phab.mercurial-scm.org/D11651
Tue, 12 Oct 2021 19:43:51 +0100 rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 12 Oct 2021 19:43:51 +0100] rev 48198
rhg: handle null changelog and manifest revisions Differential Revision: https://phab.mercurial-scm.org/D11650
Tue, 12 Oct 2021 15:43:45 +0200 rust: update the rust-cpython crate to 0.7.0
Simon Sapin <simon.sapin@octobus.net> [Tue, 12 Oct 2021 15:43:45 +0200] rev 48197
rust: update the rust-cpython crate to 0.7.0 This notably brings support for Python 3.10, and includes the panic message when propagating a Rust panic as a Python exception. https://github.com/dgrunwald/rust-cpython/blob/master/CHANGELOG.md#070---2021-10-09 Differential Revision: https://phab.mercurial-scm.org/D11630
Sun, 03 Oct 2021 13:14:43 +0200 dirstate-v2: Name a constant in the Rust implementation
Simon Sapin <simon.sapin@octobus.net> [Sun, 03 Oct 2021 13:14:43 +0200] rev 48196
dirstate-v2: Name a constant in the Rust implementation We are about to introduce a Python version of this code that will also need this constant. Differential Revision: https://phab.mercurial-scm.org/D11547
Tue, 12 Oct 2021 17:57:57 +0200 dirstate-v2: Replace the 32-bit `mode` field with two bits
Simon Sapin <simon.sapin@octobus.net> [Tue, 12 Oct 2021 17:57:57 +0200] rev 48195
dirstate-v2: Replace the 32-bit `mode` field with two bits Previously we stored the entire value from `stat_result.st_mode`, like dirstate-v1 does. However only the executable permission and type of file (only symbolic links and normal files are supported) are relevant to Mecurial. So replace this field with two bits in the existing bitfield byte. For now the unused space is left as padding, as it will be used for something else soon. Differential Revision: https://phab.mercurial-scm.org/D11635
Mon, 11 Oct 2021 18:37:21 +0200 dirstate-v2: Store unsigned integers inside DirstateEntry
Simon Sapin <simon.sapin@octobus.net> [Mon, 11 Oct 2021 18:37:21 +0200] rev 48194
dirstate-v2: Store unsigned integers inside DirstateEntry The negative marker values are not used anymore. Differential Revision: https://phab.mercurial-scm.org/D11634
Tue, 12 Oct 2021 16:38:13 +0200 dirstate-v2: Truncate directory mtimes to 31 bits of seconds
Simon Sapin <simon.sapin@octobus.net> [Tue, 12 Oct 2021 16:38:13 +0200] rev 48193
dirstate-v2: Truncate directory mtimes to 31 bits of seconds … instead of 64 bits, while keeping the sub-second presision. This brings the size of one timestamp from 12 bytes to 8 bytes. 31 bits is chosen instead of 32 because that’s already what happens for the mtime of files and symlinks, because dirstate-v1 uses negative i32 values as markers. Later we’ll add sub-second precision for file/symlink mtimes, making their dirstate-v2 representation the same as for directories. Differential Revision: https://phab.mercurial-scm.org/D11633
Tue, 12 Oct 2021 16:20:05 +0200 dirstate-v2: Separate Rust structs for Timestamp and PackedTimestamp
Simon Sapin <simon.sapin@octobus.net> [Tue, 12 Oct 2021 16:20:05 +0200] rev 48192
dirstate-v2: Separate Rust structs for Timestamp and PackedTimestamp PackedTimestamp is now exclusively for dirstate-v2 serialization purpose. It contains unaligned big-endian integers. Timestamp is used everywhere else and contains native Rust integers. Differential Revision: https://phab.mercurial-scm.org/D11632
Mon, 11 Oct 2021 22:19:42 +0200 dirstate-v2: Change the representation of negative directory mtime
Simon Sapin <simon.sapin@octobus.net> [Mon, 11 Oct 2021 22:19:42 +0200] rev 48191
dirstate-v2: Change the representation of negative directory mtime Change it from how I previously thought C’s `timespec` works to how it actually works. The previous behavior was also buggy for timestamps strictly before the epoch but less than one second away from it, because two’s complement does not distinguish negative zero from positive zero. Differential Revision: https://phab.mercurial-scm.org/D11629
Tue, 12 Oct 2021 15:29:05 +0200 dirstate-v2: Only convert from SystemTime to Timestamp and not back
Simon Sapin <simon.sapin@octobus.net> [Tue, 12 Oct 2021 15:29:05 +0200] rev 48190
dirstate-v2: Only convert from SystemTime to Timestamp and not back Converting from Timestamp back to SystemTime was only used for equality comparison, but this can also be done on Timestamp values. Differential Revision: https://phab.mercurial-scm.org/D11631
Fri, 08 Oct 2021 12:57:24 +0200 dirstate-v2: Swap the order of size and mtime on disk
Simon Sapin <simon.sapin@octobus.net> [Fri, 08 Oct 2021 12:57:24 +0200] rev 48189
dirstate-v2: Swap the order of size and mtime on disk This makes the dirstate-v2 file format match dirstate-v1 for the order of `mode`, `size`, and `mtime`. This order does not matter as long as these components are handled through named fields/attributes in code, but in a few places we still have tuples so having the same order everywhere might help avoid a bug that might not be obvious since those components have the same type. Differential Revision: https://phab.mercurial-scm.org/D11620
Mon, 11 Oct 2021 18:23:17 +0200 dirstate-v2: Document flags/mode/size/mtime fields of tree nodes
Simon Sapin <simon.sapin@octobus.net> [Mon, 11 Oct 2021 18:23:17 +0200] rev 48188
dirstate-v2: Document flags/mode/size/mtime fields of tree nodes This file format modification was previously left incomplete because of planned upcoming changes. Not all of these changes have been made yet, but documenting what exists today will help talking more widely about it. Differential Revision: https://phab.mercurial-scm.org/D11625
Wed, 08 Sep 2021 10:47:10 +0200 help: update help text for debug-repair-issue6528
Raphaël Gomès <rgomes@octobus.net> [Wed, 08 Sep 2021 10:47:10 +0200] rev 48187
help: update help text for debug-repair-issue6528 The changegroup fix was put in 5.9.1, this is now out of date. Alson, this can maybe encourage people to upgrade? Differential Revision: https://phab.mercurial-scm.org/D11392
Tue, 02 Mar 2021 09:33:25 -0800 dispatch: use detailed exit code 250 for keyboard interrupt
Martin von Zweigbergk <martinvonz@google.com> [Tue, 02 Mar 2021 09:33:25 -0800] rev 48186
dispatch: use detailed exit code 250 for keyboard interrupt Among our users at Google, we're still seeing several percent of commands fail with exit code 255. I suspect keyboard interrupts is an important remaining reason. This is a resend of D10086 with some fixes for pager handling added ahead of it. Differential Revision: https://phab.mercurial-scm.org/D11628
Fri, 08 Oct 2021 13:36:02 -0700 dispatch: ignore failure to flush ui
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Oct 2021 13:36:02 -0700] rev 48185
dispatch: ignore failure to flush ui When the pager dies, we get a `SIGPIPE`. That causes `error.SignalInterrupt` to be raised ` (from `ui._catchterm()`). Any further writes or flushes will cause further `SIGPIPE`s and furhter `error.SignalInterrupt`. If we write or flush outside of the try/except that handle `KeyboardInterrupt` (which `error.SignalInterrupt` is a subclass of), then control will escape from the `dispatch` module. Let's fix that by ignoring errors from flushing the ui. I would have rather fixed this by restoring the stdout and stderr streams when the pager dies, but it gets complicated because of multiple ui instances (ui/lui) and different pager setups between regular hg and chg. This changes a test in `test-pager.t`, but I don't understand why. I would have thought that all the output from the command should have gone to the broken pager. Differential Revision: https://phab.mercurial-scm.org/D11627
Fri, 08 Oct 2021 13:34:33 -0700 dispatch: don't change error status if flushing stdio fails
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Oct 2021 13:34:33 -0700] rev 48184
dispatch: don't change error status if flushing stdio fails If we already have a non-zero exit code, I don't think we should change it to 255 because we fail to flush stdio. This may not matter yet, but it will matter when I make a killed pager result in exit code 250 (it's currently 255). Differential Revision: https://phab.mercurial-scm.org/D11626
Mon, 11 Oct 2021 17:31:27 +0200 dirstate-v2: Use "byte sequence" in docs
Simon Sapin <simon.sapin@octobus.net> [Mon, 11 Oct 2021 17:31:27 +0200] rev 48183
dirstate-v2: Use "byte sequence" in docs The patch originally sent as https://phab.mercurial-scm.org/D11546 used "byte string" but that was changed during review to avoid suggesting Unicode or character encodings. However "byte range" sounds to be like a range of *indices* within a byte string/sequence elsewhere. This changes to "byte sequence". Python docs use "sequence" a lot when discussing the `bytes` type: https://docs.python.org/3/library/stdtypes.html Differential Revision: https://phab.mercurial-scm.org/D11623
Fri, 08 Oct 2021 11:06:03 +0200 rust: Make the hg-cpython crate default to Python 3
Simon Sapin <simon.sapin@octobus.net> [Fri, 08 Oct 2021 11:06:03 +0200] rev 48182
rust: Make the hg-cpython crate default to Python 3 This default is used when running `cargo` manually such as for `cargo test`. `setup.py` and `Makefile` both configure the Python major version explicitly. Differential Revision: https://phab.mercurial-scm.org/D11618
Sun, 03 Oct 2021 20:11:42 -0400 packaging: update the certifi dependency
Matt Harbison <matt_harbison@yahoo.com> [Sun, 03 Oct 2021 20:11:42 -0400] rev 48181
packaging: update the certifi dependency Not sure if this helps with recent certificate issues[1], but we might as well keep this modern. Note that certifi no longer claims py2 support, and there's a PR to add it back in[2]. Py2 support was dropped in 2020.04.05.2 (which predates what's being updated here). None of the *.py files have changed since the 2020.6.20 release, and I was able to call `certifi.where()` in both a virtualenv and with `hg debugshell` from an MSI install with this version, so we shouldn't be any worse off than before. [1] https://foss.heptapod.net/mercurial/tortoisehg/thg/-/issues/5745 [2] https://github.com/certifi/python-certifi/pull/154 Differential Revision: https://phab.mercurial-scm.org/D11609
Sun, 19 Sep 2021 01:36:37 -0400 setup: stop packaging python3.dll and python3X.dll in the wheel distribution
Matt Harbison <matt_harbison@yahoo.com> [Sun, 19 Sep 2021 01:36:37 -0400] rev 48180
setup: stop packaging python3.dll and python3X.dll in the wheel distribution Now that exewrapper is smart enough to find the DLLs it needs without help from the build script, backout ed286d150aa8 and 2960b7fac966. Note that this will require deleting the build/lib.win-amd64-3.X directory to actually remove it from the final wheel. Differential Revision: https://phab.mercurial-scm.org/D11455
Sun, 19 Sep 2021 01:23:16 -0400 exewrapper: find the proper python3X.dll in the registry
Matt Harbison <matt_harbison@yahoo.com> [Sun, 19 Sep 2021 01:23:16 -0400] rev 48179
exewrapper: find the proper python3X.dll in the registry Previously, we relied on the default library lookup[1], which for us is essentially to look on `PATH`. That has issues- the Python installations are not necessarily on `PATH`, so I started copying the DLLs locally in 2960b7fac966 and ed286d150aa8 during the build to work around that. However, it's been discovered that causes `python3.dll` and `python3X.dll` to get slipped into the wheel that gets distributed on PyPI. Additionally, Mercurial would fail to run in a venv if the Python environment that created it isn't on `PATH`, because venv creation doesn't copy the DLLs locally. The logic here is inspired by the `py.exe` launcher[2], though this is simpler because we don't care about the architecture- if this is a 32 bit process running on Win64, the registry reflection will redirect to where the 32 bit Python process wrote its keys. A nice unintended side effect is to also make venvs that don't have their root Python on `PATH` work without all of the code required to read `pyvenv.cfg`[3]. I don't see any reasonable way to create a venv without Python being installed (other than maybe building Python from source?), so punt on trying to read that file for now and save a bunch of string manipulation code. I somehow managed to corrupt my Windows user profile, and that makes the Microsoft Store python not run (even loading the DLL gives an access error), so I'm giving priority to both global and user specific python.org installations. Loading python3.dll is new, but when I went down the rabbit hole of implementing `pyvenv.cfg` support, I saw a comment[4] that led me to think we could have trouble if we don't. The comment in ed286d150aa8 confirms this, so we should probably bail out completely if Python3 can't be loaded from the registry, rather than getting something random on `PATH`. But I'll leave that for the default branch. [1] https://docs.microsoft.com/en-us/windows/win32/Dlls/dynamic-link-library-search-order#standard-search-order-for-desktop-applications [2] https://github.com/python/cpython/blob/adcd2205565f91c6719f4141ab4e1da6d7086126/PC/launcher.c#L249 [3] https://github.com/python/cpython/blob/bb3e0c240bc60fe08d332ff5955d54197f79751c/PC/getpathp.c#L707 [4] https://github.com/python/cpython/blob/bb3e0c240bc60fe08d332ff5955d54197f79751c/PC/getpathp.c#L1098 Differential Revision: https://phab.mercurial-scm.org/D11454
Thu, 02 Sep 2021 14:08:45 -0700 fix: reduce number of tool executions
Danny Hooper <hooper@google.com> [Thu, 02 Sep 2021 14:08:45 -0700] rev 48178
fix: reduce number of tool executions By grouping together (path, ctx) pairs according to the inputs they would provide to fixer tools, we can deduplicate executions of fixer tools to significantly reduce the amount of time spent running slow tools. This change does not handle clean files in the working copy, which could still be deduplicated against the files in the checked out commit. It's a little harder to do that because the filerev is not available in the workingfilectx (and it doesn't exist for added files). Anecdotally, this change makes some real uses cases at Google 10x faster. I think we were originally hesitant to do this because the benefits weren't obvious, and implementing it efficiently is kind of tricky. If we simply memoized the formatter execution function, we would be keeping tons of file content in memory. Also included is a regression test for a corner case that I broke with my first attempt at optimizing this code. Differential Revision: https://phab.mercurial-scm.org/D11280
Thu, 02 Sep 2021 14:07:55 -0700 fix: add test to demonstrate how many times tools are executed
Danny Hooper <hooper@google.com> [Thu, 02 Sep 2021 14:07:55 -0700] rev 48177
fix: add test to demonstrate how many times tools are executed The current implementation wastes a lot of effort invoking fixer tools more than once on the same file name+content. It is good to track changes in this behavior. Differential Revision: https://phab.mercurial-scm.org/D11279
Fri, 25 Jun 2021 15:00:08 +0530 rhg: add ui.plain() and check it before showing relative paths in status
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 25 Jun 2021 15:00:08 +0530] rev 48176
rhg: add ui.plain() and check it before showing relative paths in status Adds a very basic replica of `ui.plain()`. Differential Revision: https://phab.mercurial-scm.org/D10912
Tue, 05 Oct 2021 18:10:04 +0530 rhg: add relative paths support in `rhg status`
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 05 Oct 2021 18:10:04 +0530] rev 48175
rhg: add relative paths support in `rhg status` Differential Revision: https://phab.mercurial-scm.org/D11614
Tue, 05 Oct 2021 18:02:22 +0530 rhg: refactor function to relativize paths in utils
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 05 Oct 2021 18:02:22 +0530] rev 48174
rhg: refactor function to relativize paths in utils Commands like `files`, `status` supports printing relative paths. Hence we need to re-use this code in other places too. So let's take this out from `rhg files` into a utility function. Next patch will make `rhg status` use it. Differential Revision: https://phab.mercurial-scm.org/D11613
Wed, 06 Oct 2021 13:32:07 +0530 hg: let extensions call the func without populating opts keys
Sushil khanchi <sushilkhanchi97@gmail.com> [Wed, 06 Oct 2021 13:32:07 +0530] rev 48173
hg: let extensions call the func without populating opts keys This change is to help extensions by not forcing them to populate with opts[b'bundle'] and opts[b'force'] when calling hg.incoming(...) Differential Revision: https://phab.mercurial-scm.org/D11619
Tue, 05 Oct 2021 16:09:20 +0100 rhg: in rhg cat cli, fix the long name of the --rev flag
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 05 Oct 2021 16:09:20 +0100] rev 48172
rhg: in rhg cat cli, fix the long name of the --rev flag Also tweak the help for the anonymous argument. Differential Revision: https://phab.mercurial-scm.org/D11617
Thu, 24 Jun 2021 14:23:11 +0530 rhg: fallback if tweakdefaults or statuscopies is enabled with status
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 24 Jun 2021 14:23:11 +0530] rev 48171
rhg: fallback if tweakdefaults or statuscopies is enabled with status `rhg status` is experimental right now and does not support all functionalities. While the long term target is to implement them, for now we add a fallback to have all tests pass with `rhg status` enabled. Differential Revision: https://phab.mercurial-scm.org/D10906
Mon, 19 Jul 2021 04:13:50 +0530 largefiles: partially undo 61e526585b20e2ff15f19497d0451d18fea02db8 and child
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 19 Jul 2021 04:13:50 +0530] rev 48170
largefiles: partially undo 61e526585b20e2ff15f19497d0451d18fea02db8 and child Since the largefiles dirstate is now part of transaction, we get rid of this temporary fix which lived for ~7 years. Differential Revision: https://phab.mercurial-scm.org/D11612
Mon, 19 Jul 2021 04:12:14 +0530 largefiles: add tr backup for largefilesdirstate
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 19 Jul 2021 04:12:14 +0530] rev 48169
largefiles: add tr backup for largefilesdirstate This will help us in automatically restoring the largefilesdirstate if a transaction is rolled back. Differential Revision: https://phab.mercurial-scm.org/D11611
Mon, 19 Jul 2021 04:11:08 +0530 largefiles: pass current transaction to `lfdirstate.write()`
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 19 Jul 2021 04:11:08 +0530] rev 48168
largefiles: pass current transaction to `lfdirstate.write()` Right now, the largefile dirstate is not included in transaction which makes things complex. Next patch will add code to do so, so let's make it mandatory to pass current transaction and pass from all existing callers. Differential Revision: https://phab.mercurial-scm.org/D11610
Thu, 07 Oct 2021 10:23:57 -0400 merge: with stable
Augie Fackler <augie@google.com> [Thu, 07 Oct 2021 10:23:57 -0400] rev 48167
merge: with stable
Fri, 01 Oct 2021 12:17:09 +0200 dirstate-v2: Add internal documentation
Simon Sapin <simon.sapin@octobus.net> [Fri, 01 Oct 2021 12:17:09 +0200] rev 48166
dirstate-v2: Add internal documentation It can be viewed by running `hg help internals.dirstate-v2` Since that command rewraps paragraphs, the source text is written with semantic line breaks: https://sembr.org/ Differential Revision: https://phab.mercurial-scm.org/D11546
Fri, 01 Oct 2021 12:27:17 +0200 dirstate-v2: Move data file info in the docket closer together
Simon Sapin <simon.sapin@octobus.net> [Fri, 01 Oct 2021 12:27:17 +0200] rev 48165
dirstate-v2: Move data file info in the docket closer together Having `data_size` next to `uuid_size` (and the UUID itself) makes more sense. Differential Revision: https://phab.mercurial-scm.org/D11545
Fri, 01 Oct 2021 09:29:50 +0200 dirstate-item: drop the legacy new_normal constructor
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 09:29:50 +0200] rev 48164
dirstate-item: drop the legacy new_normal constructor Nobody is calling it anymore. Its purposes has been filled. Differential Revision: https://phab.mercurial-scm.org/D11608
Fri, 01 Oct 2021 09:29:32 +0200 dirstate-item: replace call to new_normal
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 09:29:32 +0200] rev 48163
dirstate-item: replace call to new_normal The constructor is on its way out, so we inline the last relevant call before dropping it. Differential Revision: https://phab.mercurial-scm.org/D11607
Fri, 01 Oct 2021 09:28:19 +0200 dirstate-item: replace a call to new_normal
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 09:28:19 +0200] rev 48162
dirstate-item: replace a call to new_normal The constructor is on its way out, so we inline a relevant call before dropping it. Differential Revision: https://phab.mercurial-scm.org/D11606
Fri, 01 Oct 2021 09:25:13 +0200 dirstate-item: drop the legacy new_possibly_dirty constructor
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 09:25:13 +0200] rev 48161
dirstate-item: drop the legacy new_possibly_dirty constructor Nobody is calling it anymore. Its purposes has been filled. Differential Revision: https://phab.mercurial-scm.org/D11605
Fri, 01 Oct 2021 09:24:48 +0200 dirstate-item: replace call to new_possibly_dirty
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 09:24:48 +0200] rev 48160
dirstate-item: replace call to new_possibly_dirty The constructor is on its way out, so we inline the last relevant call before dropping it. Differential Revision: https://phab.mercurial-scm.org/D11604
Fri, 01 Oct 2021 09:23:28 +0200 dirstate-item: drop the legacy new_from_p2 constructor
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 09:23:28 +0200] rev 48159
dirstate-item: drop the legacy new_from_p2 constructor Nobody is calling it anymore. Its purposes has been filled. Differential Revision: https://phab.mercurial-scm.org/D11603
Fri, 01 Oct 2021 09:21:52 +0200 dirstate-item: replace call to new_from_p2
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 09:21:52 +0200] rev 48158
dirstate-item: replace call to new_from_p2 The constructor is on its way out, so we inline the last relevant call before dropping it. Differential Revision: https://phab.mercurial-scm.org/D11602
Fri, 01 Oct 2021 09:16:53 +0200 dirstate-item: drop the legacy new_added constructor
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 09:16:53 +0200] rev 48157
dirstate-item: drop the legacy new_added constructor Nobody is calling it anymore. Its purposes has been filled. Differential Revision: https://phab.mercurial-scm.org/D11601
Fri, 01 Oct 2021 09:15:03 +0200 dirstate-item: replace call to new_added
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 09:15:03 +0200] rev 48156
dirstate-item: replace call to new_added The constructor is on its way out, so we inline the last relevant call before dropping it. Differential Revision: https://phab.mercurial-scm.org/D11600
Fri, 01 Oct 2021 09:14:10 +0200 dirstate-item: drop the legacy new_merged constructor
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 09:14:10 +0200] rev 48155
dirstate-item: drop the legacy new_merged constructor Nobody is calling it anymore. Its purposes has been filled. Differential Revision: https://phab.mercurial-scm.org/D11599
Fri, 01 Oct 2021 09:12:52 +0200 dirstate-item: replace call to new_merged
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 09:12:52 +0200] rev 48154
dirstate-item: replace call to new_merged The constructor is on its way out, so we inline the last relevant call before dropping it. Differential Revision: https://phab.mercurial-scm.org/D11598
Fri, 01 Oct 2021 03:30:00 +0200 dirstate-item: drop the `merged` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 03:30:00 +0200] rev 48153
dirstate-item: drop the `merged` property It has no user anymore. Differential Revision: https://phab.mercurial-scm.org/D11597
Fri, 01 Oct 2021 03:29:33 +0200 dirstate-item: replace another usage of `merged`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 03:29:33 +0200] rev 48152
dirstate-item: replace another usage of `merged` We simply spell out the logic here. This was the last usage of `merged`. Differential Revision: https://phab.mercurial-scm.org/D11596
Fri, 01 Oct 2021 03:28:01 +0200 dirstate-item: replace a `merged` usage with `p2_info`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 03:28:01 +0200] rev 48151
dirstate-item: replace a `merged` usage with `p2_info` It seems more accurate and no test complains (XXX hopefully XXX). Differential Revision: https://phab.mercurial-scm.org/D11595
Fri, 01 Oct 2021 03:26:12 +0200 dirstate-item: drop the `from_p2` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 03:26:12 +0200] rev 48150
dirstate-item: drop the `from_p2` property It has no user anymore. Differential Revision: https://phab.mercurial-scm.org/D11594
Fri, 01 Oct 2021 03:24:57 +0200 dirstate-item: directly use `p2_info` in `v1_size`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 03:24:57 +0200] rev 48149
dirstate-item: directly use `p2_info` in `v1_size` This is simpler. Differential Revision: https://phab.mercurial-scm.org/D11593
Fri, 01 Oct 2021 04:04:38 +0200 dirstate-item: use the `p2_info` property to replace more verbose call
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 04:04:38 +0200] rev 48148
dirstate-item: use the `p2_info` property to replace more verbose call Differential Revision: https://phab.mercurial-scm.org/D11592
Wed, 29 Sep 2021 02:06:04 +0200 status: process `from_p2` file the same as `merged` one
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 29 Sep 2021 02:06:04 +0200] rev 48147
status: process `from_p2` file the same as `merged` one What matters here is that the file constains information coming from the second parent and should be considered `modified` on plain `hg status. So we can process `from_p2` file sooner. It also highlight that we probably don't need the merged/from_p2 distinction at higher level. Differential Revision: https://phab.mercurial-scm.org/D11591
Fri, 01 Oct 2021 02:43:39 +0200 dirstate: drop an incorrect comment
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 02:43:39 +0200] rev 48146
dirstate: drop an incorrect comment We are actually checking that we are only in a case were the file might needs lookup before doing this. So the comment is not relevant. Differential Revision: https://phab.mercurial-scm.org/D11590
Fri, 01 Oct 2021 01:45:20 +0200 dirstate: drop some duplicated code
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 01:45:20 +0200] rev 48145
dirstate: drop some duplicated code The same operation is done a handful a line lower. Differential Revision: https://phab.mercurial-scm.org/D11589
Thu, 30 Sep 2021 16:33:12 +0200 dirstate: align the dirstate's API to the lower level ones
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 30 Sep 2021 16:33:12 +0200] rev 48144
dirstate: align the dirstate's API to the lower level ones This conclude the refactoring of this API. We can now finalize the dirstate v2 on disk format. Differential Revision: https://phab.mercurial-scm.org/D11587
Fri, 01 Oct 2021 04:07:21 +0200 dirstate-item: introduce a `p1_tracked` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 04:07:21 +0200] rev 48143
dirstate-item: introduce a `p1_tracked` property It is useful to simplify various conditional that use `any_tracked and not added`. Differential Revision: https://phab.mercurial-scm.org/D11586
Fri, 01 Oct 2021 04:04:09 +0200 dirstate-item: introduce a `p2_info` property that combine two others
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 04:04:09 +0200] rev 48142
dirstate-item: introduce a `p2_info` property that combine two others The `merged` and `from_p2` property are always used together so we can expose a combined property instead. Differential Revision: https://phab.mercurial-scm.org/D11585
Fri, 01 Oct 2021 02:01:12 +0200 dirstate: narrow gathering of parent data
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 02:01:12 +0200] rev 48141
dirstate: narrow gathering of parent data The parent data are only going to be useful is the file might be clean. And it might only be clean if it is tracked in both p1 and the working copy. Differential Revision: https://phab.mercurial-scm.org/D11584
Fri, 01 Oct 2021 01:27:53 +0200 dirstate: align the dirstatemap's API to the data change
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 01:27:53 +0200] rev 48140
dirstate: align the dirstatemap's API to the data change We are passing different data, so lets simplify the dirstatemap API too. Differential Revision: https://phab.mercurial-scm.org/D11583
Fri, 01 Oct 2021 18:49:33 +0200 dirstate-v2: Store a bitfield on disk instead of v1-like state
Simon Sapin <simon.sapin@octobus.net> [Fri, 01 Oct 2021 18:49:33 +0200] rev 48139
dirstate-v2: Store a bitfield on disk instead of v1-like state Differential Revision: https://phab.mercurial-scm.org/D11558
Fri, 01 Oct 2021 20:35:30 +0200 dirstate-item: change the internal storage and constructor value
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 20:35:30 +0200] rev 48138
dirstate-item: change the internal storage and constructor value This should be closer to what we do need and what we can actually reliably record. In practice it means that we abandon the prospect of storing much more refined data for now. We don't have the necessary information nor code using it right now. So it seems safer to just use a clearer version of what we had so far. See the documentation changes for details. Differential Revision: https://phab.mercurial-scm.org/D11557
Sat, 02 Oct 2021 11:39:57 +0200 dirstatemap: drop legacy method on the dirstatemap wrapper
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Oct 2021 11:39:57 +0200] rev 48137
dirstatemap: drop legacy method on the dirstatemap wrapper They are no longer in use now that the Rust wrapper version of the Dirstatemap are back in line with the Python one. Differential Revision: https://phab.mercurial-scm.org/D11582
Sat, 02 Oct 2021 00:15:24 +0200 dirstatemap: align the Rust wrapper implementation of `setparent`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Oct 2021 00:15:24 +0200] rev 48136
dirstatemap: align the Rust wrapper implementation of `setparent` We move to using `drop_merge_data` as intended. Differential Revision: https://phab.mercurial-scm.org/D11581
Sat, 02 Oct 2021 00:44:17 +0200 dirstatemap: fix copymap.pop in Rust to return the value it pops
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Oct 2021 00:44:17 +0200] rev 48135
dirstatemap: fix copymap.pop in Rust to return the value it pops I guess this was overlooked in the initial implementation? Without this, the next patch would, loose copy information in setparent. Differential Revision: https://phab.mercurial-scm.org/D11580
Sat, 02 Oct 2021 00:14:32 +0200 dirstate-item: implement `drop_merge_data` on the Rust DirstateItem
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Oct 2021 00:14:32 +0200] rev 48134
dirstate-item: implement `drop_merge_data` on the Rust DirstateItem It was currently missing and we want to be able to use in it the Rust case too. Differential Revision: https://phab.mercurial-scm.org/D11579
Sat, 02 Oct 2021 00:02:55 +0200 dirstatemap: use a common implement for reset_state
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Oct 2021 00:02:55 +0200] rev 48133
dirstatemap: use a common implement for reset_state Same logic as for `set_untracked` this make sure both implementation are aligned. The `reset_state` implementation for the Rust wrapped had signicantly diverged, this change finally put it back in line. Differential Revision: https://phab.mercurial-scm.org/D11578
Sat, 02 Oct 2021 00:01:56 +0200 dirstatemap: add a common `_drop_entry` method for dirstatemap
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Oct 2021 00:01:56 +0200] rev 48132
dirstatemap: add a common `_drop_entry` method for dirstatemap This method is called to remove DirstateItem from the map. Each variant have a different implementation (which is … the point). Differential Revision: https://phab.mercurial-scm.org/D11577
Fri, 01 Oct 2021 23:49:40 +0200 dirstatemap: use common code for set_clean
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 23:49:40 +0200] rev 48131
dirstatemap: use common code for set_clean Same logic before this make sure both implementation use the same logic for this. Differential Revision: https://phab.mercurial-scm.org/D11576
Fri, 01 Oct 2021 23:42:24 +0200 dirstatemap: use common code for set_possibly_dirty
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 23:42:24 +0200] rev 48130
dirstatemap: use common code for set_possibly_dirty Same logic before this make sure both implementation use the same logic for this. Differential Revision: https://phab.mercurial-scm.org/D11575
Fri, 01 Oct 2021 23:24:01 +0200 dirstatemap: use a common implement for set_tracked
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 23:24:01 +0200] rev 48129
dirstatemap: use a common implement for set_tracked Same logic as for `set_untracked` this make sure both implementation use the same logic for this. Differential Revision: https://phab.mercurial-scm.org/D11574
Fri, 01 Oct 2021 23:13:44 +0200 dirstatemap: add a common `_insert_entry` method for dirstatemap
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 23:13:44 +0200] rev 48128
dirstatemap: add a common `_insert_entry` method for dirstatemap This method is called to add a new DirstateItem to the map. Each variant have a different implementation (which is … the point). Differential Revision: https://phab.mercurial-scm.org/D11573
Fri, 01 Oct 2021 19:14:09 +0200 dirstatemap: use a common implementation for `dirstatemap.set_untracked`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 19:14:09 +0200] rev 48127
dirstatemap: use a common implementation for `dirstatemap.set_untracked` We can now make sure they use the same code, and drop the older, out of sync, implementation of `set_untracked` for the rust wrapper. Differential Revision: https://phab.mercurial-scm.org/D11572
Fri, 01 Oct 2021 18:54:40 +0200 dirstatemap: add a common `_refresh_entry` method for dirstatemap
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 18:54:40 +0200] rev 48126
dirstatemap: add a common `_refresh_entry` method for dirstatemap This method is called once a DirstateItem have been modified to apply the change on the dirstatemap if necessary. Each variant have a different implementation (which is … the point). We use `addfile` for the rustmap and not `set_dirstate_item` because we need to keep the internal counter up to date and `set_dirstate_item` does not do it. Differential Revision: https://phab.mercurial-scm.org/D11571
Fri, 01 Oct 2021 18:52:26 +0200 dirstatemap: create `_dirs_incr/_dirs_decr` methods on the common class
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 18:52:26 +0200] rev 48125
dirstatemap: create `_dirs_incr/_dirs_decr` methods on the common class The Rust wrapper does not need them. However having a default, no-op, implementation will help use to write code used by both implementation. Differential Revision: https://phab.mercurial-scm.org/D11570
Fri, 01 Oct 2021 18:49:21 +0200 dirstatemap: small rework of the `set_untracked` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 18:49:21 +0200] rev 48124
dirstatemap: small rework of the `set_untracked` method This shuffle the code a bit to have it flowing more "naturally". This will help us to create a common version of this code in the next changesets. Differential Revision: https://phab.mercurial-scm.org/D11569
Sat, 02 Oct 2021 12:10:46 +0200 dirstatemap: arrange methods by category
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Oct 2021 12:10:46 +0200] rev 48123
dirstatemap: arrange methods by category The dirstatemap code cover various aspects, it grow a bit messy over the years. So we shuffle the code around into some documented categories. This will help use to clean up the code. No code was changed in this changeset, only code move. Differential Revision: https://phab.mercurial-scm.org/D11568
Sat, 02 Oct 2021 12:01:50 +0200 dirstatemap: move a multiple simple functions in the common class
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Oct 2021 12:01:50 +0200] rev 48122
dirstatemap: move a multiple simple functions in the common class These are small and simple, lets factor them out. Differential Revision: https://phab.mercurial-scm.org/D11567
Fri, 01 Oct 2021 17:10:24 +0200 dirstatemap: rename `_rustmap` to `_map`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 17:10:24 +0200] rev 48121
dirstatemap: rename `_rustmap` to `_map` This match the name of the `map` for the other implementation and will make it simpler to share code between the two. Differential Revision: https://phab.mercurial-scm.org/D11566
Fri, 01 Oct 2021 16:52:44 +0200 dirstatemap: use a common __init__ for dirstatemap
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 16:52:44 +0200] rev 48120
dirstatemap: use a common __init__ for dirstatemap This is the first and simplest things to put in common. Differential Revision: https://phab.mercurial-scm.org/D11565
Fri, 01 Oct 2021 16:14:29 +0200 dirstatemap: introduce a common base for the dirstatemap class
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 16:14:29 +0200] rev 48119
dirstatemap: introduce a common base for the dirstatemap class We have two dirstatemaps class. One for the python version of the dirstate map and one for the Rust version (that has a python wrapper to deal with some aspect of it). We end up with duplicated code between them, so we introduce a common base class to start migrating common code in them. Differential Revision: https://phab.mercurial-scm.org/D11564
Tue, 28 Sep 2021 15:11:22 -0700 errors: raise InputError from revsingle() iff revset provided by the user
Martin von Zweigbergk <martinvonz@google.com> [Tue, 28 Sep 2021 15:11:22 -0700] rev 48118
errors: raise InputError from revsingle() iff revset provided by the user Same reasoning as for `revrange()` in an earlier patch. Differential Revision: https://phab.mercurial-scm.org/D11562
Tue, 28 Sep 2021 13:59:01 -0700 errors: raise InputError from revpair() iff revset provided by the user
Martin von Zweigbergk <martinvonz@google.com> [Tue, 28 Sep 2021 13:59:01 -0700] rev 48117
errors: raise InputError from revpair() iff revset provided by the user Same reasoning as for `revrange()` in an earlier patch. Differential Revision: https://phab.mercurial-scm.org/D11561
Tue, 28 Sep 2021 08:47:11 -0700 errors: raise InputError on bad revset to revrange() iff provided by the user
Martin von Zweigbergk <martinvonz@google.com> [Tue, 28 Sep 2021 08:47:11 -0700] rev 48116
errors: raise InputError on bad revset to revrange() iff provided by the user Most callers of `scmutil.revrange()` pass in a revset provided by the user. If there are problems resolving that, it should result in an `InputError` and exit code 10 (when using detailed exit codes). However, there are also some callers that pass in revsets not provided by the user. `InputError` is not appropriate in those cases. This patch therefore introduces a wrapper around `scmutil.revrange()` that simply converts the exception type. I put it in `logcmdutil.py` since that seems to be the lowest-level module in the (poorly defined) UI layer. Differential Revision: https://phab.mercurial-scm.org/D11560
Tue, 28 Sep 2021 09:08:43 -0700 phase: avoid a no-op resolution of revset from revnums
Martin von Zweigbergk <martinvonz@google.com> [Tue, 28 Sep 2021 09:08:43 -0700] rev 48115
phase: avoid a no-op resolution of revset from revnums I was surprised that `scmutil.revrange()` supports integers in the list of revsets. I think it's clearer to not pass a list that's known to contain only integers into the function. Differential Revision: https://phab.mercurial-scm.org/D11559
Fri, 01 Oct 2021 15:19:37 +0200 dirstate: push back the future a bit in the test
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 15:19:37 +0200] rev 48114
dirstate: push back the future a bit in the test The future was set to 2021-01-01, we push it by 10 years.
Thu, 30 Sep 2021 18:07:31 +0200 dirstate-item: point out that `merged` is set only with p1_tracked
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 30 Sep 2021 18:07:31 +0200] rev 48113
dirstate-item: point out that `merged` is set only with p1_tracked This is currently True, and we will use this fact to simplify the API in the next commit. However, we add this assertion first to validate that this is True in the whole test-suite.
Wed, 29 Sep 2021 01:23:10 +0200 dirstate-item: update the attribute documentation
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 29 Sep 2021 01:23:10 +0200] rev 48112
dirstate-item: update the attribute documentation It was very outdated. We are about to change these attribute so we should has well have them documented so that the change get easier to grasp.
Fri, 01 Oct 2021 03:50:37 +0200 dirstate-item: use `any_tracked` more
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 03:50:37 +0200] rev 48111
dirstate-item: use `any_tracked` more This simplify more code.
Fri, 01 Oct 2021 03:49:03 +0200 dirstate-item: drop an outdated comments
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 03:49:03 +0200] rev 48110
dirstate-item: drop an outdated comments This comment is no longer relevant since we moved away from the `state` internal representation, multiple weeks ago.
Fri, 01 Oct 2021 00:00:29 +0200 dirstate: remove a update_file's special case for `merged` file
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Oct 2021 00:00:29 +0200] rev 48109
dirstate: remove a update_file's special case for `merged` file This case was fishy and can be dealt with by passing more accurate data a higher level. This clarify the API and prepare for a larger rework of the data we feeds to the dirstate.
Thu, 30 Sep 2021 18:00:39 +0200 dirstate: remove a update_file's special case for tracked file with p2 data
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 30 Sep 2021 18:00:39 +0200] rev 48108
dirstate: remove a update_file's special case for tracked file with p2 data This case was fishy and can be dealt with by passing more accurate data a higher level. This clarify the API and prepare for a larger rework of the data we feeds to the dirstate.
Wed, 29 Sep 2021 02:34:32 +0200 dirstate: deprecate `__getitem__` access
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 29 Sep 2021 02:34:32 +0200] rev 48107
dirstate: deprecate `__getitem__` access If we want to drop `state` usage, we need to deprecate this. Differential Revision: https://phab.mercurial-scm.org/D11544
Wed, 29 Sep 2021 18:39:02 +0200 dirstate-item: use item's property instead of `state` in largefile
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 29 Sep 2021 18:39:02 +0200] rev 48106
dirstate-item: use item's property instead of `state` in largefile Differential Revision: https://phab.mercurial-scm.org/D11543
Wed, 29 Sep 2021 18:37:54 +0200 dirstate-item: use `added` instead of `state` when moving dirstate
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 29 Sep 2021 18:37:54 +0200] rev 48105
dirstate-item: use `added` instead of `state` when moving dirstate Differential Revision: https://phab.mercurial-scm.org/D11542
Wed, 29 Sep 2021 18:37:20 +0200 dirstate-item: use item's property instead of `state` in revert
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 29 Sep 2021 18:37:20 +0200] rev 48104
dirstate-item: use item's property instead of `state` in revert Differential Revision: https://phab.mercurial-scm.org/D11541
(0) -30000 -10000 -3000 -1000 -120 +120 +1000 +3000 tip