Sun, 04 Jul 2021 20:40:10 +0200 rust-dirstate: make the MTIME_UNSET public
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 20:40:10 +0200] rev 47519
rust-dirstate: make the MTIME_UNSET public We will use it in the cpython layer soon. Differential Revision: https://phab.mercurial-scm.org/D10961
Sun, 04 Jul 2021 19:42:03 +0200 rust-dirstatemap: expand the wrapping code a bit
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 19:42:03 +0200] rev 47518
rust-dirstatemap: expand the wrapping code a bit This is easier to read. Differential Revision: https://phab.mercurial-scm.org/D10960
Sun, 04 Jul 2021 01:14:15 +0200 dirstate-entry: restrict `from_p2` property to tracked file
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 01:14:15 +0200] rev 47517
dirstate-entry: restrict `from_p2` property to tracked file The other case is now handled in `from_p2_removed`, and should ideally be moved to a lower level. So we can drop the `state == 'n'` narrowing and move it in the property itself. Differential Revision: https://phab.mercurial-scm.org/D10959
Sat, 03 Jul 2021 20:34:09 +0200 dirstate-entry: `merged_removed` and `from_p2_removed` properties
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 03 Jul 2021 20:34:09 +0200] rev 47516
dirstate-entry: `merged_removed` and `from_p2_removed` properties Lets start to define and use more semantic property. These two might be a bit too low level and could be shaved off later, however this seems an improvement for now. Differential Revision: https://phab.mercurial-scm.org/D10958
Sat, 03 Jul 2021 04:18:54 +0200 dirstate-entry: add a `removed` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 03 Jul 2021 04:18:54 +0200] rev 47515
dirstate-entry: add a `removed` property Lets start to define and use more semantic property. Differential Revision: https://phab.mercurial-scm.org/D10957
Sat, 03 Jul 2021 04:26:28 +0200 dirstate-entry: add a `from_p2` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 03 Jul 2021 04:26:28 +0200] rev 47514
dirstate-entry: add a `from_p2` property Lets start to define and use more semantic property. Differential Revision: https://phab.mercurial-scm.org/D10956
Sat, 03 Jul 2021 04:07:21 +0200 dirstate-entry: add a `merged` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 03 Jul 2021 04:07:21 +0200] rev 47513
dirstate-entry: add a `merged` property Lets start to define and use more semantic property. Differential Revision: https://phab.mercurial-scm.org/D10955
Sun, 04 Jul 2021 03:29:20 +0200 dirstate-entry: add a `state` property (and use it)
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 03:29:20 +0200] rev 47512
dirstate-entry: add a `state` property (and use it) This replace the [0] access. Ultimately is we should probably get ride of this in its current form. However this is a good transitional solution to move away for tuple indexing for now. Differential Revision: https://phab.mercurial-scm.org/D10954
Sat, 03 Jul 2021 19:52:00 +0200 dirstate: move most of the `remove` logic with dirstatemap `removefile`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 03 Jul 2021 19:52:00 +0200] rev 47511
dirstate: move most of the `remove` logic with dirstatemap `removefile` This code deal with special logic to preserving "merged" and "from_p2" information when removing a file. These are implementation details that are more suitable for the dirstatemap layer. Since the dirstatemap layer alreaday have most of the information necessary to do so, the move is easy. This move helps us to encapsulate more implementation details within the dirstatemap and its entry. Easing the use of a different storage for dirstate v2. Differential Revision: https://phab.mercurial-scm.org/D10953
Sat, 03 Jul 2021 20:12:46 +0200 dirstate: add a `in_merge` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 03 Jul 2021 20:12:46 +0200] rev 47510
dirstate: add a `in_merge` property This factor the "p2 is not null" check and is fairly simpler to read. Differential Revision: https://phab.mercurial-scm.org/D10952
Sat, 03 Jul 2021 04:01:17 +0200 dirstate-entry: introduce dedicated accessors for v1 serialization
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 03 Jul 2021 04:01:17 +0200] rev 47509
dirstate-entry: introduce dedicated accessors for v1 serialization In the spirit of changing the content and storage of the dirstate entry, we add new method that the code doing v1 serialisation can use. Adding such method to the C object is quite trivial. Differential Revision: https://phab.mercurial-scm.org/D10951
Sat, 03 Jul 2021 03:55:23 +0200 dirstate-entry: goes through the `dirstatetuple` constructor in all cases
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 03 Jul 2021 03:55:23 +0200] rev 47508
dirstate-entry: goes through the `dirstatetuple` constructor in all cases We need to make sure we build an object. Differential Revision: https://phab.mercurial-scm.org/D10950
Sat, 03 Jul 2021 03:48:35 +0200 dirstate-entry: turn dirstate tuple into a real object (like in C)
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 03 Jul 2021 03:48:35 +0200] rev 47507
dirstate-entry: turn dirstate tuple into a real object (like in C) With dirstate V2, the stored information and actual format will change. This mean we need to start an a better abstraction for a dirstate entry that a tuple directly accessed. By chance, the C code is already doing this and pretend to be a tuple. So it should be fairly easy. We start with turning the tuple into an object, we will slowly migrate the dirstate code to no longer use the tuple directly in later changesets. Differential Revision: https://phab.mercurial-scm.org/D10949
Fri, 02 Jul 2021 02:27:48 +0200 dirstate: split dirstatemap in its own file
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 02:27:48 +0200] rev 47506
dirstate: split dirstatemap in its own file The dirstate file is large enough and the dirstatemap is quite insulated logic already. Differential Revision: https://phab.mercurial-scm.org/D10934
Fri, 02 Jul 2021 23:09:44 +0200 run-tests: stop writing a `python3` symlink pointing to python2
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 23:09:44 +0200] rev 47505
run-tests: stop writing a `python3` symlink pointing to python2 Having `python3` actually pointing to `python2` is bad. So we stop doing so. In addition we need to re-introduce a `python` executable since some of the script really need to be able to say "current python" in their shbang. For example, `hghave` is one of such script. The faulty changes where introduced by c102b704edb5. Differential Revision: https://phab.mercurial-scm.org/D10943
Tue, 06 Jul 2021 12:42:32 +0200 check-code: stop forbidding return code result
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 06 Jul 2021 12:42:32 +0200] rev 47504
check-code: stop forbidding return code result There is no explication of what is the intend of that check and what is the alternative. I suspect this comes from the transition to the "unified test" format circa 2010. With the non zero return explicitly listed in the output explicit $? checking became Redundant. However there is valid use case for checking $? so I am dropping this check. Differential Revision: https://phab.mercurial-scm.org/D10994
Fri, 02 Jul 2021 22:58:04 +0200 run-tests: avoid an early return
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 22:58:04 +0200] rev 47503
run-tests: avoid an early return To fix the "python3 pointing to python2" we will also need to create a "python" pointer. So we will need to create multiple pointer. So we need to stop using early return. We replace the early return with a loop and a continue, since the next changeset will introduce that loop anyway. Differential Revision: https://phab.mercurial-scm.org/D10942
Fri, 02 Jul 2021 22:53:17 +0200 run-tests: clarify pyexename assignement
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 22:53:17 +0200] rev 47502
run-tests: clarify pyexename assignement That assignement is wrong, we clarify that it is wrong before starting to fix it. This will make the fix clearer. Differential Revision: https://phab.mercurial-scm.org/D10941
Fri, 02 Jul 2021 22:50:43 +0200 run-tests: factor appdata out
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 22:50:43 +0200] rev 47501
run-tests: factor appdata out This is a gratuitous readability change. Differential Revision: https://phab.mercurial-scm.org/D10940
Fri, 02 Jul 2021 22:48:47 +0200 run-tests: unroll a non-so-one-liner
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 22:48:47 +0200] rev 47500
run-tests: unroll a non-so-one-liner This is shorter and clearer. Differential Revision: https://phab.mercurial-scm.org/D10939
Fri, 02 Jul 2021 22:48:35 +0200 run-tests: unroll a non-so-one-liner
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 22:48:35 +0200] rev 47499
run-tests: unroll a non-so-one-liner This is shorter and clearer. Differential Revision: https://phab.mercurial-scm.org/D10938
Fri, 02 Jul 2021 20:18:42 +0200 testing: fix _timeout_factor
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 20:18:42 +0200] rev 47498
testing: fix _timeout_factor With `--debug`, `run-tests.py` set the timeout to 0... that breaks the logic in `mercurial.testing`. Differential Revision: https://phab.mercurial-scm.org/D10937
Sat, 03 Jul 2021 10:21:16 +0300 exchange: use "served" repo filter to guess what the server will publish
Anton Shestakov <av6@dwimlabs.net> [Sat, 03 Jul 2021 10:21:16 +0300] rev 47497
exchange: use "served" repo filter to guess what the server will publish Previously, the second push in the added test would say "push would publish 2 changesets" because _checkpublish() was considering secret changesets to be "pushable" when push command had a --rev argument. Without --rev argument to push command, we already filter the repo properly. Differential Revision: https://phab.mercurial-scm.org/D10948
Thu, 01 Jul 2021 18:51:18 +0200 rust: Document the DirstateMapMethods trait
Simon Sapin <simon.sapin@octobus.net> [Thu, 01 Jul 2021 18:51:18 +0200] rev 47496
rust: Document the DirstateMapMethods trait Differential Revision: https://phab.mercurial-scm.org/D10919
Fri, 02 Jul 2021 02:36:07 +0200 dirstate: document the dirstatetuple content
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 02:36:07 +0200] rev 47495
dirstate: document the dirstatetuple content We are about to modify this, so let us document the existing code. Differential Revision: https://phab.mercurial-scm.org/D10935
Fri, 02 Jul 2021 02:17:31 +0200 dirstate: explicitely deal with the `added` case in `_addpath`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 02:17:31 +0200] rev 47494
dirstate: explicitely deal with the `added` case in `_addpath` This special case is now directly handled, this clarify the possible value for the other options. Differential Revision: https://phab.mercurial-scm.org/D10933
Fri, 02 Jul 2021 02:17:18 +0200 dirstate: add an explicit `possibly_dirty` parameter to `_addpath`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 02:17:18 +0200] rev 47493
dirstate: add an explicit `possibly_dirty` parameter to `_addpath` This lets says what we mean instead of using magic value. The lower level can then decide how to express that. Differential Revision: https://phab.mercurial-scm.org/D10932
Fri, 02 Jul 2021 02:01:10 +0200 dirstate: add an explicit `from_p2` parameter to `_addpath`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 02:01:10 +0200] rev 47492
dirstate: add an explicit `from_p2` parameter to `_addpath` This lets says what we mean instead of using magic value. The lower level can then decide how to express that. Differential Revision: https://phab.mercurial-scm.org/D10931
Fri, 02 Jul 2021 02:05:47 +0200 dirstate: add default value to _addpath
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 02:05:47 +0200] rev 47491
dirstate: add default value to _addpath We want to remove the magic value usage from the higher level, so lets stop passing them explicitely when possible. Differential Revision: https://phab.mercurial-scm.org/D10930
Fri, 02 Jul 2021 01:02:46 +0200 dirstate: move the _rangemask filtering closer to its storage
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 01:02:46 +0200] rev 47490
dirstate: move the _rangemask filtering closer to its storage The goal is to get ready to move these kind of processing at a lower level. We start with move move _rangemask filtering close to where it is sent to the lower level to make the future move trivial. Differential Revision: https://phab.mercurial-scm.org/D10929
Thu, 01 Jul 2021 19:15:30 +0200 dirstate: introduce a symbolic constant for the AMBIGUOUS_TIME marker
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Jul 2021 19:15:30 +0200] rev 47489
dirstate: introduce a symbolic constant for the AMBIGUOUS_TIME marker This is going to be clearer and easier to track than -1. Ultimately I would like to get ride of this special value everywhere but in the lower level, however we need to clarify the API first. This changeset is part of such clarification. Differential Revision: https://phab.mercurial-scm.org/D10928
Thu, 01 Jul 2021 19:15:22 +0200 dirstate: introduce a symbolic constant for the NONNORMAL marker
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Jul 2021 19:15:22 +0200] rev 47488
dirstate: introduce a symbolic constant for the NONNORMAL marker This is going to be clearer and easier to track than -1. Ultimately I would like to get ride of this special value everywhere but in the lower level, however we need to clarify the API first. This changeset is part of such clarification. Differential Revision: https://phab.mercurial-scm.org/D10927
Thu, 01 Jul 2021 19:04:11 +0200 dirstate: introduce a symbolic constant for the FROM_P2 marker
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Jul 2021 19:04:11 +0200] rev 47487
dirstate: introduce a symbolic constant for the FROM_P2 marker This is going to be clearer and easier to track than -2. Ultimately I would like to get ride of this special value everywhere but in the lower level, however we need to clarify the API first. This changeset is part of such clarification. Differential Revision: https://phab.mercurial-scm.org/D10926
Thu, 01 Jul 2021 18:59:29 +0200 dirstate: split a not-so-one-liner
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Jul 2021 18:59:29 +0200] rev 47486
dirstate: split a not-so-one-liner This is shorter and simpler to read. Differential Revision: https://phab.mercurial-scm.org/D10925
Thu, 01 Jul 2021 18:57:35 +0200 dirstate: split a not-so-one-liner
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Jul 2021 18:57:35 +0200] rev 47485
dirstate: split a not-so-one-liner This is simpler to read. Differential Revision: https://phab.mercurial-scm.org/D10924
Thu, 01 Jul 2021 18:56:34 +0200 dirstate: split a not-so-one-liner
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Jul 2021 18:56:34 +0200] rev 47484
dirstate: split a not-so-one-liner This is shorter and simpler to read. Differential Revision: https://phab.mercurial-scm.org/D10923
Mon, 28 Jun 2021 16:50:19 +0200 dirstate-tree: Keep a counter of descendant nodes that have an entry
Simon Sapin <simon.sapin@octobus.net> [Mon, 28 Jun 2021 16:50:19 +0200] rev 47483
dirstate-tree: Keep a counter of descendant nodes that have an entry … and change the `DirstateMap::has_dir` method to be based on this counter being non-zero instead of the mere presence of a node. A node with zero descendent with an entry currently should be removed from the tree, but soon we’ll make the dirstate track additional nodes. (Specifically, for non-ignored directories in order to keep track of their mtime and optimize status by doing fewer `read_dir` calls.) Differential Revision: https://phab.mercurial-scm.org/D10922
Mon, 28 Jun 2021 15:52:10 +0200 dirstate: Removed unused instances of `DirsMultiset`
Simon Sapin <simon.sapin@octobus.net> [Mon, 28 Jun 2021 15:52:10 +0200] rev 47482
dirstate: Removed unused instances of `DirsMultiset` … in Rust-backed dirstatemap. The Python class `dirstatemap` had cached properties `_dirs` and `_alldirs` that were not used for `hastrackeddir` and `hasdir` since they were redundant with corresponding fields for the Rust `DirstateMap` struct. `dirfoldmap` is modified to reuse instead the directory iterator introduced in 3b9914b28133c0918186b6e8b9e4f1916e21338d. Differential Revision: https://phab.mercurial-scm.org/D10921
Mon, 28 Jun 2021 15:41:50 +0200 dirstate-v2: Use 32-bit integers instead of 64-bit for offsets
Simon Sapin <simon.sapin@octobus.net> [Mon, 28 Jun 2021 15:41:50 +0200] rev 47481
dirstate-v2: Use 32-bit integers instead of 64-bit for offsets This saves 12 bytes per node. (Nodes representing files or directories.) These are offsets to other parts of the file. This would only be a limitation for a `.hg/dirstate` file larger than 4 GiB, which would only happen for a repository with dozens of millions of files and directories. Differential Revision: https://phab.mercurial-scm.org/D10920
Thu, 24 Jun 2021 21:54:14 +0200 status: Extend read_dir caching to directories with ignored files
Simon Sapin <simon.sapin@octobus.net> [Thu, 24 Jun 2021 21:54:14 +0200] rev 47480
status: Extend read_dir caching to directories with ignored files See code comments Differential Revision: https://phab.mercurial-scm.org/D10909
Fri, 04 Jun 2021 15:26:38 +0200 dirstate-v2: Drop cached read_dir results after .hgignore changes
Simon Sapin <simon.sapin@octobus.net> [Fri, 04 Jun 2021 15:26:38 +0200] rev 47479
dirstate-v2: Drop cached read_dir results after .hgignore changes Soon we’ll want the status algorithm to be able to skip `std::fs::read_dir` in more cases, notabling when listing unknown files but not ignored files. When ignore patterns change (which we detect by their hash, added to the dirstate-v2 format in a previous changeset), a formerly-ignored file could become unknown without changing its parent directory’s modification time. Therefore we remove any directory mtime from the dirstate, effictively invalidating the existing caches. Differential Revision: https://phab.mercurial-scm.org/D10907
Tue, 22 Jun 2021 22:52:08 +0200 censor: split the core of the logic into its own function
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 22 Jun 2021 22:52:08 +0200] rev 47478
censor: split the core of the logic into its own function We now have a "generic" rewrite function (only able to do censoring for now) and a thin wrapper that implement the `censor` API with it. We are now ready to start incorporating strip specific changes. Differential Revision: https://phab.mercurial-scm.org/D10904
Tue, 22 Jun 2021 23:20:32 +0200 censor: migrate the logic to a set of `censor_revs`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 22 Jun 2021 23:20:32 +0200] rev 47477
censor: migrate the logic to a set of `censor_revs` Instead of considering a special unique censored revision within the code, we consider a set of revision (currently always of size 1). This make the main code less censor-centric and prepare for the usage of a similar approach for stripping changesets. Differential Revision: https://phab.mercurial-scm.org/D10903
Tue, 22 Jun 2021 22:35:37 +0200 censor: rename `rl` to `revlog` in the main function
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 22 Jun 2021 22:35:37 +0200] rev 47476
censor: rename `rl` to `revlog` in the main function Now that the bulk of the code moved to smaller function we are less restricted on line length and we can use more explicite naming. Differential Revision: https://phab.mercurial-scm.org/D10902
Tue, 22 Jun 2021 22:28:51 +0200 censor: extract the part about creating and opening new files in a function
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 22 Jun 2021 22:28:51 +0200] rev 47475
censor: extract the part about creating and opening new files in a function The v2_censor function is huge, now that its content has settled a bit it is a good time to split individual part inside dedicated function. The last part is the file copying and opening logic. It now have its own function. Differential Revision: https://phab.mercurial-scm.org/D10901
Tue, 22 Jun 2021 22:10:22 +0200 censor: extract the part about recomputing delta in a function
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 22 Jun 2021 22:10:22 +0200] rev 47474
censor: extract the part about recomputing delta in a function The v2_censor function is huge, now that its content has settled a bit it is a good time to split individual part inside dedicated function. It is now the turn of the logic that recompute new delta to replace the one based on the revision that are going away. Differential Revision: https://phab.mercurial-scm.org/D10900
Tue, 22 Jun 2021 21:49:31 +0200 censor: extract the part about writing the other revision in a function
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 22 Jun 2021 21:49:31 +0200] rev 47473
censor: extract the part about writing the other revision in a function The v2_censor function is huge, now that its content has settled a bit it is a good time to split individual part inside dedicated function. We continue with a small function that add a non-censored revision back to the revlog. Differential Revision: https://phab.mercurial-scm.org/D10899
Tue, 22 Jun 2021 21:41:33 +0200 censor: extract the part about writing the censored revision in a function
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 22 Jun 2021 21:41:33 +0200] rev 47472
censor: extract the part about writing the censored revision in a function The v2_censor function is huge, now that its content has settled a bit it is a good time to split individual part inside dedicated function. We start with a small function that process the censored revision. Differential Revision: https://phab.mercurial-scm.org/D10898
Tue, 22 Jun 2021 21:22:55 +0200 censor: put the tuple of open files in an explicit variable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 22 Jun 2021 21:22:55 +0200] rev 47471
censor: put the tuple of open files in an explicit variable This will be simpler to pass these file around in future changesets. Differential Revision: https://phab.mercurial-scm.org/D10897
Tue, 22 Jun 2021 11:09:25 +0200 revlog: rewrite `censors.py` to `rewrite.py`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 22 Jun 2021 11:09:25 +0200] rev 47470
revlog: rewrite `censors.py` to `rewrite.py` The logic we use for censoring revision will be mostly common with the one we needs for stripping. So we rename the module to `rewrite` to better match its future content. Differential Revision: https://phab.mercurial-scm.org/D10896
Thu, 17 Jun 2021 19:48:25 +0200 copies: Keep changelog sidedata file open during copy tracing
Simon Sapin <simon.sapin@octobus.net> [Thu, 17 Jun 2021 19:48:25 +0200] rev 47469
copies: Keep changelog sidedata file open during copy tracing Instead of having a callback that opens and closes that file many times, a add and use a context manager method on the `revlog` class that keeps files open for its duration. Differential Revision: https://phab.mercurial-scm.org/D10888
Tue, 22 Jun 2021 13:18:29 -0400 purge: restore the `testedwith` declaration
Matt Harbison <matt_harbison@yahoo.com> [Tue, 22 Jun 2021 13:18:29 -0400] rev 47468
purge: restore the `testedwith` declaration Otherwise, this extension gets highlighted as a 3rd party extension when an exception occurs. Differential Revision: https://phab.mercurial-scm.org/D10895
Mon, 21 Jun 2021 17:29:22 +0200 rust: remove dead utils module
Raphaël Gomès <rgomes@octobus.net> [Mon, 21 Jun 2021 17:29:22 +0200] rev 47467
rust: remove dead utils module This was introduced a while back while not being imported anywhere in the module system. How pertinent this Facebook module was to the codebase was debatable at the time, nowadays with the Rust VFS layer having laid its foundations, it is clear that we should drop it. Differential Revision: https://phab.mercurial-scm.org/D10890
Mon, 21 Jun 2021 10:01:55 -0700 rebase: use str-keyed opts in remaining places
Martin von Zweigbergk <martinvonz@google.com> [Mon, 21 Jun 2021 10:01:55 -0700] rev 47466
rebase: use str-keyed opts in remaining places Differential Revision: https://phab.mercurial-scm.org/D10892
Mon, 21 Jun 2021 09:54:36 -0700 rebase: keep str-keyed opts long enough to make `action` a str
Martin von Zweigbergk <martinvonz@google.com> [Mon, 21 Jun 2021 09:54:36 -0700] rev 47465
rebase: keep str-keyed opts long enough to make `action` a str This is just another little py3 cleanup. Differential Revision: https://phab.mercurial-scm.org/D10891
Tue, 22 Jun 2021 08:24:27 -0700 benchmarks: restore `output` variable lost in D10884
Martin von Zweigbergk <martinvonz@google.com> [Tue, 22 Jun 2021 08:24:27 -0700] rev 47464
benchmarks: restore `output` variable lost in D10884 Noticed by pyflakes (which I didn't have installed for Python 3.9 when I sent D10884). Differential Revision: https://phab.mercurial-scm.org/D10894
Mon, 07 Jun 2021 11:59:27 +0200 censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 07 Jun 2021 11:59:27 +0200] rev 47463
censor: implement censoring for revlogv2 It is a bit verbose and rough, but it works. Most of that logic can be common for `stripping`, so we can expect more refactoring of that code to accommodate both needs. However I wanted to keep this changesets "simple enough" and before moving forward. We also need to properly delete the older index/data/sidedata file, but this has implication for streaming clone and transaction, so this will come later. Differential Revision: https://phab.mercurial-scm.org/D10869
Sun, 20 Jun 2021 23:05:58 +0200 deltas: at a `target_rev` parameter to finddeltainfo
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 20 Jun 2021 23:05:58 +0200] rev 47462
deltas: at a `target_rev` parameter to finddeltainfo Otherwise, recomputing a delta for a revision might result in a delta against a later revision or a full snapshot thinking we are appending a new revision. We will make use of this during censoring (and later, stripping). Differential Revision: https://phab.mercurial-scm.org/D10887
Wed, 09 Jun 2021 19:47:29 +0200 revlog: list older-but-still-around file in `files`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Jun 2021 19:47:29 +0200] rev 47461
revlog: list older-but-still-around file in `files` These older files will eventually be removed, but we have to take them in account until they are. So we update `files` to keep fncache happy. Differential Revision: https://phab.mercurial-scm.org/D10868
Sat, 29 May 2021 00:11:12 +0200 revlog: add docket method to request new content files
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 29 May 2021 00:11:12 +0200] rev 47460
revlog: add docket method to request new content files If we want to write content into new files, we need to be able to ask for them. Differential Revision: https://phab.mercurial-scm.org/D10867
Thu, 20 May 2021 21:47:09 +0200 revlog: add a way to keep track of older uids in the docket
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 20 May 2021 21:47:09 +0200] rev 47459
revlog: add a way to keep track of older uids in the docket When the revlog content is rewritten, we will use new files, to avoid truncating the previous ones. We need some way to keep track of the older files before we clean them up. Differential Revision: https://phab.mercurial-scm.org/D10866
Mon, 21 Jun 2021 15:00:53 +0200 revlog: factor the logic to determine the delta compression out
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 21 Jun 2021 15:00:53 +0200] rev 47458
revlog: factor the logic to determine the delta compression out This make the logic clearly isolated and documented and it will help use to reuse it during censors/strip. Differential Revision: https://phab.mercurial-scm.org/D10889
Thu, 10 Jun 2021 00:16:54 +0200 nodemap: fix some comment formatting
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 10 Jun 2021 00:16:54 +0200] rev 47457
nodemap: fix some comment formatting Black seems unhappy about it. Differential Revision: https://phab.mercurial-scm.org/D10865
Wed, 09 Jun 2021 12:19:42 +0200 revlogv2: fix `hg verify` with revlog v2
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Jun 2021 12:19:42 +0200] rev 47456
revlogv2: fix `hg verify` with revlog v2 We added a bunch of new files but we never teached some internal about it. This is now fixed. Differential Revision: https://phab.mercurial-scm.org/D10858
Tue, 08 Jun 2021 02:34:59 +0200 revlogv2: also test that local clone works
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Jun 2021 02:34:59 +0200] rev 47455
revlogv2: also test that local clone works This is now the case so lets add a test. Differential Revision: https://phab.mercurial-scm.org/D10857
Tue, 08 Jun 2021 03:56:33 +0200 clone: also report the bookmark file as copied
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Jun 2021 03:56:33 +0200] rev 47454
clone: also report the bookmark file as copied This is a small UI adjustement, but this is easy enough to do. Differential Revision: https://phab.mercurial-scm.org/D10856
Tue, 08 Jun 2021 02:06:45 +0200 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Jun 2021 02:06:45 +0200] rev 47453
clone: reuse the stream clone logic for local clone Streaming clone and local (non `--pull`) clone do mostly the same thing, however they were using different logic to do so. This means the logic frequently went out of sync and that new case had to be dealt with twice. This is fragile and anoying. So we replace this with a re-use of the logic we use for streaming clone. I can see various test changes: - a more precise progress output, - armless fncache loading during clone, - fncache is no longer hardlinked (since we write it by hand). I am not reinstalling the `reposimplestore` specific output, as far as I understand this variant have been broken for years. Differential Revision: https://phab.mercurial-scm.org/D10855
Wed, 09 Jun 2021 15:33:58 +0200 copyfiles: add a way to relax the file system checking for hardlink
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Jun 2021 15:33:58 +0200] rev 47452
copyfiles: add a way to relax the file system checking for hardlink This is critical for transaction file, less for hardlink/copy clone as we are about to do. Since `pure` build does not have a `getfstype` implementation this would disable hardlink clone for all pure build. So we add a parameter to control that extra check. Differential Revision: https://phab.mercurial-scm.org/D10854
Tue, 08 Jun 2021 02:31:17 +0200 copyfile: add a option callback for failed hardlinking
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Jun 2021 02:31:17 +0200] rev 47451
copyfile: add a option callback for failed hardlinking Local clone, adjust its UI depending on the success of using hardlinking, so we add a small callback making it possible for `copyfile` to signal if the requested hardlinking failed. Differential Revision: https://phab.mercurial-scm.org/D10853
Tue, 08 Jun 2021 02:06:02 +0200 streamingclone: extract the scanning part from the generation part
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Jun 2021 02:06:02 +0200] rev 47450
streamingclone: extract the scanning part from the generation part We will reuse the scanning part for local clone, so we need it in a dedicated function. Differential Revision: https://phab.mercurial-scm.org/D10852
Tue, 08 Jun 2021 02:05:05 +0200 vfs: add a `register_file` method on the vfs class
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Jun 2021 02:05:05 +0200] rev 47449
vfs: add a `register_file` method on the vfs class This is used by the fncache vfs to register new file. Until now, `fncache` have been doing this "automatically" by monitoring write pattern. However this is fragile and when we copy files in place by other means, we need something more robuts. So we add an explicit method to do so. Differential Revision: https://phab.mercurial-scm.org/D10851
Wed, 09 Jun 2021 01:10:34 +0200 clone: use "official" API to create local clone destination
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Jun 2021 01:10:34 +0200] rev 47448
clone: use "official" API to create local clone destination This make sure we have a properly created, fully functional repository early. This will be useful to simply the hardlink/copy phases of the local clone to make it share more of its logic with the similar "stream" cloning. This has a minor impact of the test and the resulting repository has is better initialized (eg: the `wcache` directory is pre-created.) Differential Revision: https://phab.mercurial-scm.org/D10850
Wed, 09 Jun 2021 01:10:26 +0200 localrepo: introduce a clone_requirements function
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Jun 2021 01:10:26 +0200] rev 47447
localrepo: introduce a clone_requirements function This function take a source repository and return a relevant set of requirements that should be used by a copy clone. This will help make the creation of the destination repository during copy clone simpler. Differential Revision: https://phab.mercurial-scm.org/D10849
Mon, 07 Jun 2021 20:40:43 +0200 createrepository: allow to directly pass the target requirements
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 07 Jun 2021 20:40:43 +0200] rev 47446
createrepository: allow to directly pass the target requirements This is useful when doing a local clone that copies store contents, it will requires the destination to use the very same store requirements so directly providing them will be simpler and safer Differential Revision: https://phab.mercurial-scm.org/D10848
Fri, 18 Jun 2021 16:03:42 -0700 narrowbundle: use new context manager for silencing the ui
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Jun 2021 16:03:42 -0700] rev 47445
narrowbundle: use new context manager for silencing the ui Same reasoning as the previous change. This affects a few tests because of the hack from d7304434390f (changegroup: move message about added changes to transaction summary, 2019-09-08). Differential Revision: https://phab.mercurial-scm.org/D10886
Fri, 18 Jun 2021 16:00:58 -0700 debugbackupbundle: use new context manager for silencing the ui
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Jun 2021 16:00:58 -0700] rev 47444
debugbackupbundle: use new context manager for silencing the ui A difference between setting `ui.quiet` and using `ui.silent()` is that the latter also silences `ui.write()` calls. That's practically always what one wants, including here, I think. Differential Revision: https://phab.mercurial-scm.org/D10885
Fri, 18 Jun 2021 15:48:51 -0700 ui: add a context manager for silencing the ui (pushbuffer+popbuffer)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Jun 2021 15:48:51 -0700] rev 47443
ui: add a context manager for silencing the ui (pushbuffer+popbuffer) We often silence the ui by calling `ui.pushbuffer()` followed (a later in the code) by `ui.popbuffer()`. These places can be identified by the fact that they ignore the output returned from `ui.popbuffer()`. Let's create a context manager for these cases, to avoid repetition, and to avoid accidentally leaving the ui silent on exceptions. I deliberately called the new function `silent()` instead of `buffered()`, because it's just an implementation detail that it uses `pushbuffer()` and `popbuffer()`. We could later optimize it to not buffer the output. Differential Revision: https://phab.mercurial-scm.org/D10884
Fri, 18 Jun 2021 14:17:43 -0700 shelve: don't swallow errors that happen when reverting the working copy
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Jun 2021 14:17:43 -0700] rev 47442
shelve: don't swallow errors that happen when reverting the working copy Same reasoning as the parent commit. The code in question here comes from fb8065de47b0 (unshelve: silence internal revert, 2014-08-15), which says that it was to prepare for some upcoming revert changes. I suppose those changes have happened by now but we fixed something about it, because I don't see any unwanted changes in tests (no changes at all in tests, in fact). Differential Revision: https://phab.mercurial-scm.org/D10883
Fri, 18 Jun 2021 13:55:45 -0700 histedit: don't swallow errors that happen when updating the working copy
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Jun 2021 13:55:45 -0700] rev 47441
histedit: don't swallow errors that happen when updating the working copy Commit 34165875fa5d (histedit: limit updated and merging output to important updates, 2016-02-03) added a call to `ui.pushbuffer(labeled=True, errors=True)`. I don't know if there was a reason for the `errors=True` (nor the `labeled=True` bit, which I removed in the previous commit). It seems bad to just discard the errors, so let's not do that. By not doing that, we can also remove a workaround for the lack of errors from `test-removeemptydirs.t`. Differential Revision: https://phab.mercurial-scm.org/D10882
Fri, 18 Jun 2021 13:44:05 -0700 histedit: don't record labels for output that we will discard
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Jun 2021 13:44:05 -0700] rev 47440
histedit: don't record labels for output that we will discard Differential Revision: https://phab.mercurial-scm.org/D10881
Thu, 10 Jun 2021 15:56:55 -0700 dog-raft: work with str-keyed opts throughout
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Jun 2021 15:56:55 -0700] rev 47439
dog-raft: work with str-keyed opts throughout Differential Revision: https://phab.mercurial-scm.org/D10864
Thu, 10 Jun 2021 15:45:22 -0700 cmdutil: make resolvecommitoptions() work on str-keyed opts
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Jun 2021 15:45:22 -0700] rev 47438
cmdutil: make resolvecommitoptions() work on str-keyed opts As with `checknotesize()`, I also changed to snake_case while at it, to help extensions a little. Differential Revision: https://phab.mercurial-scm.org/D10863
Thu, 10 Jun 2021 14:55:10 -0700 cmdutil: make amend() take str-keyed opts
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Jun 2021 14:55:10 -0700] rev 47437
cmdutil: make amend() take str-keyed opts I couldn't think of a reasonable change to the signature here, so unfortunately it keeps the existing one. Differential Revision: https://phab.mercurial-scm.org/D10862
Thu, 10 Jun 2021 14:47:14 -0700 commit: keep opts dict str-keyed a bit longer
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Jun 2021 14:47:14 -0700] rev 47436
commit: keep opts dict str-keyed a bit longer Differential Revision: https://phab.mercurial-scm.org/D10861
Thu, 10 Jun 2021 14:36:26 -0700 dog-raft: keep opts dict str-keyed a bit longer
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Jun 2021 14:36:26 -0700] rev 47435
dog-raft: keep opts dict str-keyed a bit longer Differential Revision: https://phab.mercurial-scm.org/D10860
Thu, 10 Jun 2021 14:25:16 -0700 cmdutil: make checknotesize() work on str-keyed opts
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Jun 2021 14:25:16 -0700] rev 47434
cmdutil: make checknotesize() work on str-keyed opts Since this patch changes the behavior of the function, I consider it a bonus if the signature also changes so that extensions can detect which version they're dealing with (for the record, I don't have any such extensions). Therefore, I also dropped an unused `ui` argument and renamed the function to use snake_case. Differential Revision: https://phab.mercurial-scm.org/D10859
Thu, 10 Jun 2021 10:53:43 -0700 amend: work mostly with str-type **opts for simplicity
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Jun 2021 10:53:43 -0700] rev 47433
amend: work mostly with str-type **opts for simplicity Differential Revision: https://phab.mercurial-scm.org/D10880
Tue, 15 Jun 2021 12:34:14 +0200 revlog: use file read caching for sidedata
Simon Sapin <simon.sapin@octobus.net> [Tue, 15 Jun 2021 12:34:14 +0200] rev 47432
revlog: use file read caching for sidedata The previous changeset extracted this caching logic from the revlog class into a new class. Adding a new instance of that class allows using the same logic for side data. Differential Revision: https://phab.mercurial-scm.org/D10879
Tue, 08 Jun 2021 19:55:00 +0200 revlog: Extract low-level random-access file read caching logic
Simon Sapin <simon.sapin@octobus.net> [Tue, 08 Jun 2021 19:55:00 +0200] rev 47431
revlog: Extract low-level random-access file read caching logic The `revlog` class does many things, among which fulfilling requests for arbitrary byte slices from the revlog "data file" by reading a larger chunk and caching it in memory, in order to reduce the number of system calls. This extracts that logic into a new class, so that it may later also be used for the side-data file (with another instance of that class). The copyright notice of the new file does not include a date or author name since such information tend not to be kept up-to-date: https://www.linuxfoundation.org/en/blog/copyright-notices-in-open-source-software-projects/ Differential Revision: https://phab.mercurial-scm.org/D10878
Fri, 11 Jun 2021 23:39:31 -0400 typing: disable warnings for a couple of Windows specific attributes
Matt Harbison <matt_harbison@yahoo.com> [Fri, 11 Jun 2021 23:39:31 -0400] rev 47430
typing: disable warnings for a couple of Windows specific attributes Differential Revision: https://phab.mercurial-scm.org/D10870
Sat, 12 Jun 2021 14:50:33 -0400 typing: suppress a false error in mercurial/revlogutils/docket.py on py2
Matt Harbison <matt_harbison@yahoo.com> [Sat, 12 Jun 2021 14:50:33 -0400] rev 47429
typing: suppress a false error in mercurial/revlogutils/docket.py on py2 `ord()` wants bytes or str on py3, so I'm guessing it got confused by passing a single byte instead of a one byte string. But this seems to work on 2.7.18 anyway. Differential Revision: https://phab.mercurial-scm.org/D10876
Wed, 09 Jun 2021 00:59:44 +0200 transaction: simplify `undo.backupfiles` file creation with a variable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Jun 2021 00:59:44 +0200] rev 47428
transaction: simplify `undo.backupfiles` file creation with a variable This make the code shorter and clearer. (This is an opportunity improvement while looking at something next to that.) Differential Revision: https://phab.mercurial-scm.org/D10846
Wed, 09 Jun 2021 00:59:04 +0200 transaction: narrow the error filtering when failing to rename undo file
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Jun 2021 00:59:04 +0200] rev 47427
transaction: narrow the error filtering when failing to rename undo file Having inconsistent "undo" files can be quite serious so we narrow the error filtering to the intent that the comment explain. (This is an opportunity improvement while looking at something next to that.) Differential Revision: https://phab.mercurial-scm.org/D10845
Wed, 09 Jun 2021 01:13:09 +0200 transaction: clarify a conditionnal about version check
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Jun 2021 01:13:09 +0200] rev 47426
transaction: clarify a conditionnal about version check Let us move the short branch early. Differential Revision: https://phab.mercurial-scm.org/D10844
Wed, 09 Jun 2021 01:14:18 +0200 transaction: extract message about different version in a constants
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Jun 2021 01:14:18 +0200] rev 47425
transaction: extract message about different version in a constants This make the code a bit simpler and clearer. (This is an opportunity improvement while looking at something next to that.) Differential Revision: https://phab.mercurial-scm.org/D10843
Wed, 09 Jun 2021 01:12:03 +0200 transaction: explain why some recovery failed
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Jun 2021 01:12:03 +0200] rev 47424
transaction: explain why some recovery failed Right now we issue a message about failing to recover some file, but not why. It seems useful to add some information about that. (This is an opportunity improvement while looking at something next to that.) Differential Revision: https://phab.mercurial-scm.org/D10842
Mon, 07 Jun 2021 21:09:31 +0200 copyfiles: deal with existing file when hardlinking
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 07 Jun 2021 21:09:31 +0200] rev 47423
copyfiles: deal with existing file when hardlinking If the hardlinking fails, we fallback to `shutil.copy`, but do not consider future hardlinking doomed. This is a slight improvement from the current situation, we still avoid hardliking in a case we might be able to do it. However this does not have an impact of the rest of the operation. (This is an opportunity improvement while looking at something next to that.) Differential Revision: https://phab.mercurial-scm.org/D10841
Tue, 08 Jun 2021 03:40:36 +0200 clone: cleanup the "cleanup dir" logic used during local clone
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Jun 2021 03:40:36 +0200] rev 47422
clone: cleanup the "cleanup dir" logic used during local clone With the previous code, there was a small windows were we could delete too much data. This should no longer be the case. (This is an opportunity improvement while looking at something next to that.) Differential Revision: https://phab.mercurial-scm.org/D10840
Fri, 09 Apr 2021 17:04:39 +0200 config: add an experimental option to list all known config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Apr 2021 17:04:39 +0200] rev 47421
config: add an experimental option to list all known config That option is not ready for prime-time, hence the `exp-` prefix. However, this is a good base to start going toward completion. This is also quite useful for developer on its own for now. Differential Revision: https://phab.mercurial-scm.org/D10356
Sat, 12 Jun 2021 00:51:34 -0400 revlog: byteify a few error strings
Matt Harbison <matt_harbison@yahoo.com> [Sat, 12 Jun 2021 00:51:34 -0400] rev 47420
revlog: byteify a few error strings Differential Revision: https://phab.mercurial-scm.org/D10875
Sat, 12 Jun 2021 00:50:03 -0400 revlog: fix a typo closing the wrong file
Matt Harbison <matt_harbison@yahoo.com> [Sat, 12 Jun 2021 00:50:03 -0400] rev 47419
revlog: fix a typo closing the wrong file Caught by pytype as possibly being None, but the file is closed in the previous conditional. Differential Revision: https://phab.mercurial-scm.org/D10874
Fri, 11 Jun 2021 23:57:14 -0400 py3: byteify the version string passed to the deprecation warning method
Matt Harbison <matt_harbison@yahoo.com> [Fri, 11 Jun 2021 23:57:14 -0400] rev 47418
py3: byteify the version string passed to the deprecation warning method The other callers were already correct. Differential Revision: https://phab.mercurial-scm.org/D10873
Fri, 11 Jun 2021 23:51:27 -0400 urlutil: byteify several localized messages
Matt Harbison <matt_harbison@yahoo.com> [Fri, 11 Jun 2021 23:51:27 -0400] rev 47417
urlutil: byteify several localized messages Flagged by pytype. Differential Revision: https://phab.mercurial-scm.org/D10872
Fri, 11 Jun 2021 23:50:29 -0400 urlutil: use the deprecation warning function on the `ui` object
Matt Harbison <matt_harbison@yahoo.com> [Fri, 11 Jun 2021 23:50:29 -0400] rev 47416
urlutil: use the deprecation warning function on the `ui` object PyCharm flagged this as not existing, and I suspect a copy/paste error. Differential Revision: https://phab.mercurial-scm.org/D10871
Wed, 02 Jun 2021 11:25:18 +0200 dirstate-v2: Store a hash of ignore patterns (.hgignore)
Simon Sapin <simon.sapin@octobus.net> [Wed, 02 Jun 2021 11:25:18 +0200] rev 47415
dirstate-v2: Store a hash of ignore patterns (.hgignore) Later, this help extend `read_dir` caching to directories that contain ignored files (but no unknown files). Such cache must be invalidated when ignore patterns change since a formerly-ignored file might become unknown. This helps the default configuration of `hg status` where unknown files must be listed, but ignored files are not. Differential Revision: https://phab.mercurial-scm.org/D10836
Mon, 07 Jun 2021 17:29:32 +0530 rhg: propogate error coming from HgError::Abort to CommandError
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 07 Jun 2021 17:29:32 +0530] rev 47414
rhg: propogate error coming from HgError::Abort to CommandError Differential Revision: https://phab.mercurial-scm.org/D10839
Mon, 07 Jun 2021 17:27:49 +0530 rhg: add exit code to HgError::Abort()
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 07 Jun 2021 17:27:49 +0530] rev 47413
rhg: add exit code to HgError::Abort() My previous attempts to have rhg end with correct exit code was more of bug hunting. I found cases which were failing and fixed them. But as one might expect, more tests started failing. Let's add exit code `HgError::Abort()` and make it users explicitly tell what exit code they want. Differential Revision: https://phab.mercurial-scm.org/D10838
Mon, 07 Jun 2021 17:19:46 +0530 rhg: split non_repo_config and `--config` loading in different functions
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 07 Jun 2021 17:19:46 +0530] rev 47412
rhg: split non_repo_config and `--config` loading in different functions This will help us in better handling of error caused when trying to load `--config` values. Differential Revision: https://phab.mercurial-scm.org/D10837
Mon, 24 May 2021 16:27:54 +0530 rhg: look for repository in ancestors also instead of cwd only
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 24 May 2021 16:27:54 +0530] rev 47411
rhg: look for repository in ancestors also instead of cwd only Last patch introduced config reading at startup to parse value of `--repository` flag. However, that patch only tried to check for current repository at current working directory and not it's ancestors. This patch fixes that. Differential Revision: https://phab.mercurial-scm.org/D10767
Sun, 11 Apr 2021 00:50:10 +0530 rhg: read [paths] for `--repository` value
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 11 Apr 2021 00:50:10 +0530] rev 47410
rhg: read [paths] for `--repository` value hg parses `-R` and `--repository` CLI arguments "early" in order to know which local repository to load config from. (Config can then affect whether or how to fall back.) The value of of those arguments can be not only a filesystem path, but also an alias configured in the `[paths]` section. This part was missing in rhg and this patch implements that. The current patch still lacks functionality to read config of current repository if we are not at root of repo. That will be fixed in upcoming patches. A new crate `home` is added to get path of home directory. Differential Revision: https://phab.mercurial-scm.org/D10296
Mon, 07 Jun 2021 17:10:35 -0400 merge: with stable
Augie Fackler <augie@google.com> [Mon, 07 Jun 2021 17:10:35 -0400] rev 47409
merge: with stable
Sun, 30 May 2021 18:09:29 +0200 revlog: allow to pass an existing docket to `_loadindex()`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 30 May 2021 18:09:29 +0200] rev 47408
revlog: allow to pass an existing docket to `_loadindex()` This will be when switching undelying files, for examples during censors and strip operation with rvlog-v2. Differential Revision: https://phab.mercurial-scm.org/D10800
Sun, 30 May 2021 18:10:15 +0200 revlog: add a ways to blacklist some revision when searching for a delta
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 30 May 2021 18:10:15 +0200] rev 47407
revlog: add a ways to blacklist some revision when searching for a delta This will be useful to recompute appropriate deltas one the fly during censor/strip operation with revlog-v2. Differential Revision: https://phab.mercurial-scm.org/D10799
Sun, 30 May 2021 18:08:52 +0200 util: add `nb_bytes` argument to `copyfile` to partially copy a file
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 30 May 2021 18:08:52 +0200] rev 47406
util: add `nb_bytes` argument to `copyfile` to partially copy a file When set, this allow to copy only the first `nb_bytes` of a file. This will be useful for censor/strip operation with revlogv2. Differential Revision: https://phab.mercurial-scm.org/D10798
Sun, 30 May 2021 16:20:36 +0200 revlog: move `revisioninfo` in `revlogutils`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 30 May 2021 16:20:36 +0200] rev 47405
revlog: move `revisioninfo` in `revlogutils` We will need it in other utility module. So lets extract it from `revlog.py`, the module is too large already anyway. Differential Revision: https://phab.mercurial-scm.org/D10797
Sun, 30 May 2021 17:11:49 +0200 revlog: use the `entry` function in bundlerepo
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 30 May 2021 17:11:49 +0200] rev 47404
revlog: use the `entry` function in bundlerepo We can use some of the default value again! Differential Revision: https://phab.mercurial-scm.org/D10796
Sun, 30 May 2021 17:11:21 +0200 revlog: use entry in revlogv0.py
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 30 May 2021 17:11:21 +0200] rev 47403
revlog: use entry in revlogv0.py This make things clearer and we can reply on some of the default value directly. Differential Revision: https://phab.mercurial-scm.org/D10795
Sun, 30 May 2021 17:11:10 +0200 revlog: use the new `entry` function in revlog.py
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 30 May 2021 17:11:10 +0200] rev 47402
revlog: use the new `entry` function in revlog.py This just make the construction of the tuple clearer. Differential Revision: https://phab.mercurial-scm.org/D10794
Sun, 30 May 2021 17:10:56 +0200 revlog: add a function to build index entry tuple
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 30 May 2021 17:10:56 +0200] rev 47401
revlog: add a function to build index entry tuple Keeping index entry as tuple make sense for performance reason, however it does not means we need to manually build that tuple for all piece of python code that are not performance critical. So we add a nice function responsible to build the tuple using argument using explicit keyword argument. Differential Revision: https://phab.mercurial-scm.org/D10793
Sun, 30 May 2021 16:19:36 +0200 revlog: move `offset_type` to `revlogutils`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 30 May 2021 16:19:36 +0200] rev 47400
revlog: move `offset_type` to `revlogutils` This multiple module are using this so it make sense to move it at the utility level. Differential Revision: https://phab.mercurial-scm.org/D10792
(0) -30000 -10000 -3000 -1000 -120 +120 +1000 +3000 tip