D11558: dirstate-v2: Store a bitfield on disk instead of v1-like state

2021-10-01 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/D11558 AFFECTED FILES rust/hg-core/src/dirstate/entry.rs

D11556: dirstate: push back the future a bit in the test

2021-10-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The future was set to 2021-01-01, we push it by 10 years. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11556

D11555: dirstate-item: point out that `merged` is set only with p1_tracked

2021-10-01 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 currently True, and we will use this fact to simplify the API in the next commit. However, we add this assertion first to validate that this is True

D11554: dirstate-item: update the attribute documentation

2021-10-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It was very outdated. We are about to change these attribute so we should has well have them documented so that the change get easier to grasp. REPOSITORY

D11553: dirstate-item: use `any_tracked` more

2021-10-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This simplify more code. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11553 AFFECTED FILES

D11551: dirstate: remove a update_file's special case for `merged` file

2021-10-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This case was fishy and can be dealt with by passing more accurate data a higher level. This clarify the API and prepare for a larger rework of the data

D11552: dirstate-item: drop an outdated comments

2021-10-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This comment is no longer relevant since we moved away from the `state` internal representation, multiple weeks ago. REPOSITORY rHG Mercurial BRANCH

D11550: dirstate: remove a update_file's special case for tracked file with p2 data

2021-10-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This case was fishy and can be dealt with by passing more accurate data a higher level. This clarify the API and prepare for a larger rework of the data

D11547: dirstate-v2: minor cleanup to the rust implementation

2021-10-01 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 introduce a python version of this code, so we make sure the Rust code is clear and clean. REPOSITORY rHG Mercurial BRANCH default

D11543: dirstate-item: use item's property instead of `state` in largefile

2021-10-01 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/D11543 AFFECTED FILES hgext/largefiles/lfcommands.py hgext/largefiles/lfutil.py

D11541: dirstate-item: use item's property instead of `state` in revert

2021-10-01 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/D11541 AFFECTED FILES mercurial/cmdutil.py CHANGE DETAILS diff --git

D11542: dirstate-item: use `added` instead of `state` when moving dirstate

2021-10-01 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/D11542 AFFECTED FILES mercurial/scmutil.py CHANGE DETAILS diff --git

D11544: dirstate: deprecate `__getitem__` access

2021-10-01 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 drop `state` usage, we need to deprecate this. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11538: dirstate-item: use `added` in debugrebuilddirstate

2021-10-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY (instead of `state`) REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11538 AFFECTED FILES

D11540: dirstate-item: use item's property when computing a copies

2021-10-01 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/D11540 AFFECTED FILES mercurial/scmutil.py CHANGE DETAILS diff --git

D11539: dirstate-item: use item's property instead of `state` in copy

2021-10-01 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/D11539 AFFECTED FILES mercurial/cmdutil.py CHANGE DETAILS diff --git

D11537: dirstate-item: use `maybe_clean` instead of `state` in record

2021-10-01 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/D11537 AFFECTED FILES mercurial/cmdutil.py CHANGE DETAILS diff --git

D11536: dirstate-item: use `any_tracked` instead of `state` to apply patches

2021-10-01 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/D11536 AFFECTED FILES mercurial/patch.py CHANGE DETAILS diff --git

D11535: dirstate-item: use item's property instead of `state` in addremove

2021-10-01 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/D11535 AFFECTED FILES mercurial/scmutil.py CHANGE DETAILS diff --git

D11532: dirstate-item: use `tracked` instead of `state` in context.matches

2021-10-01 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/D11532 AFFECTED FILES mercurial/context.py CHANGE DETAILS diff --git

D11531: dirstate-item: use `tracked` instead of the `state` in context's iter

2021-10-01 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/D11531 AFFECTED FILES mercurial/context.py CHANGE DETAILS diff --git

D11534: dirstate-item: use `tracked` instead of `state` during copy detection

2021-10-01 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/D11534 AFFECTED FILES mercurial/copies.py CHANGE DETAILS diff --git

D11533: dirstate-item: use `maybe_clean` instead of `state` in `strip`

2021-10-01 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/D11533 AFFECTED FILES mercurial/strip.py CHANGE DETAILS diff --git

D11529: dirstate-item: use item's property to deal with hgsubstate in mq

