Mon, 25 Apr 2022 11:09:33 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 25 Apr 2022 11:09:33 +0200] rev 49200
branching: merge stable into default This also added the small fix need in Rust tests for the new `DirstateMap::pack_v2` API change in stable.
Tue, 19 Apr 2022 12:17:23 -0700 amend: move "return None for removed files" into block handling filestoamend
Kyle Lippincott <spectral@google.com> [Tue, 19 Apr 2022 12:17:23 -0700] rev 49199
amend: move "return None for removed files" into block handling filestoamend This is just a small logic cleanup from D12573, no change in behavior. Differential Revision: https://phab.mercurial-scm.org/D12576
Tue, 12 Apr 2022 17:35:25 +0200 rust-dirstatemap: remove unused helper from the old API
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:35:25 +0200] rev 49198
rust-dirstatemap: remove unused helper from the old API Differential Revision: https://phab.mercurial-scm.org/D12541
Tue, 12 Apr 2022 17:35:02 +0200 rust-status: stop using `state()` in the dispatch logic
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:35:02 +0200] rev 49197
rust-status: stop using `state()` in the dispatch logic Let's use the new API. Differential Revision: https://phab.mercurial-scm.org/D12540
Tue, 12 Apr 2022 17:34:18 +0200 rust-status: stop using `state()` in `handle_normal_file`
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:34:18 +0200] rev 49196
rust-status: stop using `state()` in `handle_normal_file` Let's use the new API Differential Revision: https://phab.mercurial-scm.org/D12539
Tue, 12 Apr 2022 17:30:34 +0200 rust-dirstatemap: stop using `state()` in the cache logic
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:30:34 +0200] rev 49195
rust-dirstatemap: stop using `state()` in the cache logic Let's use the new API Differential Revision: https://phab.mercurial-scm.org/D12538
Tue, 12 Apr 2022 16:24:25 +0200 rust-dirstatemap: stop using `.state` in `is_from_other_parent`
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 16:24:25 +0200] rev 49194
rust-dirstatemap: stop using `.state` in `is_from_other_parent` This is a deprecated API and will be removed one day. Differential Revision: https://phab.mercurial-scm.org/D12537
Tue, 12 Apr 2022 17:29:21 +0200 rust-dirstate-entry: add `modified` method
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:29:21 +0200] rev 49193
rust-dirstate-entry: add `modified` method This will also be used in other places later in the series. Differential Revision: https://phab.mercurial-scm.org/D12536
Tue, 12 Apr 2022 17:27:56 +0200 rust: remove use of `EntryState` in `DirsMultiset`
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:27:56 +0200] rev 49192
rust: remove use of `EntryState` in `DirsMultiset` Let's use the new API. Differential Revision: https://phab.mercurial-scm.org/D12535
Tue, 12 Apr 2022 17:26:23 +0200 rust: use `entry.tracked()` directly
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:26:23 +0200] rev 49191
rust: use `entry.tracked()` directly This is the new API Differential Revision: https://phab.mercurial-scm.org/D12534
Tue, 12 Apr 2022 17:25:38 +0200 rust-hg-cpython: remove use of `EntryState`
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:25:38 +0200] rev 49190
rust-hg-cpython: remove use of `EntryState` Let's use the new API Differential Revision: https://phab.mercurial-scm.org/D12533
Fri, 08 Apr 2022 18:10:12 +0200 rust-dirstatemap: use a checked sub instead of a potentially underflowing one
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 18:10:12 +0200] rev 49189
rust-dirstatemap: use a checked sub instead of a potentially underflowing one This was missed in 2593873cda0f Differential Revision: https://phab.mercurial-scm.org/D12532
Fri, 08 Apr 2022 17:55:03 +0200 rust-dirstatemap: add simpler version of `get_node_mut`
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 17:55:03 +0200] rev 49188
rust-dirstatemap: add simpler version of `get_node_mut` This will help reduce code and footgun potential for simpler callers. Differential Revision: https://phab.mercurial-scm.org/D12531
Fri, 08 Apr 2022 17:22:39 +0200 rust-dirstatemap: use `get_node_mut` instead or `get_or_insert_node`
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 17:22:39 +0200] rev 49187
rust-dirstatemap: use `get_node_mut` instead or `get_or_insert_node` This (along with the docstring), makes it more obvious that we're not expecting to insert a node here. This is less prone to bugs in later refactorings. Differential Revision: https://phab.mercurial-scm.org/D12530
Fri, 08 Apr 2022 16:56:52 +0200 rust-dirstatemap: add `each_ancestor` argument to `get_node_mut`
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 16:56:52 +0200] rev 49186
rust-dirstatemap: add `each_ancestor` argument to `get_node_mut` This forces the callers to think about if the counters in the ancestors need to be adjusted. Differential Revision: https://phab.mercurial-scm.org/D12529
Fri, 08 Apr 2022 16:53:06 +0200 rust-dirstatemap: add simpler method `get_or_insert_node` for the common case
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 16:53:06 +0200] rev 49185
rust-dirstatemap: add simpler method `get_or_insert_node` for the common case All but one case use the exact same input for most arguments, this simplifies code and reduces footgun potential. Differential Revision: https://phab.mercurial-scm.org/D12528
Fri, 08 Apr 2022 16:05:47 +0200 rust-dirstatemap: inline the last `get_or_insert` call
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 16:05:47 +0200] rev 49184
rust-dirstatemap: inline the last `get_or_insert` call The `get_or_insert` method was dangerous because it did not take the `DirstateMap` counters into account. This particular instance does not need to update the counters. Differential Revision: https://phab.mercurial-scm.org/D12527
Fri, 08 Apr 2022 16:04:17 +0200 rust-dirstatemap: add `set_cached_mtime` helper method
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 16:04:17 +0200] rev 49183
rust-dirstatemap: add `set_cached_mtime` helper method This will help remove the `get_or_insert` method, which is dangerous because it does not take the `DirstateMap` counters into account Differential Revision: https://phab.mercurial-scm.org/D12526
Fri, 08 Apr 2022 16:03:39 +0200 rust-dirstatemap: add `clear_cached_mtime` helper method
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 16:03:39 +0200] rev 49182
rust-dirstatemap: add `clear_cached_mtime` helper method This will help remove the `get_or_insert` method, which is dangerous because it does not take the `DirstateMap` counters into account. Differential Revision: https://phab.mercurial-scm.org/D12525
Tue, 29 Mar 2022 18:21:40 +0200 rust-dirstatemap: add unit tests
Raphaël Gomès <rgomes@octobus.net> [Tue, 29 Mar 2022 18:21:40 +0200] rev 49181
rust-dirstatemap: add unit tests These were missing and have already proven valuable since they have found two bugs (fixed in previous patches). There may be other behavior to test, but this gives us a decent coverage. Differential Revision: https://phab.mercurial-scm.org/D12524
Tue, 29 Mar 2022 17:27:36 +0200 rust: add `Debug` trait to a bunch of structs
Raphaël Gomès <rgomes@octobus.net> [Tue, 29 Mar 2022 17:27:36 +0200] rev 49180
rust: add `Debug` trait to a bunch of structs This is useful when... debugging. Right now the output is not in the most readable state it could be, but this is very low effort and is good enough for now. We may want to write a nicer custom debug formatter for some of those structs in the future. Differential Revision: https://phab.mercurial-scm.org/D12523
Wed, 30 Mar 2022 11:39:53 +0200 rust-dirstatemap: use `&HgPath` instead of `HgPathBuf` in `copy_map_insert`
Raphaël Gomès <rgomes@octobus.net> [Wed, 30 Mar 2022 11:39:53 +0200] rev 49179
rust-dirstatemap: use `&HgPath` instead of `HgPathBuf` in `copy_map_insert` No reason to require an owned path here. Differential Revision: https://phab.mercurial-scm.org/D12522
Tue, 29 Mar 2022 17:23:24 +0200 rust-dirstatemap: use `DirstateEntry::tracked` directly
Raphaël Gomès <rgomes@octobus.net> [Tue, 29 Mar 2022 17:23:24 +0200] rev 49178
rust-dirstatemap: use `DirstateEntry::tracked` directly `state()` is a legacy API that will be removed at some point, let's use the newer API. Differential Revision: https://phab.mercurial-scm.org/D12521
Tue, 29 Mar 2022 00:58:58 +0200 rust-cpython: remove unused API to `drop_entry_and_copy_source`
Raphaël Gomès <rgomes@octobus.net> [Tue, 29 Mar 2022 00:58:58 +0200] rev 49177
rust-cpython: remove unused API to `drop_entry_and_copy_source` This is not used anywhere anymore and its use cases are covered by the new API Differential Revision: https://phab.mercurial-scm.org/D12520
Tue, 29 Mar 2022 00:57:06 +0200 rust-dirstatemap: remove `set_dirstate_entry`/`set_entry` methods
Raphaël Gomès <rgomes@octobus.net> [Tue, 29 Mar 2022 00:57:06 +0200] rev 49176
rust-dirstatemap: remove `set_dirstate_entry`/`set_entry` methods These methods were needed crutches before the Rust implementation caught up to Python. Calling `set_entry` (whether from Python or Rust) was dangerous since it didn't update any of the counters of the DirstateMap data structure, while having no real way of knowing when to use it "correctly" except it you were one of the 3 people who looked deep enough into the soul of this code. Differential Revision: https://phab.mercurial-scm.org/D12519
Tue, 29 Mar 2022 00:53:11 +0200 rust-dirstatemap: implement part of the `setparents` logic
Raphaël Gomès <rgomes@octobus.net> [Tue, 29 Mar 2022 00:53:11 +0200] rev 49175
rust-dirstatemap: implement part of the `setparents` logic The Python code does many round-trip calls to the Rust dirstatemap when copy information needs to be dropped in `setparents`. This may result in improved performance on `commit`, `update` and other such commands, but was mostly done to drop the last use of `set_dirstate_item`. See inline comments for an asterisk about performance, and see next patch for why `set_dirstate_item` has to go. Differential Revision: https://phab.mercurial-scm.org/D12518
Mon, 28 Mar 2022 23:45:54 +0200 dirstate-item: add missing bit of docstring
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 23:45:54 +0200] rev 49174
dirstate-item: add missing bit of docstring Differential Revision: https://phab.mercurial-scm.org/D12517
Mon, 28 Mar 2022 23:42:16 +0200 dirstatemap: move `_dirs_incr` and `_dirs_decr` methods out of the common
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 23:42:16 +0200] rev 49173
dirstatemap: move `_dirs_incr` and `_dirs_decr` methods out of the common They are only used by the Python implementation now Differential Revision: https://phab.mercurial-scm.org/D12516
Mon, 28 Mar 2022 23:39:28 +0200 dirstatemap: move `_refresh_entry` out of the common methods
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 23:39:28 +0200] rev 49172
dirstatemap: move `_refresh_entry` out of the common methods This is only used in the Python implementation now Differential Revision: https://phab.mercurial-scm.org/D12515
Mon, 28 Mar 2022 23:38:05 +0200 dirstatemap: move `_drop_entry` out of the common methods
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 23:38:05 +0200] rev 49171
dirstatemap: move `_drop_entry` out of the common methods Only the Python implementation uses it. Differential Revision: https://phab.mercurial-scm.org/D12514
Mon, 28 Mar 2022 23:37:36 +0200 rust-dirstatemap: remove `_drop_entry`
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 23:37:36 +0200] rev 49170
rust-dirstatemap: remove `_drop_entry` This is not used anywhere anymore Differential Revision: https://phab.mercurial-scm.org/D12513
Mon, 28 Mar 2022 23:34:30 +0200 rust-dirstatemap: remove `__settitem__`
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 23:34:30 +0200] rev 49169
rust-dirstatemap: remove `__settitem__` This is not used anywhere now. Differential Revision: https://phab.mercurial-scm.org/D12512
Mon, 28 Mar 2022 18:30:08 +0200 rust-dirstatemap: remove unused `_refresh_entry` implementation
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:30:08 +0200] rev 49168
rust-dirstatemap: remove unused `_refresh_entry` implementation This was only used in the newer APIs, all of which have been rewritten in Rust Differential Revision: https://phab.mercurial-scm.org/D12511
Wed, 23 Mar 2022 17:19:32 +0100 rust-distatemap: remove `addfile` API
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 17:19:32 +0100] rev 49167
rust-distatemap: remove `addfile` API All of its users have been migrated to the new API Differential Revision: https://phab.mercurial-scm.org/D12510
Wed, 23 Mar 2022 17:16:10 +0100 rust-dirstatemap: remove `removefile` API
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 17:16:10 +0100] rev 49166
rust-dirstatemap: remove `removefile` API Its callers have been migrated to the newer dirstate API. Differential Revision: https://phab.mercurial-scm.org/D12509
Mon, 28 Mar 2022 18:26:24 +0200 rhg: use the new `set_clean` API
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:26:24 +0200] rev 49165
rhg: use the new `set_clean` API Differential Revision: https://phab.mercurial-scm.org/D12508
Mon, 28 Mar 2022 18:15:11 +0200 dirstatemap: move `set_untracked` out of the common methods
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:15:11 +0200] rev 49164
dirstatemap: move `set_untracked` out of the common methods There is a dedicated Rust implementation now Differential Revision: https://phab.mercurial-scm.org/D12507
Mon, 28 Mar 2022 18:13:58 +0200 rust-dirstatemap: add `set_untracked` method
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:13:58 +0200] rev 49163
rust-dirstatemap: add `set_untracked` method This is the new API that Python has already migrated to Differential Revision: https://phab.mercurial-scm.org/D12506
Mon, 28 Mar 2022 18:10:19 +0200 dirstatemap: move `set_possibly_dirty` out of the common methods
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:10:19 +0200] rev 49162
dirstatemap: move `set_possibly_dirty` out of the common methods There exists now a dedicated Rust implementation Differential Revision: https://phab.mercurial-scm.org/D12505
Mon, 28 Mar 2022 18:09:01 +0200 rust-dirstatemap: add `set_possibly_dirty` method
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:09:01 +0200] rev 49161
rust-dirstatemap: add `set_possibly_dirty` method This is the new API that Python has already migrated to. Differential Revision: https://phab.mercurial-scm.org/D12504
Mon, 28 Mar 2022 18:02:45 +0200 dirstatemap: move `set_clean` out of common methods
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:02:45 +0200] rev 49160
dirstatemap: move `set_clean` out of common methods This now has a dedicated Rust implementation Differential Revision: https://phab.mercurial-scm.org/D12503
Mon, 28 Mar 2022 18:02:50 +0200 rust-dirstatemap: add `set_clean` method
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:02:50 +0200] rev 49159
rust-dirstatemap: add `set_clean` method This is the new dirstate API that has already been moved to in Python. Differential Revision: https://phab.mercurial-scm.org/D12502
Wed, 23 Mar 2022 17:13:18 +0100 dirstatemap: remove `_insert_entry`
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 17:13:18 +0100] rev 49158
dirstatemap: remove `_insert_entry` This was needed as a compatibility layer for the Python and Rust implementations, but it is not called from anywhere in Rust anymore. The two remaining calls have been inlined. Differential Revision: https://phab.mercurial-scm.org/D12501
Wed, 23 Mar 2022 17:25:42 +0100 dirstatemap: move `reset_state` out of common methods
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 17:25:42 +0100] rev 49157
dirstatemap: move `reset_state` out of common methods Now that we have a Rust implementation, we defer to that accordingly. Differential Revision: https://phab.mercurial-scm.org/D12500
Wed, 23 Mar 2022 17:27:58 +0100 rust-dirstatemap: add Rust implementation of `reset_state`
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 17:27:58 +0100] rev 49156
rust-dirstatemap: add Rust implementation of `reset_state` This is the new API which has already been defined in Python Differential Revision: https://phab.mercurial-scm.org/D12499
Wed, 23 Mar 2022 17:38:59 +0100 rust-dirstate: introduce intermediate struct for dirstate-v2 data
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 17:38:59 +0100] rev 49155
rust-dirstate: introduce intermediate struct for dirstate-v2 data This is passed often as a long tuple that is not easy to know the form of, so we refactor everything in this struct. This also renames `wdir_tracked` to follow the Python `wc_tracked`, even though the on-disk format uses `WDIR_TRACKED`. I think a single naming scheme is better, but we can't easily break the Python impl now because of extensions, so this is low-effort enough and facilitates grepping. Differential Revision: https://phab.mercurial-scm.org/D12498
Wed, 23 Mar 2022 16:32:31 +0100 dirstatemap: remove unused parameter from `reset_state`
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 16:32:31 +0100] rev 49154
dirstatemap: remove unused parameter from `reset_state` This has no callers using it and is not used inside the method itself. Differential Revision: https://phab.mercurial-scm.org/D12497
Wed, 23 Mar 2022 15:19:43 +0100 dirstatemap: move `set_tracked` out of common methods and plug in Rust
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 15:19:43 +0100] rev 49153
dirstatemap: move `set_tracked` out of common methods and plug in Rust We now have a Rust-specific implementation of this method, it is no longer shared between both implementations. Differential Revision: https://phab.mercurial-scm.org/D12496
Wed, 23 Mar 2022 15:18:12 +0100 rust-dirstatemap: add `set_tracked` method
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 15:18:12 +0100] rev 49152
rust-dirstatemap: add `set_tracked` method This is the new dirstate API that has already been moved to in Python. It will be used in place of the old `addfile`/`removefile` one. Differential Revision: https://phab.mercurial-scm.org/D12495
Tue, 12 Apr 2022 23:15:25 -0700 changelog: avoid copying changeset data into `ChangesetRevisionData`
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Apr 2022 23:15:25 -0700] rev 49151
changelog: avoid copying changeset data into `ChangesetRevisionData` Differential Revision: https://phab.mercurial-scm.org/D12548
Fri, 08 Apr 2022 21:34:18 -0700 rust-nodemap: remove unnecessary explicit lifetime
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Apr 2022 21:34:18 -0700] rev 49150
rust-nodemap: remove unnecessary explicit lifetime Differential Revision: https://phab.mercurial-scm.org/D12486
Tue, 12 Apr 2022 21:56:57 -0700 rust-revlog: add tests for p1/p2 getters, as promised in D12442
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Apr 2022 21:56:57 -0700] rev 49149
rust-revlog: add tests for p1/p2 getters, as promised in D12442 Differential Revision: https://phab.mercurial-scm.org/D12565
Fri, 15 Apr 2022 18:20:41 -0700 rust-revlog: make `IndexEntryBuilder` build a whole entry
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Apr 2022 18:20:41 -0700] rev 49148
rust-revlog: make `IndexEntryBuilder` build a whole entry The `IndexEntryBuilder` we have in tests only built part of a revlog entry before this patch. It's more useful if it can build a full entry. As part of fixing that, I also added a (non-test) `IndexEntry::link_revision()`. Differential Revision: https://phab.mercurial-scm.org/D12564
Fri, 15 Apr 2022 17:06:10 -0700 rust-revlog: change default version from 2 to 1 in test builder
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Apr 2022 17:06:10 -0700] rev 49147
rust-revlog: change default version from 2 to 1 in test builder Version 1 is the only version we support, so it seems like the natural choice for making it easy to create valid revlogs. Differential Revision: https://phab.mercurial-scm.org/D12563
Fri, 15 Apr 2022 09:39:27 -0700 rust-repo: extract a function for checking nodemap requirement
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Apr 2022 09:39:27 -0700] rev 49146
rust-repo: extract a function for checking nodemap requirement Differential Revision: https://phab.mercurial-scm.org/D12562
Fri, 15 Apr 2022 09:37:13 -0700 rust-revlog: make `Changelog` and `ManifestLog` unaware of `Repo`
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Apr 2022 09:37:13 -0700] rev 49145
rust-revlog: make `Changelog` and `ManifestLog` unaware of `Repo` As with other recent patches, this makes the types easier to test and reuse. Differential Revision: https://phab.mercurial-scm.org/D12561
Tue, 12 Apr 2022 21:25:56 -0700 rust-revlog: make unaware of `Repo`
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Apr 2022 21:25:56 -0700] rev 49144
rust-revlog: make unaware of `Repo` Differential Revision: https://phab.mercurial-scm.org/D12547
Thu, 14 Apr 2022 09:09:45 -0700 rust-filelog: don't use persistent nodemap (to match Python)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Apr 2022 09:09:45 -0700] rev 49143
rust-filelog: don't use persistent nodemap (to match Python) Differential Revision: https://phab.mercurial-scm.org/D12558
Tue, 12 Apr 2022 11:40:37 -0700 rust-revlog: move check for nodemap requirement to caller
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Apr 2022 11:40:37 -0700] rev 49142
rust-revlog: move check for nodemap requirement to caller It's good for both making `Revlog` testable and reusable to have it not depend on the higher-level `Repo` type. This patch is one step in towards that. Additionally, this change in particular gives the callers more control over when to use a nodemap. Differential Revision: https://phab.mercurial-scm.org/D12546
Thu, 31 Mar 2022 22:54:33 -0700 rust-nodemap-docket: make unaware of `Repo`
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Mar 2022 22:54:33 -0700] rev 49141
rust-nodemap-docket: make unaware of `Repo` Differential Revision: https://phab.mercurial-scm.org/D12545
Thu, 31 Mar 2022 22:59:19 -0700 rust-nodemap-docket: move check of nodemap requirement to caller
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Mar 2022 22:59:19 -0700] rev 49140
rust-nodemap-docket: move check of nodemap requirement to caller I think it's cleaner if `NodeMapDocket` doesn't know about the `Repo` type. That makes it more easily reusable and testable. This patch moves out one of the uses of `Repo` out of it. Differential Revision: https://phab.mercurial-scm.org/D12544
Tue, 19 Apr 2022 10:53:58 -0400 merge with stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 19 Apr 2022 10:53:58 -0400] rev 49139
merge with stable
Fri, 15 Apr 2022 11:20:49 -0400 contrib: update python dependencies on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 15 Apr 2022 11:20:49 -0400] rev 49138
contrib: update python dependencies on Windows Differential Revision: https://phab.mercurial-scm.org/D12559
Fri, 15 Apr 2022 11:32:27 -0400 contrib: add a hint if the Windows dependency MSI is already installed
Matt Harbison <matt_harbison@yahoo.com> [Fri, 15 Apr 2022 11:32:27 -0400] rev 49137
contrib: add a hint if the Windows dependency MSI is already installed In the past, I've gotten confused when the script failed on seemingly random python installs (and thus the py3.8 install was commented out from the last time this happened to me, which has been reverted here). This particular error code means the package was already installed. For python, it means the major and minor version are the same, but the micro version may differ. In practice, ignoring the python installation failure will cause the pip installation that happens next to fail, because python.exe for that version is somewhere else on the system. This could probably be fixed by running py.exe with the major and minor version, but that is skipped during the install for some reason. I didn't feel like over complicating this though, and at least there's a better hint when the problem occurs. Differential Revision: https://phab.mercurial-scm.org/D12560
Mon, 18 Apr 2022 16:18:33 -0400 packaging: fix the type hint on the download_entry function
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Apr 2022 16:18:33 -0400] rev 49136
packaging: fix the type hint on the download_entry function Flagged by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D12571
Mon, 18 Apr 2022 16:11:52 -0400 packaging: drop python27 references from the Windows instructions
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Apr 2022 16:11:52 -0400] rev 49135
packaging: drop python27 references from the Windows instructions I also diffed these two files and eliminated cosmetic differences to make it easier to ensure both are in alignment. Differential Revision: https://phab.mercurial-scm.org/D12570
Mon, 18 Apr 2022 15:27:12 -0400 packaging: add a missing parenthesis to help text
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Apr 2022 15:27:12 -0400] rev 49134
packaging: add a missing parenthesis to help text Differential Revision: https://phab.mercurial-scm.org/D12569
Mon, 18 Apr 2022 14:20:58 -0400 git: un-byteify the `mode` argument for the builtin `open()`
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Apr 2022 14:20:58 -0400] rev 49133
git: un-byteify the `mode` argument for the builtin `open()` I guess this was assuming `pycompat.open` was imported, but it's not here or elsewhere in the git extension. Differential Revision: https://phab.mercurial-scm.org/D12568
Mon, 18 Apr 2022 11:21:09 -0400 git: adapt to some recent dirstate API changes
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Apr 2022 11:21:09 -0400] rev 49132
git: adapt to some recent dirstate API changes There are still old methods like add() and drop(). I don't see anything that looks equivalent, so there's likely more work to do. But this allows diff and commit to work again on the simple webpage repo for thg. Differential Revision: https://phab.mercurial-scm.org/D12567
Mon, 18 Apr 2022 11:15:29 -0400 idirstate: add missing get_entry() method
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Apr 2022 11:15:29 -0400] rev 49131
idirstate: add missing get_entry() method Differential Revision: https://phab.mercurial-scm.org/D12566
Wed, 13 Apr 2022 15:02:01 -0400 windows: disable pager when packaged with py2exe
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Apr 2022 15:02:01 -0400] rev 49130
windows: disable pager when packaged with py2exe With Windows and py3, all output that got directed to the pager was lost. It can be worked around by the user piping to `more`, but that's easy to forget, and can be dangerous if `hg diff` or similar incorrectly shows no changes. The problem appears to be the new WindowsConsoleIO in py3.6[1]. We've worked around it with PyOxidizer by setting the `Py_LegacyWindowsStdioFlag` interpreter option, and worked around it with `hg.bat` and `exewrapper.c` by internally setting `PYTHONLEGACYWINDOWSSTDIO=1`. Unfortunately, py2exe doesn't appear to be able to set the interpreter option, and somehow seems to also ignore the environment variable. The latter isn't a good fix anyway, since setting it in the environment would affect other python programs too. We can't install a global config for this because a config closer to the user (e.g. from before pager was turned on by default) can override it. [1] https://peps.python.org/pep-0528/ Differential Revision: https://phab.mercurial-scm.org/D12556
Wed, 13 Apr 2022 14:37:57 -0400 resourceutil: force filesystem access to resources when using py2exe
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Apr 2022 14:37:57 -0400] rev 49129
resourceutil: force filesystem access to resources when using py2exe I don't know why it doesn't work, but it avoids this fatal error on startup: > hg debugshell Traceback (most recent call last): File "hg", line 58, in <module> File "mercurial\dispatch.pyc", line 143, in run File "mercurial\dispatch.pyc", line 232, in dispatch File "mercurial\dispatch.pyc", line 254, in _rundispatch File "mercurial\ui.pyc", line 316, in load File "mercurial\rcutil.pyc", line 98, in rccomponents File "mercurial\rcutil.pyc", line 68, in default_rc_resources File "mercurial\utils\resourceutil.pyc", line 102, in contents File "<frozen zipimport>", line 775, in contents AssertionError I assume the py2 version of py2exe never hit this because `importlib.resources` failed to import. Differential Revision: https://phab.mercurial-scm.org/D12554
Wed, 13 Apr 2022 14:25:13 -0400 setup: fix the py2exe logic to work with py3
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Apr 2022 14:25:13 -0400] rev 49128
setup: fix the py2exe logic to work with py3 TortoiseHg still uses (the modernized) py2exe packaging, but the build was failing since `py2exe.Distribution` was removed. One thing to note is that later in this module, there's a hack to include `distutils` when building from a virtualenv. While `import distutils` works in `hg debugshell` when built with py2, it doesn't work in py3. I'm not sure why- I don't see it in `library.zip` either. It doesn't seem to break anything though. Differential Revision: https://phab.mercurial-scm.org/D12553
Wed, 13 Apr 2022 07:58:49 -0700 absorb: make `--edit-lines` imply `--apply-changes`
Martin von Zweigbergk <martinvonz@google.com> [Wed, 13 Apr 2022 07:58:49 -0700] rev 49127
absorb: make `--edit-lines` imply `--apply-changes` One of our users tried to use `hg absorb -e` but it seemed that it would only bring up the editor if there were no changes the command could automatically detect destination for. I spent probably half an hour debugging why it worked that way. I finally figured out that it does bring up the editor, but you have to answer "yes" to the "apply changes" prompt *first*. That seems very unintuitive. If the user wants to edit the changes, there seems to be little reason to present them with a prompt first, so let's have `-e/--edit-lines` imply `-a/--apply-changes`. All the tests using `-e` also already used `-a`. I changed them to rely on the implied `-a` so we get coverage of that. Differential Revision: https://phab.mercurial-scm.org/D12550
Wed, 13 Apr 2022 14:40:11 +0100 branchmap: add a test that shows bad interaction with strip
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 13 Apr 2022 14:40:11 +0100] rev 49126
branchmap: add a test that shows bad interaction with strip Differential Revision: https://phab.mercurial-scm.org/D12549
Tue, 12 Apr 2022 20:01:49 +0100 rhg: refactor to pass argv down, instead of caling args_os()
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 12 Apr 2022 20:01:49 +0100] rev 49125
rhg: refactor to pass argv down, instead of caling args_os() This refactoring makes it easy to patch some command-line preprocessing into rhg. We use this to support using rhg as a shebang interpreter, for example. Differential Revision: https://phab.mercurial-scm.org/D12543
Tue, 12 Apr 2022 19:40:37 +0100 narrow: support debugupgraderepo
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 12 Apr 2022 19:40:37 +0100] rev 49124
narrow: support debugupgraderepo Differential Revision: https://phab.mercurial-scm.org/D12542
Tue, 05 Apr 2022 12:06:32 -0700 rust-revlog: add methods for getting parent revs and entries
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Apr 2022 12:06:32 -0700] rev 49123
rust-revlog: add methods for getting parent revs and entries Differential Revision: https://phab.mercurial-scm.org/D12442
Tue, 05 Apr 2022 08:47:04 -0700 rust-changelog: start parsing changeset data
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Apr 2022 08:47:04 -0700] rev 49122
rust-changelog: start parsing changeset data This patch makes `ChangelogRevisionData` do some coarse, line-level splitting of the changeset data into manifest node, user, timestamp, files list, and description. There are no (in-tree) users of these functions yet, but I've added tests to prevent regressions. We'll surely add callers at some point. Differential Revision: https://phab.mercurial-scm.org/D12439
Mon, 04 Apr 2022 23:27:16 -0700 rust-changelog: remove special parsing of empty changelog data for null rev
Martin von Zweigbergk <martinvonz@google.com> [Mon, 04 Apr 2022 23:27:16 -0700] rev 49121
rust-changelog: remove special parsing of empty changelog data for null rev For the null revision, `Revlog::get_rev_data()` will return an empty string (of bytes). We currently handle that case in `ChangelogRevisionData::manifest_node()`. However, it's going to be ugly to have special handling for the null revision for each future method on `ChangelogRevisionData`. This patch therefore restructures the code so we instead initialize the struct with valid data for the null revision. Differential Revision: https://phab.mercurial-scm.org/D12438
Thu, 31 Mar 2022 22:06:26 -0700 rust-changelog: don't skip empty lines when iterating over changeset lines
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Mar 2022 22:06:26 -0700] rev 49120
rust-changelog: don't skip empty lines when iterating over changeset lines The first empty line in the changeset indicates the end of headers and beginning of description. Callers can't know figure out where that position is if empty lines are skipped. Differential Revision: https://phab.mercurial-scm.org/D12426
Thu, 31 Mar 2022 22:02:46 -0700 rust-requirements: allow loading repos with `bookmarksinstore` requirement
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Mar 2022 22:02:46 -0700] rev 49119
rust-requirements: allow loading repos with `bookmarksinstore` requirement `rhg` does support bookmarks, so it can load repos with the `bookmarksinstore` requirement just as well as other repos. Differential Revision: https://phab.mercurial-scm.org/D12425
Sat, 09 Apr 2022 14:43:30 +0200 test: accept another error message on lack of TLS client certificate
Julien Cristau <jcristau@debian.org> [Sat, 09 Apr 2022 14:43:30 +0200] rev 49118
test: accept another error message on lack of TLS client certificate Differential Revision: https://phab.mercurial-scm.org/D12492
Sat, 09 Apr 2022 14:41:55 +0200 sslutil: support TLSV1_ALERT_PROTOCOL_VERSION reason code
Julien Cristau <jcristau@debian.org> [Sat, 09 Apr 2022 14:41:55 +0200] rev 49117
sslutil: support TLSV1_ALERT_PROTOCOL_VERSION reason code It looks like python 3.10 returns a different reason code on protocol version mismatch. Differential Revision: https://phab.mercurial-scm.org/D12491
Sat, 09 Apr 2022 14:28:17 +0200 test: override default cipher selection when connecting to TLS 1.0/1.1 servers
Julien Cristau <jcristau@debian.org> [Sat, 09 Apr 2022 14:28:17 +0200] rev 49116
test: override default cipher selection when connecting to TLS 1.0/1.1 servers The default set of ciphers on python 3.10 is incompatible with old TLS versions. Differential Revision: https://phab.mercurial-scm.org/D12490
Sat, 09 Apr 2022 14:23:52 +0200 sslutil: be less strict about which ciphers are allowed when using --insecure
Julien Cristau <jcristau@debian.org> [Sat, 09 Apr 2022 14:23:52 +0200] rev 49115
sslutil: be less strict about which ciphers are allowed when using --insecure Python 3.10 restricted which ciphers are enabled by default, leading to no available ciphers for TLS < 1.2. When using the --insecure flag we allow old TLS, so also adjust the cipher list to give connections a chance to work. On the server side, also loosen the cipher selection in tests (when using the devel.serverexactprotocol option). Differential Revision: https://phab.mercurial-scm.org/D12489
Sat, 09 Apr 2022 14:15:32 +0200 sslutil: avoid deprecation warnings from python 3.10's ssl module
Julien Cristau <jcristau@debian.org> [Sat, 09 Apr 2022 14:15:32 +0200] rev 49114
sslutil: avoid deprecation warnings from python 3.10's ssl module Use ssl.PROTOCOL_TLS_{CLIENT,SERVER} and SSLContext.{min,max}imum_version when supported (3.7+). And, catch deprecation warnings when the user asks for deprecated TLS versions (1.0 and 1.1). Differential Revision: https://phab.mercurial-scm.org/D12488
Wed, 06 Apr 2022 22:29:49 +0200 zeroconf: fix deprecation warning with python 3.10
Julien Cristau <jcristau@debian.org> [Wed, 06 Apr 2022 22:29:49 +0200] rev 49113
zeroconf: fix deprecation warning with python 3.10 threading.condition.notifyAll → threading.condition.notify_all Differential Revision: https://phab.mercurial-scm.org/D12487
Mon, 11 Apr 2022 11:14:55 +0200 test: deal with changed error message on python 3.10
Julien Cristau <jcristau@debian.org> [Mon, 11 Apr 2022 11:14:55 +0200] rev 49112
test: deal with changed error message on python 3.10 Differential Revision: https://phab.mercurial-scm.org/D12493
Mon, 02 Dec 2019 14:45:00 +0100 mail: don't complain about a multi-word email.method
Julien Cristau <jcristau@debian.org> [Mon, 02 Dec 2019 14:45:00 +0100] rev 49111
mail: don't complain about a multi-word email.method I want to be able to set email.method to "ssh relay /usr/sbin/sendmail" without needing an extra trivial shell script. This works fine since we pass the full command to a shell, except for validateconfig trying to find it in $PATH. Differential Revision: https://phab.mercurial-scm.org/D7542
Mon, 28 Mar 2022 18:53:55 +0200 rust-dirstate: don't return a state for untracked entries
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:53:55 +0200] rev 49110
rust-dirstate: don't return a state for untracked entries This `state` API is a remnant of the former API and is slated for removal at some point. Any caller of this function will expect an entry that is tracked in the larger sense. Differential Revision: https://phab.mercurial-scm.org/D12448
Tue, 22 Mar 2022 16:33:18 +0100 dirstate: remove v1_* methods from Python/C/Rust shared API
Raphaël Gomès <rgomes@octobus.net> [Tue, 22 Mar 2022 16:33:18 +0100] rev 49109
dirstate: remove v1_* methods from Python/C/Rust shared API These methods are used for v1 parsing by their respective implementations, but do not need to be shared between them. Differential Revision: https://phab.mercurial-scm.org/D12447
Mon, 28 Mar 2022 13:01:42 +0200 rust-dirstate-entry: fix typo in panic message
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 13:01:42 +0200] rev 49108
rust-dirstate-entry: fix typo in panic message Differential Revision: https://phab.mercurial-scm.org/D12446
Mon, 28 Mar 2022 13:00:57 +0200 test-issue660: add dirstate-v2 variant
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 13:00:57 +0200] rev 49107
test-issue660: add dirstate-v2 variant It's basically a dirstate test, so it makes sense to test out the new version. Differential Revision: https://phab.mercurial-scm.org/D12445
Mon, 28 Mar 2022 13:00:14 +0200 test-issue660: test inside a repository, not the test dir
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 13:00:14 +0200] rev 49106
test-issue660: test inside a repository, not the test dir This causes an issue with a temporary file showing up in test output when adding a dirstate-v2 variant of this test. Differential Revision: https://phab.mercurial-scm.org/D12444
Wed, 23 Mar 2022 15:15:17 +0100 dirstate: fix some typos in docstrings
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 15:15:17 +0100] rev 49105
dirstate: fix some typos in docstrings I was passing by and they've been bothering me. :) Differential Revision: https://phab.mercurial-scm.org/D12443
Mon, 04 Apr 2022 13:36:37 +0000 path: explicitly declare the `pushurl` suboption
Raphaël Gomès <rgomes@octobus.net> [Mon, 04 Apr 2022 13:36:37 +0000] rev 49104
path: explicitly declare the `pushurl` suboption This will help documentation and discovery. Differential Revision: https://phab.mercurial-scm.org/D12437
Thu, 07 Apr 2022 15:29:02 +0200 setup: fix incomplete implementation of Command
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 Apr 2022 15:29:02 +0200] rev 49103
setup: fix incomplete implementation of Command `test-install.t` fails without the `get_outputs` method being implemented, which is used when, `self.report` is `True`. When 8d7eaff92f9c introduced this change, they probably ran `test-install.t` without `HGTESTS_ALLOW_NETIO=1`, which does not trigger this codepath. Differential Revision: https://phab.mercurial-scm.org/D12482
Mon, 04 Apr 2022 15:36:32 +0200 path: explicitly declare the `pushrev` suboptions
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 04 Apr 2022 15:36:32 +0200] rev 49102
path: explicitly declare the `pushrev` suboptions This will help documentation and discovery. Differential Revision: https://phab.mercurial-scm.org/D12436
Mon, 04 Apr 2022 15:36:17 +0200 path: explicitly declare the `multi-urls` suboptions
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 04 Apr 2022 15:36:17 +0200] rev 49101
path: explicitly declare the `multi-urls` suboptions This will help documentation and discovery. Differential Revision: https://phab.mercurial-scm.org/D12435
Mon, 04 Apr 2022 15:35:59 +0200 path: explicitly declare the `bookmarks.mode` suboptions
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 04 Apr 2022 15:35:59 +0200] rev 49100
path: explicitly declare the `bookmarks.mode` suboptions This will help documentation and discovery. Differential Revision: https://phab.mercurial-scm.org/D12434
Mon, 04 Apr 2022 18:05:33 -0700 crecord: avoid duplicating lines when reverting noeol->eol change
Kyle Lippincott <spectral@google.com> [Mon, 04 Apr 2022 18:05:33 -0700] rev 49099
crecord: avoid duplicating lines when reverting noeol->eol change When reversing a patch that looks like this while using crecord: ``` @@ -301,4 +302,4 @@ zza zzb zzc zzd -zze \ No newline at end of file +zze ``` we would previously reverse the `-zze` line to be an add, encounter the "no newline" line and stop inspecting lines. This caused us to duplicate the line, producing `zzezze` (still without a newline). `break` is the correct action if we know there will be no lines afterwards, as would be the case in an eol -> noeol transition. It is incorrect if there are lines afterward, such as if both sides are missing the newline or if only the lhs is missing the newline. Differential Revision: https://phab.mercurial-scm.org/D12441
Tue, 05 Apr 2022 11:09:57 -0700 crecord: add test demonstrating issue when reverting noeol->eol change
Kyle Lippincott <spectral@google.com> [Tue, 05 Apr 2022 11:09:57 -0700] rev 49098
crecord: add test demonstrating issue when reverting noeol->eol change Differential Revision: https://phab.mercurial-scm.org/D12440
Mon, 28 Mar 2022 10:43:10 -0700 revert: ask user to confirm before tracking new file when interactive
Martin von Zweigbergk <martinvonz@google.com> [Mon, 28 Mar 2022 10:43:10 -0700] rev 49097
revert: ask user to confirm before tracking new file when interactive If interactively reverting from a commit with `hg revert -i -r`, we would unconditionally add files from that commit that are not already tracked in the working copy. We have prompts for adding back files removed in the working copy, but that's specific to such files and does not apply to adding files from another revision. Differential Revision: https://phab.mercurial-scm.org/D12416
Mon, 28 Mar 2022 10:43:06 -0700 revert: use a `continue` to reduce indentation
Martin von Zweigbergk <martinvonz@google.com> [Mon, 28 Mar 2022 10:43:06 -0700] rev 49096
revert: use a `continue` to reduce indentation I'm about to add more code in the block I'm modifying here. Differential Revision: https://phab.mercurial-scm.org/D12415
Fri, 25 Mar 2022 08:33:03 -0700 stringutil: try to avoid running `splitlines()` only to get first line
Martin von Zweigbergk <martinvonz@google.com> [Fri, 25 Mar 2022 08:33:03 -0700] rev 49095
stringutil: try to avoid running `splitlines()` only to get first line It's wasteful to call `splitlines()` and only get the first line from it. However, Python doesn't seem to provide a built-in way of doing just one split based on the set of bytes used by `splitlines()`. As a workaround, we do an initial split on just LF and then call `splitlines()` on the result. Thanks to Joerg for this suggestion. I didn't bother to also split on CR, so users with old Mac editors (or repos created by such editors) will not get this performance improvement. Differential Revision: https://phab.mercurial-scm.org/D12413
Thu, 24 Mar 2022 22:05:49 -0700 logcmdutil: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:49 -0700] rev 49094
logcmdutil: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12412
Thu, 24 Mar 2022 22:05:36 -0700 filemerge: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:36 -0700] rev 49093
filemerge: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12411
Thu, 24 Mar 2022 22:05:27 -0700 absorb: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:27 -0700] rev 49092
absorb: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12410
Thu, 24 Mar 2022 22:05:13 -0700 extensions: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:13 -0700] rev 49091
extensions: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12409
Thu, 24 Mar 2022 22:04:38 -0700 bookmarks: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:04:38 -0700] rev 49090
bookmarks: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12408
Thu, 24 Mar 2022 20:31:44 -0700 help: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 20:31:44 -0700] rev 49089
help: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12407
Thu, 24 Mar 2022 16:55:09 -0700 histedit: remove an unnecessary default value of `b''` for commit message
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 16:55:09 -0700] rev 49088
histedit: remove an unnecessary default value of `b''` for commit message I don't think `ctx.description()` is ever anything falsy other than `b''`. I think the comment added in 4c4232e51167 (histedit: extract common summary code into method, 2016-05-27) is mistaken (I don't see any code following that pattern before the function was added). Differential Revision: https://phab.mercurial-scm.org/D12406
Thu, 24 Mar 2022 16:51:20 -0700 histedit: use new function for getting first line of a string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 16:51:20 -0700] rev 49087
histedit: use new function for getting first line of a string This fixes a crash you can run into if you enter a commit message that's just a "newline-like" byte, like a form feed byte (`hg ci -m \x0f` in Fish). That bug is the motivation for this series. Differential Revision: https://phab.mercurial-scm.org/D12405
Thu, 24 Mar 2022 16:09:12 -0700 templates: extract function to `stringutil` for getting first line of text
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 16:09:12 -0700] rev 49086
templates: extract function to `stringutil` for getting first line of text It's surprisingly hard to get the first line from a string, so let's have our own function in `stringutil` for it. Differential Revision: https://phab.mercurial-scm.org/D12404
Thu, 24 Mar 2022 15:41:29 -0700 templates: make `firstline` filter not keep '\v', '\f' and similar
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 15:41:29 -0700] rev 49085
templates: make `firstline` filter not keep '\v', '\f' and similar In b288b4bb8448 (hide some functions behind lambdas, so demandload is useful., 2006-02-28), `x.splitlines(1)[0]` was replaced by `x.splitlines(1)[0].rstrip('\r\n')`, i.e. stripping trailing '\r' and '\n'. Combined with the "truthy" `1` passed to `splitlines()` to get it to keep line endings, that results in e.g. trailing '\v' (Line Tabulation) and '\f' (Form Feed) being preserved. I can't see why one would want that, and I doubt that was the intention; I suspect the author just didn't think to instead remove the `1` argument. Perhaps they thought the 1 being passed there - added by themselves in a7e416bf3c1d (improve templating., 2006-02-27) - was to limit the number of splits to 1 (i.e. thinking about it as `maxsplit=1` rather than `keepends=1`). Differential Revision: https://phab.mercurial-scm.org/D12403
Tue, 22 Mar 2022 11:22:09 -0400 pytype: drop py3.6 support
Matt Harbison <matt_harbison@yahoo.com> [Tue, 22 Mar 2022 11:22:09 -0400] rev 49084
pytype: drop py3.6 support Pytype 2022.01.07 only supports 3.7+. Differential Revision: https://phab.mercurial-scm.org/D12400
Sun, 13 Mar 2022 16:14:34 +0100 perf-util: add a `compare-discovery-case` script
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 13 Mar 2022 16:14:34 +0100] rev 49083
perf-util: add a `compare-discovery-case` script This script run the same discovery case using multiple variants of the algorithm and report differences in behavior, especially regarding the numbers of roundtrip. Differential Revision: https://phab.mercurial-scm.org/D12399
Mon, 14 Mar 2022 05:59:20 +0100 discovery: also audit the number of queries done
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 14 Mar 2022 05:59:20 +0100] rev 49082
discovery: also audit the number of queries done In addition to the number of roundtrip, we now also track the number of queries we perform, this is useful to assert the tradeoff between number of roundtrip and the number of queries. Differential Revision: https://phab.mercurial-scm.org/D12398
Sun, 13 Mar 2022 16:10:53 +0100 search-discovery-case: display more information about the interresting case
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 13 Mar 2022 16:10:53 +0100] rev 49081
search-discovery-case: display more information about the interresting case We display information about the total number of revs and the common/missing numbers. This is useful to spot the interresting case. Differential Revision: https://phab.mercurial-scm.org/D12397
(0) -30000 -10000 -3000 -1000 -120 +120 +1000 tip