D11080: run-test: act that we requires MSYS to run the test on Windows

2021-07-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If this ever change we can drop that constrains, however for now it seems clear to be clear about this limitation. REPOSITORY rHG Mercurial BRANCH

D11083: dummyssh: call python script with python

2021-07-11 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 windows to grab whatever python got configured to run .py file. We need the python used during the test to be used. REPOSITORY rHG Mercurial

D11082: dummyssh: use subprocess instead of os.call

2021-07-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Welcome in 2020 REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11082 AFFECTED FILES tests/dummyssh CHANGE

D11079: sigpipe-remote: display more information about the non-py3 python

2021-07-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If we are running the wrong things, it is useful to know which wrong thing we are running. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11078: sigpipe-remote: check for python version earlier in the script

2021-07-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The should abort early, using the wrong python is a pretty bad sign. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11077: mergestate: use dirstate.update_file API in recordupdates()

2021-07-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Let's use the new single function to replace multiple different functions. This is part of dirstate API refactor to make it more clearer and generic so that

D11076: dirstate: add dedicated function for updating data of a file

2021-07-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY `dirstate.normal()` is too generic to be a user facing function for that. This is a part of effort to refactor dirstate APIs and make them clearer. REPOSITORY

D11075: dirstate: add a `update_file` function

2021-07-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This function is the other side of the `set_tracked`/`set_untracked` API revamp. It is to be used when the dirstate is changing its parents during and update

D11074: resolve: use the `parentchange` context manager to apply merge action

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY In an ideal world, we would not have to do that. However, we are miles away from being ready to not have to do it. So we add this context manager

D11073: windows: make sure we fully read and cleany close the connection

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Maybe this will prevent server on Windows to sometimes complains about the client closing the connection too soon. So we make sure we read everything and we

D11071: windows: use abspath in convert.subversion

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. REPOSITORY rHG Mercurial BRANCH

D11072: check-code: add a rules to catch os.path.abspath

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY All previous usages have been migrated. So let us add a check-code rules to catch future usages. We restrict it to mercurial/ and hgext/ because multiple

D11065: windows: use abspath in subrepo

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. REPOSITORY rHG Mercurial BRANCH

D11070: windows: use abspath in convert.git

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. REPOSITORY rHG Mercurial BRANCH

D11069: windows: use abspath in convert.bzr

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. REPOSITORY rHG Mercurial BRANCH

D11068: windows: use abspath in the git extension

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows.

D11067: windows: use abspath in url

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. REPOSITORY rHG Mercurial BRANCH

D11059: windows: introduce a `util.abspath` to replace os.path.abspath

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This will let us mitigate the drive letter capitalization hell. See inline comment for details. REPOSITORY rHG Mercurial BRANCH default REVISION

D11066: windows: use abspath in subrepoutil

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. REPOSITORY rHG Mercurial BRANCH

D11063: windows: use abspath in mercurial/hg.py

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. REPOSITORY rHG Mercurial BRANCH

D11064: windows: use abspath in hgwebdir

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. REPOSITORY rHG Mercurial BRANCH

D11062: windows: use abspath in extensions

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. REPOSITORY rHG Mercurial BRANCH

D11061: windows: use abspath in commandserver

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. REPOSITORY rHG Mercurial BRANCH

D11060: windows: use abspath in chgserver

2021-07-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. REPOSITORY rHG Mercurial BRANCH

D11058: windows: enforce upper case drive letter for getcwd in mercurial too

2021-07-10 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 affecting code that checks if a pull/push destination is the same as a configured one. For example the one creating divergent bookmark. Doing this

D11057: compat: enforce upper case drive letter in mercurial too

2021-07-09 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 affecting code that checks if a pull/push destination is the same as a configured one. For example the bookmark divergence creation code. Doing

D11056: test-bookmark: clarify the path involved in a pull creating divergence

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This make the test easier to follow. Especially because this part is currently failing on windows. REPOSITORY rHG Mercurial BRANCH default REVISION