2021-10-01 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 processing the `state`. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11529 AFFECTED

D11526: dirstate: move verification code within the dirstate itself

2021-10-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This move implementation details further down the stack and make it the verification code easier to discover. REPOSITORY rHG Mercurial BRANCH default

D11528: dirstate-item: use `added` instead of the `state` in the `mq` extension

2021-10-01 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/D11528 AFFECTED FILES hgext/mq.py CHANGE DETAILS diff --git a/hgext/mq.py

D11530: dirstate-item: use `tracked` instead of the `state` in context

2021-10-01 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/D11530 AFFECTED FILES mercurial/context.py CHANGE DETAILS diff --git

D11524: dirstate-item: introduce a `any_tracked` property

2021-10-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This property is True is the file is tracked anywhere, either the working copy, or any of the parent. REPOSITORY rHG Mercurial BRANCH default REVISION

D11523: dirstate-item: introduce a `maybe_clean` property

2021-10-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It is useful for some extension that seek to invalidate some state. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11527: dirstate-item: use maybe_clean instead of `state` in the eol extension

2021-10-01 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/D11527 AFFECTED FILES hgext/eol.py CHANGE DETAILS diff --git a/hgext/eol.py

D11525: dirstate-entry: use `?` for the state of entry without any tracking

2021-10-01 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 what the dirstate use at a higher level. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11525 AFFECTED

D11522: dirstate: add a `get_entry` method to the dirstate

2021-10-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This method give access to the underlying `DirstateEntry` object (or an empty one if None was there). It should allow us to use the more semantic property of

D11521: dirstate-item: Make constructor parameters optional

2021-10-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY … in the C implementation of DirstateItem, like they already were in the Python and Rust ones. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11515: dirstate: drop the from_p2_removed method

2021-09-29 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It it no longer in use. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11515 AFFECTED FILES

D11513: dirstate: drop the merged_removed method

2021-09-29 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It it no longer in use. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11513 AFFECTED FILES

D11514: dirstate: inline the `from_p2_removed` logic

2021-09-29 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It is used internally for compatibilty with size used in the `v1` format, but this is the only use. So we can simply inline it. REPOSITORY rHG Mercurial

D11512: dirstate: inline the merged_removed logic

2021-09-29 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It is used internally for compatibilty with size used in the `v1` format, but this is the only use. So we can simply inline it. REPOSITORY rHG Mercurial

D11511: dirstate: drop some safety assert in largefile

2021-09-29 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The code involved in `set_possibly_dirty` is now simpler and safe to use even in the cases that the assert covered. So we can drop this assert. It was the

D11510: dirstate: drop unused condition in `from_p2`

2021-09-29 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This conditional was added (by me) tentatively because "it seemed more correct", but it is not used anywhere yet, and it is missing from the C and the Rust

D11482: changelog: also monitor `00changelog.n` when applicable (issue6554)

2021-09-21 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This let the locarepo's file cache detect outdated nodemap docket and reload the changelog after `localrepo.invalidate` when applicable. REPOSITORY rHG

D11483: manifestlog: also monitor `00manifestlog.n` when applicable

2021-09-21 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This let the locarepo's file cache detect outdated nodemap docket and reload the manifestlog after `localrepo.invalidate` when applicable. The same

D11481: persistent-nodemap: introduce a test to highlight possible race

2021-09-21 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Weakness in the current file caching of the changelog means that a writer can end up using an outdated docket. This might result in "committed"

D11479: filecache: abstract the fetching of the list of tracked file

2021-09-21 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We will need it for a coming fix that will requires to check a variable list of file for the changelog. REPOSITORY rHG Mercurial BRANCH stable REVISION

D11480: test: enable share-safe in test-persistent-nodemap

2021-09-21 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We will use some share in this test and I would rather have them safe. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL

D11478: persistent-nodemap: use quiet upgrade in tests

2021-09-21 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 them less verbose while keeping the important information in the checked output. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL

D11477: persistent-nodemap: fix a typo in a test comment

2021-09-21 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY oops. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D11477 AFFECTED FILES tests/test-persistent-nodemap.t

D11450: check-code: make it possible to ignore the PWD check in some situation

2021-09-17 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The check-code script does not motivate the banning of $PWD so I am not sure what it is about. And I will needs to use the env variable in the next tests. So

