D10947: test: use a python script in `test-transaction-rollback-on-sigpipe.t`

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This still does not work on Windows, but at least this is a python script now. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10946: test: make sure we hit the SIGPIPE in test-transaction-rollback-on-sigpipe

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY With a coming change, we might not hit the sig pipe without issue and extra line of output. We do this early to make the next change clearer. REPOSITORY

D10945: test: clarify some output in `test-transaction-rollback-on-sigpipe`

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We don't want a dirty transaction to remain, but need to check the transaction was aborted. Otherwise it is easy to have no abandoned transaction if the

D10943: run-tests: stop writing a `python3` symlink pointing to python2

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY 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

D10942: run-tests: avoid an early return

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY 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

D10944: check-shbang: accept -S with env

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is useful to use `python3 -u` in a coming patch. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10944

D10941: run-tests: clarify pyexename assignement

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY That assignement is wrong, we clarify that it is wrong before starting to fix it. This will make the fix clearer. REPOSITORY rHG Mercurial BRANCH default

D10940: run-tests: factor appdata out

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is a gratuitous readability change. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10940 AFFECTED FILES

D10939: run-tests: unroll a non-so-one-liner

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and clearer. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10939 AFFECTED FILES

D10938: run-tests: unroll a non-so-one-liner

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and clearer. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10938 AFFECTED FILES

D10937: testing: fix _timeout_factor

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY With `--debug`, `run-tests.py` set the timeout to 0... that breaks the logic in `mercurial.testing`. REPOSITORY rHG Mercurial BRANCH default REVISION

D10936: cmdutil: fix newandmodified file accounting for --interactive commits

2021-07-02 Thread dploch (Daniel Ploch)
dploch created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY `originalchunks` is a misleading name, because it only contains header objects, which are flattened to selected hunks by the filter function. As such, `chunks

[Bug 6533] New: hg commit --interactive doesn't handle deslecting all edits of a rename

2021-07-02 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=6533 Bug ID: 6533 Summary: hg commit --interactive doesn't handle deslecting all edits of a rename Product: Mercurial Version: default branch Hardware: All OS:

D10934: dirstate: split dirstatemap in its own file

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The dirstate file is large enough and the dirstatemap is quite insulated logic already. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10933: dirstate: explicitely deal with the `added` case in `_addpath`

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This special case is now directly handled, this clarify the possible value for the other options. REPOSITORY rHG Mercurial BRANCH default REVISION

D10932: dirstate: add an explicit `possibly_dirty` parameter to `_addpath`

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This lets says what we mean instead of using magic value. The lower level can then decide how to express that. REPOSITORY rHG Mercurial BRANCH default

D10935: dirstate: document the dirstatetuple content

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We are about to modify this, so let us document the existing code. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10930: dirstate: add default value to _addpath

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We want to remove the magic value usage from the higher level, so lets stop passing them explicitely when possible. REPOSITORY rHG Mercurial BRANCH

D10931: dirstate: add an explicit `from_p2` parameter to `_addpath`

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This lets says what we mean instead of using magic value. The lower level can then decide how to express that. REPOSITORY rHG Mercurial BRANCH default

D10929: dirstate: move the _rangemask filtering closer to its storage

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY 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

D10928: dirstate: introduce a symbolic constant for the AMBIGUOUS_TIME marker

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY 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

D10927: dirstate: introduce a symbolic constant for the NONNORMAL marker

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY 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

D10926: dirstate: introduce a symbolic constant for the FROM_P2 marker

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY 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

D10925: dirstate: split a not-so-one-liner

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and simpler to read. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10925 AFFECTED FILES

D10924: dirstate: split a not-so-one-liner

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is simpler to read. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10924 AFFECTED FILES

D10923: dirstate: split a not-so-one-liner

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and simpler to read. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10923 AFFECTED FILES

D10921: dirstate: Removed unused instances of `DirsMultiset`

2021-07-02 Thread SimonSapin
SimonSapin created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY … in Rust-backed dirstatemap. The Python class `dirstatemap` had cached properties `_dirs` and `_alldirs` that were not used for `hastrackeddir` and

D10922: dirstate-tree: Keep a counter of descendant nodes that have an entry

2021-07-02 Thread SimonSapin
SimonSapin created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY … 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

D10920: dirstate-v2: Use 32-bit integers instead of 64-bit for offsets

2021-07-02 Thread SimonSapin
SimonSapin created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY 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