D11053: run-tests: rely on an actual file in PATH instead of alias for `hg`

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The alias approach is poorly inherited by other process spawned during the test. So use the same approach as for `python`/`python3` we write a file

D11051: run-tests: use more explicit signaling for `chg`

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Using a dedicated variable is clearer and less fragile. It cannot hurt. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11055: test-removeemptydirs: adjust to Windows behavior for the `histedit` case

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Windows stay in the "same" directory and the message is not applicable. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11054: test-removeemptydirs: clarify the state of things in the `histedit` case

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This make the test easier to follow and will help to compare with the behavior on windows. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11052: tests: blacklist a handful of test with `rhg` or `chg`

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The use of `alias` to enforce `chg` and `rhg` means we are actually using a mix of `rhg`/`chg` and `hg` when calling `hg` in the test. Fixing this breaks

D11049: run-tests: introduce a `HGTEST_REAL_HG` variable for test

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It turns out that currently, `hg` and `which hg` can point to different things because `hg` is an alias… This is annoying because script and piece of test are

D11050: run-tests: drop the `rhg` flag for `hghave.py` if unset

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This seems cleaner. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11050 AFFECTED FILES tests/run-tests.py

D11046: run-test: clarify the error with a bad --with-hg is passed

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11046 AFFECTED FILES tests/run-tests.py tests/test-run-tests.t CHANGE DETAILS

D11047: run-tests: setup "correct" python earlier

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I don't see any good reason to wait and this makes the setup simpler. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11045: run-tests: cleanup windows generation of the python / python3 pointeur

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY They are no need to generate then in RUNTESTDIR and we don't need a python2 executable. (because not test ever use `python2` explicitly) REPOSITORY rHG

D11048: test-infinitepush: drop unused helper

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY They are unused since de4c2f3af97f . We drop them for clarity REPOSITORY rHG

D11044: run-tests: always define a custom-bin directory

2021-07-09 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 always generating `python` / `python3` executable and we will often generate a `hg` executable (soon). So let's make it here always. REPOSITORY rHG

D11043: run-tests: explicitly track that pythondir was inferred

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If we want to track that something happened, we should simply tracked that this things happened. This will be useful to start using tmpbindir more.

D11041: run-tests: use a global WINDOWS constant instead of multiplicate tests

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This should make the code clearer. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11041 AFFECTED FILES

D11042: hg-ssh: normalize the drive of the current working directory on windows

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY For some reason os.getcwd() can return either `c:` or `C:`. We normalize this to `C:` and the like. This fix `test-ssh-bundle1.t` on windows. REPOSITORY

D11035: run-test: adjust the drive letter to upper case for TESTDIR

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY There is an inconsistency between running: A) run-tests.py tests/test-foo.t B) run-tests.py In the (A) case TESTDIR starts with `c:` while in the (B)

D11034: test-run-test: use explicit variable to clarify path

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Since TESTTMP and TESTDIR are defined for both the main scope and the test run during the test, the situation get confusing. To work around that, we define

D11032: amend: adjust the dirstate withing a `parentchange` context

2021-07-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The adjustment in the direct consequence of the amend and the associated parent change. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11033: sparse: adjust the temporary includes within a `parentchange` context

2021-07-09 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 related to dirstate adjustment. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11033 AFFECTED FILES

D11031: dirstate: add the right internal API in a test script

2021-07-09 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 of the script it to perform arbitrary internal operation so lets make it clean. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11026: revert: use `set_untracked` instead of `drop` when applicable

2021-07-08 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11026 AFFECTED FILES mercurial/cmdutil.py CHANGE DETAILS diff --git

D11028: parse: make sure we adjust the dirstate while adjust the dirstate to parent

2021-07-08 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 more correct and help our API split. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11028 AFFECTED

D11029: sparse: clear rules in the context of a `parentchanges` context

2021-07-08 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 the same logic as the change we did for narrow. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11029

D11027: narrow: update narrow spec within a dirstate.parentchange context

2021-07-08 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: durin42. Herald added a reviewer: martinvonz. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Even if the parents does not changes, the parents' content we consider is changed. So

