Wed, 22 Sep 2021 15:08:47 +0200 dirstate: drop the `_updatedfiles` set
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Sep 2021 15:08:47 +0200] rev 48072
dirstate: drop the `_updatedfiles` set This is a lot of book keeping for something that was only used to clear ambiguous time. Since this is no no longer in use, we can drop it. Differential Revision: https://phab.mercurial-scm.org/D11503
Wed, 22 Sep 2021 15:23:03 +0200 dirstate: drop the `clearambiguoustimes` method for the map
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Sep 2021 15:23:03 +0200] rev 48071
dirstate: drop the `clearambiguoustimes` method for the map This is no longer called anywhere. Differential Revision: https://phab.mercurial-scm.org/D11502
Wed, 22 Sep 2021 14:54:42 +0200 dirstate: simplify the ambiguity clearing at write time
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Sep 2021 14:54:42 +0200] rev 48070
dirstate: simplify the ambiguity clearing at write time The serialization function is already doing this, so we don't need to do it manually. We just need to propagate the right definition of "now". Differential Revision: https://phab.mercurial-scm.org/D11501
Tue, 28 Sep 2021 09:32:24 -0700 histedit: use more specific exceptions for more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com> [Tue, 28 Sep 2021 09:32:24 -0700] rev 48069
histedit: use more specific exceptions for more detailed exit codes Differential Revision: https://phab.mercurial-scm.org/D11509
Tue, 28 Sep 2021 09:25:05 -0700 histedit: remove redundant checks for unfinished histedit state
Martin von Zweigbergk <martinvonz@google.com> [Tue, 28 Sep 2021 09:25:05 -0700] rev 48068
histedit: remove redundant checks for unfinished histedit state Both text-based and curses-based histedit already check for unfinished operations (not just unfinished histedit), so there's no need to check specifically for unfinished histedit. Differential Revision: https://phab.mercurial-scm.org/D11508
Tue, 28 Sep 2021 13:43:14 +0200 dirstate: Appease pytype
Simon Sapin <simon.sapin@octobus.net> [Tue, 28 Sep 2021 13:43:14 +0200] rev 48067
dirstate: Appease pytype test-check-pytype.t was failing since 98c0408324e6: File "/home/simon/projects/hg/mercurial/dirstatemap.py", line 572, in addfile: unsupported operand type(s) for &: 'size: None' and 'rangemask: int' [unsupported-operands] No attribute '__and__' on 'size: None' or '__rand__' on 'rangemask: int' File "/home/simon/projects/hg/mercurial/dirstatemap.py", line 573, in addfile: unsupported operand type(s) for &: 'mtime: None' and 'rangemask: int' [unsupported-operands] No attribute '__and__' on 'mtime: None' or '__rand__' on 'rangemask: int' `None` is the default value of the `size` and `mtime` parameters of the `addfile` method. However, the relevant lines are only used in a code path where those defaults are never used. These `size` and `mtime` are passed to `DirstateItem.new_normal` which (in the C implementation) calls `dirstate_item_new_normal` which uses: PyArg_ParseTuple(args, "iii", &mode, &size, &mtime) So `None` values would cause an exception to be raised anyway. The new `assert`s only move that exception earlier, and informs pytype that we expect `None` to never happen in this code path. Differential Revision: https://phab.mercurial-scm.org/D11500
Thu, 23 Sep 2021 18:29:40 +0200 dirstate: Pass the final DirstateItem to _rustmap.addfile()
Simon Sapin <simon.sapin@octobus.net> [Thu, 23 Sep 2021 18:29:40 +0200] rev 48066
dirstate: Pass the final DirstateItem to _rustmap.addfile() Now that the Python DirstateItem class wraps a Rust DirstateEntry value, use that value directly instead of converting through v1 data + 5 booleans. Also remove propogating the return value. None of the callers look at it, and it is always None. Differential Revision: https://phab.mercurial-scm.org/D11494
Thu, 23 Sep 2021 15:36:43 +0200 dirstate: Replace dropfile with drop_item_and_copy_source
Simon Sapin <simon.sapin@octobus.net> [Thu, 23 Sep 2021 15:36:43 +0200] rev 48065
dirstate: Replace dropfile with drop_item_and_copy_source Those removing a DirstateItem and a copy source are always done together Differential Revision: https://phab.mercurial-scm.org/D11493
Thu, 23 Sep 2021 15:29:38 +0200 rust: Remove some obsolete doc-comments
Simon Sapin <simon.sapin@octobus.net> [Thu, 23 Sep 2021 15:29:38 +0200] rev 48064
rust: Remove some obsolete doc-comments About parameters that have been removed or replaced Differential Revision: https://phab.mercurial-scm.org/D11492
Thu, 23 Sep 2021 15:26:33 +0200 dirstate: Remove return boolean from dirstatemap.dropfile
Simon Sapin <simon.sapin@octobus.net> [Thu, 23 Sep 2021 15:26:33 +0200] rev 48063
dirstate: Remove return boolean from dirstatemap.dropfile None of the remaining callers use it. Differential Revision: https://phab.mercurial-scm.org/D11491
Wed, 22 Sep 2021 18:56:58 +0200 dirstate: Propagate dirstate-v2 parse errors from set_dirstate_item
Simon Sapin <simon.sapin@octobus.net> [Wed, 22 Sep 2021 18:56:58 +0200] rev 48062
dirstate: Propagate dirstate-v2 parse errors from set_dirstate_item … so that Python sees a proper ValueError instead of only `SystemError: Rust panic` Differential Revision: https://phab.mercurial-scm.org/D11489
Wed, 22 Sep 2021 18:42:00 +0200 dirstate: Don’t drop unrelated data in DirstateMap::set_entry
Simon Sapin <simon.sapin@octobus.net> [Wed, 22 Sep 2021 18:42:00 +0200] rev 48061
dirstate: Don’t drop unrelated data in DirstateMap::set_entry For example, copy source are handled separately. Removing it goes through the `copy_map_remove` method (exposed to Python as `.copymap.pop()`) Differential Revision: https://phab.mercurial-scm.org/D11488
Wed, 22 Sep 2021 18:21:58 +0200 dirstate: Skip no-op conversion in Rust DirstateMap::set_v1
Simon Sapin <simon.sapin@octobus.net> [Wed, 22 Sep 2021 18:21:58 +0200] rev 48060
dirstate: Skip no-op conversion in Rust DirstateMap::set_v1 Now that the `DirstateItem` python class is implemented in Rust containing a `DirstateEntry` value, use that value directly instead of reconstructing it from v1 data. Also rename from `set_v1` since dirstate-v1 data is not used anymore. Differential Revision: https://phab.mercurial-scm.org/D11487
Wed, 22 Sep 2021 11:33:29 +0200 dirstate: Use the Rust implementation of DirstateItem when Rust is enabled
Simon Sapin <simon.sapin@octobus.net> [Wed, 22 Sep 2021 11:33:29 +0200] rev 48059
dirstate: Use the Rust implementation of DirstateItem when Rust is enabled … instead of the C implementation, with C/Rust conversions at the FFI boundary Differential Revision: https://phab.mercurial-scm.org/D11486
Wed, 22 Sep 2021 11:28:52 +0200 rust: Add Python bindings for DirstateEntry as rustext.dirstate.DirstateItem
Simon Sapin <simon.sapin@octobus.net> [Wed, 22 Sep 2021 11:28:52 +0200] rev 48058
rust: Add Python bindings for DirstateEntry as rustext.dirstate.DirstateItem Differential Revision: https://phab.mercurial-scm.org/D11485
Mon, 20 Sep 2021 19:18:21 +0200 rust: Align DirstateEntry internals with Python/C DirstateItem
Simon Sapin <simon.sapin@octobus.net> [Mon, 20 Sep 2021 19:18:21 +0200] rev 48057
rust: Align DirstateEntry internals with Python/C DirstateItem This propagate to this Rust struct the similar change that was made recently to the Python classe and C struct. Namely, instead of storing a four-valued `state` field we now store seven (bit-packed) booleans that give lower-level information. Additionally, the marker values -1 and -2 for mtime and size should not be used internally anymore. They are replaced by some combinations of booleans For now, all uses of of `DirstateEntry` still use the compatibility APIs with `state` and marker values. Later the Rust API for DirstateMap will be increasingly updated to the new style. Also change the expected result of the test_non_normal_other_parent_entries unit test. Only a `DirstateEntry` with `size == -2 && mtime != -1` is affected, but this case never occurs outside of unit tests. `size == -2` was the marker value for "from other parent" entries, where no meaningful mtime is stored. Differential Revision: https://phab.mercurial-scm.org/D11484
Tue, 28 Sep 2021 09:40:57 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Tue, 28 Sep 2021 09:40:57 +0200] rev 48056
branching: merge stable into default
Wed, 22 Sep 2021 17:14:54 -0400 bookmarks: add an option to make pull mirror remote bookmarks
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Wed, 22 Sep 2021 17:14:54 -0400] rev 48055
bookmarks: add an option to make pull mirror remote bookmarks For backups for instance. Merging bookmarks is not a useful behavior in that case. Differential Revision: https://phab.mercurial-scm.org/D11490
Thu, 23 Sep 2021 09:42:20 -0700 errors: use InputError for bad path arguments to `hg annotate`
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Sep 2021 09:42:20 -0700] rev 48054
errors: use InputError for bad path arguments to `hg annotate` Differential Revision: https://phab.mercurial-scm.org/D11498
Thu, 23 Sep 2021 09:40:01 -0700 errors: use InputError for bad --similarity value
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Sep 2021 09:40:01 -0700] rev 48053
errors: use InputError for bad --similarity value Differential Revision: https://phab.mercurial-scm.org/D11497
Thu, 23 Sep 2021 09:38:45 -0700 errors: use InputError for some invalid revsets and such
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Sep 2021 09:38:45 -0700] rev 48052
errors: use InputError for some invalid revsets and such Differential Revision: https://phab.mercurial-scm.org/D11496
Thu, 23 Sep 2021 17:05:37 -0400 merge: with stable
Augie Fackler <augie@google.com> [Thu, 23 Sep 2021 17:05:37 -0400] rev 48051
merge: with stable
Thu, 23 Sep 2021 16:52:35 +0900 dirstate: fix leak of entry object in dirstate_item_from_v1_data()
Yuya Nishihara <yuya@tcha.org> [Thu, 23 Sep 2021 16:52:35 +0900] rev 48050
dirstate: fix leak of entry object in dirstate_item_from_v1_data()
Thu, 23 Sep 2021 16:44:17 +0900 dirstate: fix parse_dirstate() to error out if NULL entry created
Yuya Nishihara <yuya@tcha.org> [Thu, 23 Sep 2021 16:44:17 +0900] rev 48049
dirstate: fix parse_dirstate() to error out if NULL entry created Since 83f0e93ec34b "dirstate-item: move the C implementation to the same logic", dirstate_item_from_v1_data() gets more likely to return NULL, and the fuzzer crashes because of that.
Mon, 20 Sep 2021 20:55:38 +0200 rust: Remove EntryState::Unknown
Simon Sapin <simon.sapin@octobus.net> [Mon, 20 Sep 2021 20:55:38 +0200] rev 48048
rust: Remove EntryState::Unknown This enum variant represented the `state == '?'` case, which was used to represent the absence of a dirstate entry/item (and therefore of that entry’s state). Now that previous refactors have removed this use in the Python/Rust FFI APIs, the remaining uses can be removed by replacing `EntryState` by `Option<EntryState>` where appropriate, using `None` to represent the absence of an entry. Differential Revision: https://phab.mercurial-scm.org/D11465
Mon, 20 Sep 2021 20:21:35 +0200 dirstate: Remove the `state == ' '` special case
Simon Sapin <simon.sapin@octobus.net> [Mon, 20 Sep 2021 20:21:35 +0200] rev 48047
dirstate: Remove the `state == ' '` special case Previously this was used to create a `DirstateItem` representing dirstate tree nodes that semantically don’t have an associated `DirtateItem`. This isn’t used anymore now that `dirstatemap.debug_iter` yields plain tuples. Differential Revision: https://phab.mercurial-scm.org/D11464
Mon, 20 Sep 2021 20:20:55 +0200 debugsate: Change debug_iter() to yield tuples instead of DirstateItem
Simon Sapin <simon.sapin@octobus.net> [Mon, 20 Sep 2021 20:20:55 +0200] rev 48046
debugsate: Change debug_iter() to yield tuples instead of DirstateItem This removes the need for `DirstateItem` to support the `state == ' '` special case which represents dirstate tree nodes without an item. Differential Revision: https://phab.mercurial-scm.org/D11463
Mon, 20 Sep 2021 19:59:09 +0200 debugstate: Always call dirstatemap.debug_iter()
Simon Sapin <simon.sapin@octobus.net> [Mon, 20 Sep 2021 19:59:09 +0200] rev 48045
debugstate: Always call dirstatemap.debug_iter() … passing it a new `all` argument for the `--all` CLI option, instead of conditionally calling `.debug_iter()` or `.items()` This prepares for the next commit. Differential Revision: https://phab.mercurial-scm.org/D11462
Fri, 17 Sep 2021 13:33:45 +0200 rust: Make the fields of DirstateEntry private
Simon Sapin <simon.sapin@octobus.net> [Fri, 17 Sep 2021 13:33:45 +0200] rev 48044
rust: Make the fields of DirstateEntry private This is a first step toward making its internal structure equivalent to Python’s DirstateItem. Differential Revision: https://phab.mercurial-scm.org/D11461
Mon, 20 Sep 2021 13:16:36 +0200 rust: Remove support for passing a dict to the Rust pathutil.dirs()
Simon Sapin <simon.sapin@octobus.net> [Mon, 20 Sep 2021 13:16:36 +0200] rev 48043
rust: Remove support for passing a dict to the Rust pathutil.dirs() That is only used by the Python dirstatemap, which not used when Rust is enabled. This allows removing the private `extract_dirstate` function which creates `DirstateEntry` values. This in turn will make easier upcoming changes to `DirstateEntry`. Differential Revision: https://phab.mercurial-scm.org/D11460
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 tip