D11449: tests: make removeemptydirs more portable

2021-09-17 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The behavior of pwd change from one system (i.e. default shell/sh) from one system to another so we use fuzzy matching for the output we do not care and we

D7177: rebase: introduce optional parent mapping

2021-09-17 Thread marmoute (Pierre-Yves David)
marmoute added a comment. In D7177#175507 , @joerg.sonnenberger wrote: > From the VC call today: The use case can be addressed by marking parents as to-be-preserved, so that for merge commits rebase can decide on the parent link is should

D11443: dirstate: drop the `dirstatemap.dropfile` method

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY All use have been migrated. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11443 AFFECTED FILES

D11442: dirstate: use `reset_state` instead of `dropfile` in test-rebuildstate.t

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY As `dirstatemap.dropfile` is on its way out. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11442 AFFECTED

D11441: dirstate: use `reset_state` instead of `dropfile` in largefile

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY As `dirstatemap.dropfile` is on its way out. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11441 AFFECTED

D11440: dirstate: use `reset_state` in `rebuild` instead of `dropfile`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY As `dirstatemap.dropfile` is on its way out. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11440 AFFECTED

D11439: dirstate: use `reset_state` to drop file in `update_file_p1`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The `dropfile` function is on its way out. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11439 AFFECTED FILES

D11438: dirstate: support file tracked nowhere in `reset_state`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This let the dirstatemap decide when to drop files. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11438

D11437: dirstate: drop dirstatemap.addfile

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY All users have been migrated. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11437 AFFECTED FILES

D11436: dirstate: update the documentation of the dirstatemap API

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The API changed so should the documentation. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11436 AFFECTED

D11435: dirstate: drop the `_addpath` method

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY All user have been migrated. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11435 AFFECTED FILES

D11434: dirstate: remove the `normallookup` function

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY All use have been migrated. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11434 AFFECTED FILES

D11433: dirstatE: stop using `_normallookup` in the adddrop extension

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY That extensions is just trying to produce "corrupted" dirstate. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11432: dirstate: replace the use of `_normallookup` in `rebuild`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Normal lookup is a complicated function that we want to get rid of. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11430: dirstate: introduce a set_tracked method on "map" and "item"

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This move more implementation details withing the DirstateItem itself, which is what we have been doing for a while. REPOSITORY rHG Mercurial BRANCH

D11431: dirstate: replace the use of _normallookup in `setparents`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY normal lookup is a complicated function that we want to get rid of. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11429: dirstate: fix restoration of "merged" state after a remove

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Before this change, "merged" file that get removed and re-added later were recorded as "from_p2" instead. This came from 8fe74328f700

D11428: dirstate: inline the last two `_drop` usage

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The function is small and having the associated code directly inline help use to cleanup the dirstate API. REPOSITORY rHG Mercurial BRANCH default

D11427: dirstate: make a conditionnal easier to read in `setparents`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY By grabing `nullid` in the local space, we get the conditionnal to fit in one line. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11426: dirstate: removed the now unused `_add` method

2021-09-16 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/D11426 AFFECTED FILES mercurial/dirstate.py CHANGE DETAILS diff --git

D11425: dirstate: replace `_add` call in `setparent`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Same logic as the previous changeset, it get us closer to removed older API on the dirstate. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11424: dirstate: directly call the right function in `set_tracked`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This get use closer to removing some older API on the dirstate. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11423: dirstate: same logic as what we did for `_drop`

2021-09-16 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 part of the dirstatemap so let le dirstatemap deal with it. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11422: dirstate: use `tracked` property in `_addpath`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It is semantically better. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11422 AFFECTED FILES

D11419: dirstate: make dirstatemap.set_untracked deal with added file

2021-09-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This merge dropfile in set_untracked. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11419 AFFECTED FILES

D11421: dirstate: introduce a `set_clean` method on dirstate's map and items

2021-09-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This method is the "reverse" of "set possibly dirty", and can be used to more accurately other call that the dirstate was making. It is currently heavily

D11420: dirstate: extract the logic to check file/dirname collision when adding a file

2021-09-15 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/D11420 AFFECTED FILES mercurial/dirstate.py CHANGE DETAILS diff --git

D11417: dirstate: move the copymap drop inside dropfile