D11023: dirstate: introduce and internal `_drop` method

2021-07-08 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY dropping a file from the dirstate is decision that the dirstate itself should be able to move. So we will slowly migrate caller to more appropriate API. In

D11021: mq: use `set_untracked` in `qrename`

2021-07-08 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 the new shinny API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11021 AFFECTED FILES hgext/mq.py

D11022: revert: use `set_untracked` when performing a revert

2021-07-08 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 the new shinny API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11022 AFFECTED FILES

D11020: context: use `dirstate.set_untracked` in context.forget

2021-07-08 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 the new shinny API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11020 AFFECTED FILES

D11018: mq: use `set_tracked` in `qrename`

2021-07-08 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 the new shinny API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11018 AFFECTED FILES hgext/mq.py

D11017: mq: update the dirstate and its parent within a `parentchange` context

2021-07-08 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 more correct, and move our plan of separated API for different dirstate usage forward. note: maybe the `parentchange` context manager should

D11019: dirstate: add a set_untracked method for "hg remove"-like usage

2021-07-08 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: durin42. Herald added a reviewer: martinvonz. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is a step further toward clarifying the semantic of various dirstate call.

D11016: context: use `dirstate.set_tracked` for `revert`

2021-07-08 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 the new shinny API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11016 AFFECTED FILES

D11015: context: use `dirstate.set_tracked` in context.copy

2021-07-08 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 the new shinny API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11015 AFFECTED FILES

D11014: context: use `dirstate.set_tracked` in context.add

2021-07-08 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 the new shinny API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11014 AFFECTED FILES

D11013: dirstate: add a set_tracked method for "hg add"-like usage

2021-07-08 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: durin42. Herald added a reviewer: martinvonz. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is a step further toward clarifying the semantic of various dirstate call.

D11012: dirstate: add a function to update tracking status while "moving" parent

2021-07-07 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The `scmutil.dirstateparent` is moving the dirstate parent without touching the working copy. It isi used by history rewriting operation like amending of

D11011: dirstate: introduce and internal `_remove` method

2021-07-07 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 reserver `dirstate.remove` to `hg remove`-like case and move to a clear API for update of the dirstate coming from update/merge. The first step is

D11010: dirstate: introduce and internal `_add` method

2021-07-07 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 reserver `dirstate.add` to `hg add`-like case and move to a clear API for update of the dirstate coming from update/merge. The first step is to

D10997: dirstate: remove seemingly unused `_filecache` attribute

2021-07-06 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I am not able to find any code which tries to populate this dictionary. REPOSITORY rHG Mercurial BRANCH default REVISION

D10996: corruption: add a test for issue6528

2021-07-06 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The initial reproduction script was provided by Charles Chamberlain from Jane Street. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL

D10995: corruption: backout changeset 49fd21f32695 (issue6528)

2021-07-06 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY inverting the parent is masking copy information leading to bad content being fetched and bad status result. Since

D10994: check-code: stop forbidding return code result

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

D10989: dirstate-item: use the `state` property in debugpathcomplete

2021-07-05 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Ideally we would use narrower property, but this is a good start. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10988: dirstate-item: use the v1_serialization method in debugstate

2021-07-05 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I am assuming the debug command are looking into the serialized format so I am using the `v1_` variants. This assumption might be wrong. REPOSITORY rHG

D10993: dirstatenonnormalcheck: fix some bytes formating on python3

2021-07-05 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Passing any object to `%s` no longer works, we need to explicitely convert the representation to bytes. REPOSITORY rHG Mercurial BRANCH default REVISION

D10992: dirstate-item: deprecate tuple access on the class

2021-07-05 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This should help us to catch and update the last user of this, especially in extensions. People will need to run the test with --pure to actually catch

D10990: dirstate-item: use the properties in largefiles

2021-07-05 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I am now sure what large file is doing with then, but at least it is no longer using the tuple API to access data. REPOSITORY rHG Mercurial BRANCH

D10991: dirstate-item: use the properties in `contrib/dirstatenonnormalcheck.py`

