D11822: extension: add a `required` suboption to enforce the use of an extensions

2021-11-29 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If `required` is set, failing to load an extensions will abort. See the test and documentation for details. REPOSITORY rHG Mercurial BRANCH default

D11823: extensions: add a default "*" suboptions prefix

2021-11-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 is similar to what we do in other section (e.g. `paths`) and allow to change the behavior for all extensions. Sub options on individual extensions

D11819: extensions: ignore "sub-options" when looking for extensions

2021-11-29 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY config suboptions are separated by ":" (see the path one for example). So we dont want to confuse these config with actual extensions. We don't have

D11820: extensions: refactor handling of loading error make it reusable

2021-11-29 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 this in the next patch. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11820 AFFECTED FILES

D11796: dirstate: remove need_delay logic

2021-11-24 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 all¹ stored mtime are non ambiguous, we no longer need to apply the `need_delay` step. The need delay logic was not great are mtime gathered during

D11794: status: use filesystem time boundary to invalidate racy files

2021-11-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We take the filesystem time at the start of the status walk and use that as a boundary to detect files that have been modified in the same second as the

D11799: status: move the boundary comparison logic within the timestamp module

2021-11-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Some extensions will need it too., so lets isolate the logic. This make things clearer too. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11800: largefile: use the proper "mtime boundary" logic during fixup

2021-11-24 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 prevent ambiguous cache entry to be used in racy situation. This fix flakiness in test and some real live misbehavior. REPOSITORY rHG Mercurial

D11798: tests: remove potential mtime ambiguity in a dirstate test

2021-11-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If the test was fast enough, some mtime where not stored. We now wait long enough to ensure the mtime is no longer ambiguous. REPOSITORY rHG Mercurial

D11797: dirstate: cleanup remaining of "now" during write

2021-11-24 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 whole `need_delay` have been removed, we no longer need this. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11795: dirstate: remove `lastnormaltime` mechanism

2021-11-24 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 now redundant with the new, simpler `mtime_boundary` one. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11788: dirstate: do no use `set_clean` in revert