2021-09-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Since the copymap is part of the dirstatemap it make more sense for the dirstatemap to manage it directly. This is part of a generic effort to move

D11418: dirstate: remove some usage of `_drop`

2021-09-15 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 step toward being able to remove the `_drop` method on `dirstate`. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11386: dirstate-item: introduce low level C function

2021-09-08 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Since a lot of logic is about to change, we need to isolate it into bits that are easy reusable in the rest of the C code. Especially we need to split the

D11387: dirstate-item: move the C implementation to the same logic

2021-09-08 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Now that we know were we are going, we can update the C implementation. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11383: pathutil: replace the `skip` argument of `dirs` with a boolean

2021-09-08 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It is ever only used for `r` file. So we make it a boolean this will give use more versatility later as we will stop storing the state explicitly. REPOSITORY

D11385: dirstate-item: factor some code in the C implementation

2021-09-08 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We have both `dirstate_item_from_v1_meth`, a class method, and `dirstate_item_from_v1_data`, a function taking low level C argument. Lets implement the

D11382: dirstate: clarify the message in nonnormal checking

2021-09-08 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The previous message was quite verbose and hard to understand. The new one should be friendlier. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11384: dirstate-item: `dirstate_item_from_v1_data` replaces make_dirstate_item

2021-09-08 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY For different format, we will need multiple capsule anyways. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11375: dirstate-item: implement `v1_mtime` with higher level block

2021-08-27 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 much easier to read and maintain. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11375 AFFECTED FILES

D11374: dirstate-item: implement `v1_size` with higher level block

2021-08-27 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 much easier to read and maintain. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11374 AFFECTED FILES

D11373: dirstate-item: implement v1_state with higher level block

2021-08-27 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 much easier to read and maintain. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11373 AFFECTED FILES

D11372: dirstate-item: add more logic to `from_p2`

2021-08-27 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This seem semantically better even if this tracking case seems to always comes with clean_p2 for now. REPOSITORY rHG Mercurial BRANCH default REVISION

D11371: dirstate-item: implement `merged_removed` in a simpler way

2021-08-27 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We can simply use the underlying attribute. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11371 AFFECTED

D11370: dirstate-item: implement `removed` in a simpler way

2021-08-27 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We can simply use the underlying attribute. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11370 AFFECTED

D11369: dirstate-item: implement `from_p2_removed` in a simpler way

2021-08-27 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We can simply use the underlying attribute. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11369 AFFECTED

D11368: dirstate-item: implement `from_p2` in a simpler way

2021-08-27 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We can simply use the underlying attribute. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11368 AFFECTED

D11367: dirstate-item: implement `merged` in a simpler way

2021-08-27 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We can simply use the underlying attribute. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11367 AFFECTED

D11366: dirstate-item: implement `added` in a simpler way

2021-08-27 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We can simply use the underlying attribute. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11366 AFFECTED

D11365: dirstate-item: implement `tracked` in a simpler way

2021-08-27 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We can simply use the underlying attribute. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11365 AFFECTED

D11364: dirstate-item: keep the full information in memory (for pure form)

2021-08-27 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This changeset is finally reaching the area where we have been headed this whole time. Since all implementation details are contained inside de DirstateItem

D11363: dirstate-item: have all the logic go through the v1_ accessors

2021-08-27 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 change the internal attribute. Having all the logic using the old "legacy" accessors will help to have a smooth transition. REPOSITORY rHG

D11362: dirstate-item: drop the deprecated __getitem__ variante

2021-08-27 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 deprecated since 5.9. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11362 AFFECTED FILES

D11353: dirstate: drop the `_otherparent` method

2021-08-26 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It only has one caller with a lot of the logic already implemented. So lets inline it and cleans things up further. REPOSITORY rHG Mercurial BRANCH

D11352: dirstate: drop the `_normal` method

2021-08-26 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It only has one caller so lets inline it and cleans things up further. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11351: dirstate: drop the `_merge` method

2021-08-26 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It only has one caller that only use one of the branch, so lets inline that branch and clean things up further. REPOSITORY rHG Mercurial BRANCH default

D11350: dirstate: drop the deprecated `drop` method

2021-08-26 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY eh ;-) REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11350 AFFECTED FILES contrib/dirstatenonnormalcheck.py

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