2021-07-05 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10991 AFFECTED FILES contrib/dirstatenonnormalcheck.py CHANGE DETAILS diff

D10987: dirstate-item: use the properties in fakedirstatewritetime

2021-07-05 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10987 AFFECTED FILES tests/fakedirstatewritetime.py CHANGE DETAILS diff --git

D10986: dirstate-item: use the properties in dirstatemap

2021-07-05 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10986 AFFECTED FILES mercurial/dirstatemap.py CHANGE DETAILS diff --git

D10983: dirstate-item: also build DistateItem in dirstate.directories()

2021-07-05 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The rust code was building tuple. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10983 AFFECTED FILES

D10985: dirstate-item: use the properties in pathutil

2021-07-05 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10985 AFFECTED FILES mercurial/pathutil.py CHANGE DETAILS diff --git

D10984: dirstate-item: use need_delay when packing dirstate

2021-07-05 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10984 AFFECTED FILES mercurial/pure/parsers.py CHANGE DETAILS diff --git

D10982: dirstate-item: rename the class to DirstateItem

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The object is no longer a tuple, so it seems clearer to rename it (and its associated method) REPOSITORY rHG Mercurial

D10978: dirstate: no longer pass `oldstate` to the `dropfile`

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The `oldstate` value come literally from `_map` so we don't need to pass tha information along. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10981: dirstate-entry: add a `mtime` property

2021-07-04 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 clearer than "tuple" indexing. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10981 AFFECTED FILES

D10980: dirstate-entry: add a `size` property

2021-07-04 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 clearer than "tuple" indexing. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10980 AFFECTED FILES

D10977: dirstate: drop the last explicit `state` usage in the module

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The internal detail of the `state` bytes is not longer exposed to the dirstate layer. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10979: dirstate-entry: add a `mode` property

2021-07-04 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 clearer than "tuple" indexing. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10979 AFFECTED FILES

D10976: dirstate: drop last explicite `state` usage in status

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Given that the previous conditional we can safely use `tracked` here. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10974: dirstate-entry: add a `need_delay` method

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This abstract the internal processing need for entry that would have an ambiguous mtime (If I understand things correctly). REPOSITORY rHG Mercurial BRANCH

D10975: dirstate: reorder "state" checking conditional

2021-07-04 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 easier to read and will make this simpler to update in the next changeset. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10973: dirstate-entry: add a `tracked` property

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This abstract the individual `state` value and has a clear semantic. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10972: dirstate: drop `state` to `_addpath`

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY All its value are inferred within the dirstatemap now. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10972

D10969: dirstate: use a `merged` parameter to _addpath

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10969 AFFECTED FILES mercurial/dirstate.py mercurial/dirstatemap.py

D10971: dirstate: infer the 'n' state from `from_p2`

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This flag is only used with 'n' so lets set the state based on that parameter in this case. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10970: dirstate: infer the 'n' state from `possibly_dirty`

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This flag is only used with 'n' so lets set the state based on that parameter in this case. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10967: dirstate: use a `added` parameter to _addpath

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY My next target are the explicit `state` byte, so let start with abstracting their initial storage. REPOSITORY rHG Mercurial BRANCH default REVISION

D10966: dirstate: no longer pass the `oldstate` value to the dirstatemap

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The dirstatemap already have this information. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10966 AFFECTED

D10963: dirstate: move the handling of special case within the dirstatemap

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The dirstatemap is as well, if not better, suited to decided how to encode the various case. So we move the associated code in the dirstatemap `addfile`

D10968: dirstate-entry: add a `added` property

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Lets use more semantic property instead of the `state` implementation details. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10965: dirstate: stop using `oldstate` in `dirstate._addpath`

2021-07-04 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 need to pass the oldstate around, so lets use the new property instead. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10964: dirstate: drop the now unused magic constants for the dirstate module

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We no longer need them for the dirstate logic. We only need them in the dirstate map (and parsers) logic. This smell like progress. REPOSITORY rHG

<    2   3   4   5   6   7   8   9   10   11   >