2021-11-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The current `set_clean` usage is racy (file might be modified between its restoration and the `set_clean` call. So we simply leave the file as ambiguous

D11791: dirstate: stop gathering parentfiledata in update_file

2021-11-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Gathering information here assume that they are valid cache information for a clean file. It is true most of the time, but not garanteed. Accurate data

D11792: win32text: drop associated dirstate cache information on revert

2021-11-24 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 Otherwise the could get size from one version of the file while the on-disk version is

D11793: test: use a different timestamp for the updated file

2021-11-24 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 test we want to trigger a write after the underlying dirstate changed. To do so, we need a write. And as we are about to make dirstate update smarter

D11789: dirstate: make it mandatory to provide parentfiledata in `set_clean`

2021-11-24 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 Gathering the mode, size and mtime, independently from determining that the file is clean is a race-machine. So we just make

D11790: dirstate: stop gathering parentfiledata in update_file_p1

2021-11-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Gathering information here assume that they are valid cache information for a clean file. It is true most of the time, but not garanteed. So we drop this

D11785: status: gather fixup info at comparison time

2021-11-24 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 still racy, but the API make it possible for it to not be racy. This also unlock other cleanups that we are about to do. REPOSITORY rHG Mercurial

D11787: status: adapt largefile to gather stats at lookup time

2021-11-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY See main core time for details. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11787 AFFECTED FILES

D11782: dirstate-item: allow mtime to be None in "parentdata"

2021-11-24 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/D11782 AFFECTED FILES mercurial/cext/parsers.c mercurial/dirstate.py

D11784: update: filter the ambiguous mtime in update directly

2021-11-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Right now, this filtering is done at `dirstate.write` time. However that filtering is done too late for most of the case, we are about to change that code to

D11786: status: adapt largefile to gather stats at lookup time

2021-11-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY See main core time for details. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11786 AFFECTED FILES

D11783: dirstate: move "get fs now" in the timestamp utility module

2021-11-24 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 during update. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11783 AFFECTED FILES

D11781: dirstate: add a comment about a racy piece of code during updates

2021-11-24 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 bits that is not really correct but works "fine" in practice. Lets write it down so that people stop wondering how that logic might be correct. It

D11780: tests: add missing `head` for when things go wrong

2021-11-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY See comment above the changed line REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11780 AFFECTED FILES

D11779: tests: ensure a status will have non ambiguous mtime in some race test

2021-11-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY For the test to work, we need some mtime to be recorded. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11779

D11778: tests: make sure no ambiguity remains after the commit

2021-11-24 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 help stabilize part of the test that are not relevant for the tests. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11777: dirstate: clarify a `hg update` invocation in a test

2021-11-24 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 common for reader of that test to confuse this `hg co` call with a `hg commit`, while this is actually `hg checkout`, an alias for the more common `hg

D11730: pull: make the new argument a keyword argument

2021-10-29 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY As per feedback from Dan Villiom Podlaski Christiansen in https://phab.mercurial-scm.org/D11674#179866 REPOSITORY rHG Mercurial BRANCH default REVISION

D11728: dirstate: use a single closure for get_flags

2021-10-28 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 code was overlooking fallback when neither symlink not exec was supported. The number of "variants" is getting too high, so I am

D11729: dirstate: make sure that status does not overlook the status flags

2021-10-28 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Without this extra checks, file with fallback flags change as the only change would be overlooked. In the future we might store proper data in the

D11709: dirstate-v2: freeze the on-disk format

2021-10-20 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. marmoute added a comment. Lets put the option on the table. REVISION SUMMARY It seems the format as reached a good balance. With a core of

D11704: dirstate-v2: reorder flag to group related one together

2021-10-19 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 format is not frozen yet, it seems like the right moment to do it. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11702: dirstate-v2: actually use sub-second mtime precision

2021-10-19 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 zero, set the nanoseconds field to its correct value whenever possible and preserve it across serialization+parsing. REPOSITORY rHG Mercurial

D11700: dirstate-v2: add a new MTIME_SECOND_AMBIGUOUS flags

2021-10-19 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 will let us use more `mtime` value in the future. For now we have a minimal handling of the flag at read time, but we will never put ourself in a

D11701: dirstate: ignore sub-second component when either is zero in mtime

2021-10-19 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY When comparing mtimes for equality. Some APIs simply return zero when more precision is not available. When comparing values from different sources, if

D11699: dirstate: align Rust function name to `need_delay`

2021-10-19 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The rest of the code use this name. It is not a great name, but it is better to stay consistent. REPOSITORY rHG Mercurial BRANCH default REVISION

D11694: dirstate-v2: adjust the meaning of directory flags

2021-10-19 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Tracking directory "explicitly" give use the opportunity to distinct between entry that are untracked because they are part of the directory structure and

D11695: dirstate-v2: read the fallback value in Rust

2021-10-19 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This was overlooked in a previous commit. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11695 AFFECTED FILES

D11686: dirstate: add a concept of "fallback" flags to dirstate item

2021-10-18 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The concept is defined and "used" by the flag code, but it is neither persisted nor set anywhere yet. We currently focus on defining the semantic of the

D11687: dirstate: make DirstateItem constructor accept fallback value

2021-10-18 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This could arguably goes in the previous changeset, but I wanted to keep that previous changeset small to focus more on the user code and the documentation.

D11688: dirstate-v2: preserve the fallback values on disk

2021-10-18 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY When the fallback values are set, they are now read and written to disk. See format documentation for details. REPOSITORY rHG Mercurial BRANCH default

Re: Call for comments on new dirstate format contents

2021-10-18 Thread Pierre-Yves David
On 10/15/21 2:22 PM, Pierre-Yves David wrote: On 10/13/21 10:57 AM, Simon Sapin wrote: Please let us know of any question or comment! I remember discussion about storing WC exec-bit and symlink status to help system without support for thoses (Windows we are looking at you

D11681: dirstate-v2: adds a flag to mark a file as modified

2021-10-18 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Right now, a files with a file system state that requires a lookup (same size, different mtime) will requires a lookup. If the result of that lookup is a

D11682: dirstate-v2: adds two flag to track the presence of some unrecorded files

2021-10-18 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Right now, we don't record ignored or unknown files in the dirstate. However the structure would allow it. So we introduce two flags that can be used to

Re: Call for comments on new dirstate format contents

2021-10-15 Thread Pierre-Yves David
days away. I just remembered this and I am not actively working on it today so I don't have a very concret idea about it yet. Matt Harbison might have more concretes idea about this. Cheers, -- Pierre-Yves David ___ Mercurial-devel mailing list Mercurial

D11675: bookmarks: move the `mirror` option to the `paths` section

2021-10-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY A new `bookmarks` section with a `mirror` option have been added. That option has never been released yet. This new options is limited since it affect all

D11677: bookmarks: add a `ignore` variant of the bookmark mode

2021-10-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 new mode allow to disable bookmark exchange with some path (or all path). REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11676: bookmarks: add support for `mirror` mode to `incoming`

2021-10-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 more consistent. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11676 AFFECTED FILES

D11674: path: keep the path instance in the `pulloperation`

2021-10-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 will allow more pull code to use the path options. Ideally we would modify the peer API to keep the path instance. However that is much more churn that I

D11673: path: return path instance directly from get_pull_paths

2021-10-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 means the caller has to do a bit more work, however it give access to the `path` instance and the information it contains. REPOSITORY rHG Mercurial

D11672: path: unify path creation in `get_pull_paths`

2021-10-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 remove a special case and will make it possible to return `path` instance directly. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11671: path: add a new argument to control path validation

2021-10-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY During pull, unvalidated path might be used, having the option to do so directly will allow use to simplify some code and unlock more `path` usage later in the

D11668: dirstate-v2: add an option to prevent unintentional slow dirstate-v2

2021-10-14 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 project policy discussed in November 2020 and already put to use for the persistent nodemap. REPOSITORY rHG Mercurial BRANCH default

D11608: dirstate-item: drop the legacy new_normal constructor

2021-10-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Nobody is calling it anymore. Its purposes has been filled. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11605: dirstate-item: drop the legacy new_possibly_dirty constructor

2021-10-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Nobody is calling it anymore. Its purposes has been filled. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11607: dirstate-item: replace call to new_possibly_dirty

2021-10-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The constructor is on its way out, so we inline the last relevant call before dropping it. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11603: dirstate-item: drop the legacy new_from_p2 constructor

2021-10-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Nobody is calling it anymore. Its purposes has been filled. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11606: dirstate-item: replace a call to new_possibly_dirty

2021-10-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The constructor is on its way out, so we inline a relevant call before dropping it. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11604: dirstate-item: replace call to new_possibly_dirty

2021-10-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The constructor is on its way out, so we inline the last relevant call before dropping it. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11601: dirstate-item: drop the legacy new_added constructor

2021-10-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Nobody is calling it anymore. Its purposes has been filled. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11602: dirstate-item: replace call to new_from_p2

2021-10-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The constructor is on its way out, so we inline the last relevant call before dropping it. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11599: dirstate-item: drop the legacy new_merged constructor

2021-10-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Nobody is calling it anymore. Its purposes has been filled. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11600: dirstate-item: replace call to new_added

2021-10-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The constructor is on its way out, so we inline the last relevant call before dropping it. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11598: dirstate-item: replace call to new_merged

2021-10-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The constructor is on its way out, so we inline the last relevant call before dropping it. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11597: dirstate-item: drop the `from_p2` property

2021-10-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It has no user anymore. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11597 AFFECTED FILES

D11596: dirstate-item: replace another usage of `merged`

2021-10-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 simply spell out the logic here. This was the last usage of `merged`. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11595: dirstate-item: replace a `merged` usage with `from_p2`

2021-10-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It seems more accurate and no test complains (XXX hopefully XXX). REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11594: dirstate-item: drop the `from_p2` property

2021-10-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It has no user anymore. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11594 AFFECTED FILES

D11592: dirstate-item: use the `p2_info` property to replace more verbose call

2021-10-02 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/D11592 AFFECTED FILES mercurial/dirstate.py mercurial/dirstatemap.py CHANGE

D11593: dirstate-item: directly use `p2_info` in `v1_size`

2021-10-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. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11593 AFFECTED FILES

D11591: status: process `from_p2` file the same as `merged` one

2021-10-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY What matters here is that the file constains information coming from the second parent and should be considered `modified` on plain `hg status. So we can

D11590: dirstate: drop an incorrect comment

2021-10-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 actually checking that we are only in a case were the file might needs lookup before doing this. So the comment is not relevant. REPOSITORY rHG

D11589: dirstate: drop some duplicated code

2021-10-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 same operation is done a handful a line lower. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11589

D11587: dirstate: align the dirstate's API to the lower level ones

2021-10-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 conclude the refactoring of this API. We can now finalize the dirstate v2 on disk format. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11588: dirstate: drop some duplicated code

2021-10-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 same operation is done a handful a line lower. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11588

D11586: dirstate-item: introduce a `p1_tracked` property

2021-10-02 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 to simplify various conditional that use `any_tracked and not added`. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11585: dirstate-item: introduce a `p2_info` property that combine two others

2021-10-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 `merged` and `from_p2` property are always used together so we can expose a combined property instead. REPOSITORY rHG Mercurial BRANCH default

D11584: dirstate: narrow gathering of parent data

2021-10-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 parent data are only going to be useful is the file might be clean. And it might only be clean if it is tracked in both p1 and the working copy.

D11583: dirstate: align the dirstatemap's API to the data change

2021-10-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 passing different data, so lets simplify the dirstatemap API too. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11582: dirstatemap: drop legacy method on the dirstatemap wrapper

2021-10-02 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 longer in use now that the Rust wrapper version of the Dirstatemap are back in line with the Python one. REPOSITORY rHG Mercurial BRANCH

D11581: dirstatemap: align the Rust wrapper implementation of `setparent`

2021-10-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 move to using `drop_merge_data` as intended. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11581 AFFECTED

D11580: dirstatemap: fix copymap.pop in Rust to return the value it pops

2021-10-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I guess this was overlooked in the initial implementation? Without this, the next patch would, loose copy information in setparent. REPOSITORY rHG

D11579: dirstate-item: implement `drop_merge_data` on the Rust DirstateItem

2021-10-02 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 currently missing and we want to be able to use in it the Rust case too. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11578: dirstatemap: use a common implement for reset_state

2021-10-02 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 for `set_untracked` this make sure both implementation are aligned. The `reset_state` implementation for the Rust wrapped had signicantly

D11577: dirstatemap: add a common `_drop_entry` method for dirstatemap

2021-10-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 method is called to remove DirstateItem from the map. Each variant have a different implementation (which is … the point). REPOSITORY rHG Mercurial

D11576: dirstatemap: use common code for set_clean

2021-10-02 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 before this make sure both implementation use the same logic for this. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11575: dirstatemap: use common code for set_possibly_dirty

2021-10-02 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 before this make sure both implementation use the same logic for this. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11574: dirstatemap: use a common implement for set_tracked

2021-10-02 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 for `set_untracked` this make sure both implementation use the same logic for this. REPOSITORY rHG Mercurial BRANCH default REVISION

D11573: dirstatemap: add a common `_insert_entry` method for dirstatemap

2021-10-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 method is called to add a new DirstateItem to the map. Each variant have a different implementation (which is … the point). REPOSITORY rHG Mercurial

D11572: dirstatemap: use a common implementation for `dirstatemap.set_untracked`

2021-10-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 can now make sure they use the same code, and drop the older, out of sync, implementation of `set_untracked` for the rust wrapper. REPOSITORY rHG

D11571: dirstatemap: add a common `_refresh_entry` method for dirstatemap

2021-10-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 method is called once a DirstateItem have been modified to apply the change on the dirstatemap if necessary. Each variant have a different

D11570: dirstatemap: create `_dirs_incr/_dirs_decr` methods on the common class

2021-10-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 Rust wrapper does not need them. However having a default, no-op, implementation will help use to write code used by both implementation. REPOSITORY rHG

D11569: dirstatemap: small rework of the `set_untracked` method

2021-10-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 shuffle the code a bit to have it flowing more "naturally". This will help us to create a common version of this code in the next changesets. REPOSITORY

D11568: dirstatemap: arrange methods by category

2021-10-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 dirstatemap code cover various aspects, it grow a bit messy over the years. So we shuffle the code around into some documented categories. This will

D11566: dirstatemap: rename `_rustmap` to `_map`

2021-10-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 match the name of the `map` for the other implementation and will make it simpler to share code between the two. REPOSITORY rHG Mercurial BRANCH

D11567: dirstatemap: move a multiple simple functions in the common class

2021-10-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY These are small and simple, lets factor them out. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11567

D11565: dirstatemap: use a common __init__ for dirstatemap

2021-10-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 the first and simplest things to put in common. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11565

D11564: dirstatemap: introduce a common base for the dirstatemap class

2021-10-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 have two dirstatemaps class. One for the python version of the dirstate map and one for the Rust version (that has a python wrapper to deal with some

D11557: dirstate-item: change the internal storage and constructor value

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 should be closer to what we do need and what we can actually reliably record. In practice it means that we abandon the prospect of storing much more

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