- Jul 04, 2021
-
-
Pierre-Yves David authored
That function as a nice `is_none` method on `PyObject` that we will put to use. Differential Revision: https://phab.mercurial-scm.org/D10962
-
Pierre-Yves David authored
We will use it in the cpython layer soon. Differential Revision: https://phab.mercurial-scm.org/D10961
-
Pierre-Yves David authored
This is easier to read. Differential Revision: https://phab.mercurial-scm.org/D10960
-
- Jul 03, 2021
-
-
Pierre-Yves David authored
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
-
Pierre-Yves David authored
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
-
Pierre-Yves David authored
Lets start to define and use more semantic property. Differential Revision: https://phab.mercurial-scm.org/D10957
-
Pierre-Yves David authored
Lets start to define and use more semantic property. Differential Revision: https://phab.mercurial-scm.org/D10956
-
Pierre-Yves David authored
Lets start to define and use more semantic property. Differential Revision: https://phab.mercurial-scm.org/D10955
-
- Jul 04, 2021
-
-
Pierre-Yves David authored
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
-
- Jul 03, 2021
-
-
Pierre-Yves David authored
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
-
Pierre-Yves David authored
This factor the "p2 is not null" check and is fairly simpler to read. Differential Revision: https://phab.mercurial-scm.org/D10952
-
Pierre-Yves David authored
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
-
Pierre-Yves David authored
We need to make sure we build an object. Differential Revision: https://phab.mercurial-scm.org/D10950
-
Pierre-Yves David authored
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
-
- Jul 02, 2021
-
-
Pierre-Yves David authored
The dirstate file is large enough and the dirstatemap is quite insulated logic already. Differential Revision: https://phab.mercurial-scm.org/D10934
-
Pierre-Yves David authored
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
-
- Jul 06, 2021
-
-
Pierre-Yves David authored
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
-
- Jul 02, 2021
-
-
Pierre-Yves David authored
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
-
Pierre-Yves David authored
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
-
Pierre-Yves David authored
This is a gratuitous readability change. Differential Revision: https://phab.mercurial-scm.org/D10940
-
Pierre-Yves David authored
This is shorter and clearer. Differential Revision: https://phab.mercurial-scm.org/D10939
-
Pierre-Yves David authored
This is shorter and clearer. Differential Revision: https://phab.mercurial-scm.org/D10938
-
Pierre-Yves David authored
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
-
- Jul 03, 2021
-
-
Anton Shestakov authored
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
-
- Jul 01, 2021
-
-
Simon Sapin authored
Differential Revision: https://phab.mercurial-scm.org/D10919
-
- Jul 02, 2021
-
-
Pierre-Yves David authored
We are about to modify this, so let us document the existing code. Differential Revision: https://phab.mercurial-scm.org/D10935
-
Pierre-Yves David authored
This special case is now directly handled, this clarify the possible value for the other options. Differential Revision: https://phab.mercurial-scm.org/D10933
-
Pierre-Yves David authored
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
-
Pierre-Yves David authored
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
-
Pierre-Yves David authored
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
-
- Jul 01, 2021
-
-
Pierre-Yves David authored
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
-
Pierre-Yves David authored
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
-
Pierre-Yves David authored
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
-
Pierre-Yves David authored
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
-
Pierre-Yves David authored
This is shorter and simpler to read. Differential Revision: https://phab.mercurial-scm.org/D10925
-
Pierre-Yves David authored
This is simpler to read. Differential Revision: https://phab.mercurial-scm.org/D10924
-
Pierre-Yves David authored
This is shorter and simpler to read. Differential Revision: https://phab.mercurial-scm.org/D10923
-
- Jun 28, 2021
-
-
Simon Sapin authored
… 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
-
Simon Sapin authored
… 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 3b9914b28133. Differential Revision: https://phab.mercurial-scm.org/D10921
-
Simon Sapin authored
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
-