D12073: test-http-bad-server: use the new pattern-reading for a test-case

2022-01-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 test case is now less sensitive to change of unrelated bits of the client/server exchange. Since this introduce some churn in the output, we do it

D12072: test-http-bad-server: use the new pattern-reading for a test-case

2022-01-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 test case is now less sensitive to change of unrelated bits of the client/server exchange. Since this introduce some churn in the output, we do it

D12071: test-http-bad-server: use the new pattern-reading for a test-case

2022-01-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 test case is now less sensitive to change of unrelated bits of the client/server exchange. Since this introduce some churn in the output, we do it

D12070: test-http-bad-server: use the new pattern-reading for a test-case

2022-01-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 test case is now less sensitive to change of unrelated bits of the client/server exchange. Since this introduce some churn in the output, we do it

D12069: test-http-bad-server: use the new pattern-reading for a test-case

2022-01-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 test case is now less sensitive to change of unrelated bits of the client/server exchange. Since this introduce some churn in the output, we do it

D12067: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12068: test-http-bad-server: introduce socket closing after reading a pattern

2022-01-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 introduce the `close-after-recv-patterns` option. It has the same goal as `close-after-send-patterns` with a slightly different implementation. Reading

D12066: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12065: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12064: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12063: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12062: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12061: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12060: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12059: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12058: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12057: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12056: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12055: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12054: test-http-bad-server: modify some `tail` call fit their goal

2022-01-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 want to check that we stop writing when we want to stop writing. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12053: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12052: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12051: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12050: test-http-bad-server: move on test from bytes-count to pattern

2022-01-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 specific test case is now using the new "close when a pattern is seen" approach compared to the more fragile "that many bytes were sent" approach.

D12046: test-http-bad-server: replace the default 65537 value in output

2022-01-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 the default block value that we use here and it make the output overall less readable. So we replace it with `~` REPOSITORY rHG Mercurial BRANCH

D12049: test-bad-http-server: introduce sock closing when writing a pattern

2022-01-24 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 using a fixed number a bytes, a very unstable method. We introduce a new config that can define a regex. One this regex is detected, nothing after

D12048: test-http-bad-server: document that the value are actually a list

2022-01-24 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 really expect this doc to be read a lot, but mentioning that this is a list seems important. REPOSITORY rHG Mercurial BRANCH default REVISION

D12047: test-http-bad-server: refactor the writing logic to avoid early return

2022-01-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Our ultimate goal is to add another way to define the connection needs to be closed. To do so, we need the "read" code to be more unified. REPOSITORY rHG

D12042: test-http-bad-server: unify log printing for `sendall` and `write`o

2022-01-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 `write` function was logging before calling the function while the `sendall` function were logging after calling the function. We align the `write`

D12045: test-http-bad-server: refactor the reading logic to avoid early return

2022-01-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Our ultimate goal is to add another way to define the connection needs to be closed. To do so, we need the "read" code to be more unified. REPOSITORY rHG

D12044: test-http-bad-server: factor code dealing with "read" in the new object

2022-01-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 make sure both `read` and `readline` do the same processing and make it simpler to update that processing in the future. REPOSITORY rHG Mercurial

D12043: test-http-bad-server: factor code dealing with "write" in the new object

2022-01-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 make sure both `sendall` and `write` do the same processing and make it simpler to update that processing in the future. REPOSITORY rHG Mercurial

D12039: test-http-bad-server: align output by using `;`

2022-01-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 the only message using a `,` instead of `;` and that seems unintentional. I am unifying the message before unigying the code. REPOSITORY rHG

D12038: test-http-bad-server: highlight each test with section

2022-01-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Small "documentation" change to highlight each individual tests better. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12041: test-http-bad-server: track close condition in an object

2022-01-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY qn order to make the logic more advanced, we need to unify it. To unify it, we introce a small object that will be responsible for tracking and enforcing

D12040: test-http-bad-server: use more readable name for variable

2022-01-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 make the code more accessible overall. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12040 AFFECTED

D12037: test-http-bad-server: rename config to use `-`

2022-01-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 make things much more readable. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12037 AFFECTED FILES

D12036: test-http-bad-server: move the extension in `testlib`

2022-01-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 seems like a better location for it. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12036 AFFECTED FILES

D12035: requirements: remove the `localrepo.supportedformat` attribute

2022-01-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 not longer used anywhere. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12035 AFFECTED FILES

D12033: requirements: move the comment about manifestv2 in the module

2022-01-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 about requirements, so lets put it into the requirements module. We are about to remove code it was previously attached too. REPOSITORY rHG

D12034: requirements: sort _basesupported

2022-01-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 make the next changeset clearer. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12034 AFFECTED FILES

D12030: requirements: move "bookmark in store" requirements in the right module

2022-01-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY There seems to be no reasons to not have it with the others. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12031: stream-clone: filter possible missing requirements using all supported one

2022-01-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 `supportedformat` requirements is missing some important requirements and it seems better to filter out with all requirements we know, not just an

D12029: stream-clone: add a explicit test for format change during stream clone

2022-01-24 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 different kind of requirements, the one which impact the data storage and are relevant to the files being streamed and the one which does not. For

D12032: stream-clone: add a explicit set list requirements relevant to stream clone

2022-01-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 set explicitly lists all the requirements that "stream clone" will preserve. Any other one will not be preserved. The role of listing the relevant

D12028: stream-clone: factor computation of requirement of a stream clone

2022-01-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 gather code duplicated in multiple place and will make it easier to modify it safely in the future. REPOSITORY rHG Mercurial BRANCH default

D12027: stream-clone: factor computation of new clone requirement out

2022-01-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 gather code duplicated in multiple place and will make it easier to modify it safely in the future. REPOSITORY rHG Mercurial BRANCH default

D12026: stream-clone: drop some outdated lines in test-stream-bundle-v2.t

2022-01-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY These line refer to a "dirstate-v2" variant that is no longer in use. The associated line drifted out of sync with reality. REPOSITORY rHG Mercurial BRANCH

D11997: share-safe: enable by default (BC)

2022-01-12 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 feature have been around for a year (4 version) and is quite important. Lets make it enabled by default. REPOSITORY

D11985: tests: use debugrequires instead of grepping the file directly

2022-01-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY With `share-safe`, the requirements are stored in multiple files so it seems better to use the command that retrieve the information wherever it is.

D11995: legacy-revlog: fix requirement computation when cloning legacy repo

2022-01-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The oldest format of repository does not have requirements so we need to treat them differently when cloning such repository. The previous code had issue

D11994: requirements: do not warn about dropping share-safe, unless explicitly set

2022-01-12 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 just altering the default value, this is "fine". This will get tested once share-safe become the default. REPOSITORY rHG Mercurial BRANCH

D11996: share-safe: add support for static-http repository

2022-01-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We need to read the second requirements file in the static-http case too. Otherwise, static-http would miss most of the requirements and misbehave. REPOSITORY

D11993: sparse: take lock before writing requirements

2022-01-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY with `share-safe`, we will also write file in the store. So we take the `lock` before altering the requirements. REPOSITORY rHG Mercurial BRANCH default

D11992: largefiles: take lock before writing requirements

2022-01-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY With `share-safe`, we will also write file in the store. We now take the `lock` as needed. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11982: stream-clone: only consider store requirements

2022-01-12 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 different kind of requirements, the one which impact the store and are relevant to the files being streamed and the one which does not. For example

D11990: test: simpler requirements matching in test-repo-compengines.t

2022-01-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We focus on the requirements relevant for this tests. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11990

D11991: lfs: take lock before writing requirements

2022-01-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY With `share-safe`, we will also write file in the store, so we take the store lock before writing requirements. REPOSITORY rHG Mercurial BRANCH default

D11989: test: simpler requirements matching in test-lfs-largefiles.t

2022-01-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We focus on the requirements relevant for this tests. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11989

D11988: test: simpler requirements matching in test-sidedata.t

2022-01-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We focus on the requirements relevant for this tests. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11988

D11987: test: simpler requirement matching in test-revlog-v2.t

2022-01-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We narrow the matching toward the one we actually care about. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11986: test-copies: narrow the format check in test-copies-in-changeset.t

2022-01-12 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 reduce the noise when touching unrelated format variants. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11984: tests: use debugrequires in test-upgrade-repo.t

2022-01-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Whenever possible, we use the `hg debugrequires` command instead of directly grepping the file. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11983: test: do not use `which` to find an exec path in the test

2022-01-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Posix is deprecated `which` in favor of `command -v`… which does not provide the same feature. Debian is warning about this deprecation and this get annoying.

D11937: rank: actually persist revision's rank in changelog-v2

2021-12-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 changelog v2 format is now persisting whatever "rank" value is recorded. However keep in mind that for we do not record any value. REPOSITORY rHG

D11936: rank: add a "rank" value to the revlog-entry tuple

2021-12-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 rank of a revision is the size of sub-graph it defines as a head. In other words, the rank of X is the size of `ancestors(X)` (X included). This is a

D11934: changelog-v2: use helper constant in the code to pack/unpack entries

2021-12-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 makes the code simpler to read and modify. This is probably less efficient, but we are talking about the Python implementation here, so performance is

D11935: changelog-v2: fix an assertion error to display the right data

2021-12-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We were checking on thing and displaying the other. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11935

D11933: revlog: add some information about the revision we cannot find

2021-12-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Parameter to Exception are good, use them. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11933 AFFECTED FILES

D11896: doc: remove a spurious ^L in some doc

2021-12-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 was wrongly introduced in D11784 . REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11895: test: use `hg debugrequires` instead of `cat` in some tests

2021-12-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 This give the "same" result, while taking in account that the requirement file might be in different location, like what

D11894: test: simplify `debugformat` matching in test-phases.t

2021-12-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 make the test less sensible to unrelated format changing. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11893: test: simplify `debugformat` matching in test-copies-chain-merge

2021-12-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 make the test less sensible to unrelated format changing. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11892: share: make it possible to control the working copy format variant

2021-12-10 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY A share will use the same format as its source for the store, but there are no reason to not lets it control the working copy variant at creation time. So

D11891: share: move the requirement initialisation code around

2021-12-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 will make this logic more flexible in the next patch. We start by moving it at the end of the function without any other change for clarity. REPOSITORY

D11873: upgrade: don't use `dd status=none` in the test

2021-12-07 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This breaks on Windows, so lets use `>2 /dev/null` like in the other tests. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL

D11871: upgrade: only process revlogs that needs it by default

2021-12-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 have more and more requirement that does not affect revlog or that only affect some of them. It is silly to force a full processing of all revlog to juste

D11872: upgrade: drop some dead code

2021-12-07 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Everything done by this block is now done by earlier code. So we don't need it anymore. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11870: upgrade: issue a message when a revlog type has to be upgraded

2021-12-07 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 explicite and prepare for a smoother transition to smarter picking of the revlog we will process. REPOSITORY rHG Mercurial BRANCH default

D11869: upgrade: explicitly warn when a `--no-xxx` flag is overwritten

2021-12-07 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Some format upgrade/downgrades -needs- revlog to be recomputed. So we now detect that individually and warn when it contradict explicitly passed flag.

D11868: upgrade: make the list of explicitly specified revlog a dict

2021-12-07 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This makes various logic simpler and will help making future patch clearer. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11867: upgrade: move the revlog selection code longer down the chain

2021-12-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 about about to make revlog section smarter. Moving the code around will make the next changesets clearer. REPOSITORY rHG Mercurial BRANCH default

D11866: dirstate-v2: fix upgrade on an empty repository

2021-12-07 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This used to crash as the dirstate file does not exist in this case. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL

D11865: dirstate-v2: test upgrade without rust too

2021-12-07 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 reason to gate this anymore. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D11865 AFFECTED FILES

D11864: test-upgrade: narrow the `debugformat` call when upgrading to dirstate-v2

2021-12-07 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 make the test less noisy when new requirement are added. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL

D11861: python2-compat: fix extensions' tests on python2

2021-12-04 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 minor output different to be taken in account. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11861

Re: Will work on adding allowing merge tools to partially resolve conflicts

2021-12-03 Thread Pierre-Yves David
it extend the `premerge` option smoothly. I assume you will want to be able to configure the pre-merge tools according to the file pattern, and mostly "regardless" of end user merge tool of choice. What's your thoughts here ? Cheers, -- Pierre-Yves David _

D11852: update: reformat the `commands.update.check` help

2021-12-03 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 various option clearer. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11852 AFFECTED FILES

D11851: update: properly overwrite `check` config with `--no-` variants

2021-12-03 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 `--merge` override `commands.update.check=abort/noconflict`, and `--check` "override" `commands.update.check=none/linear`. However the

D11850: update: add a test for `--merge` overriding the "abort" config

2021-12-03 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 this behavior tested anywhere. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11850 AFFECTED FILES

D11848: update: use long version of the flag in the test

2021-12-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This helps readability and searchability. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11848 AFFECTED FILES

D11846: dirstate-item: make sure we load `mtime-second-ambiguous` from disk

2021-12-02 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 support the associated logic, we can safely load it from it. It is no longer necessary to ignore the stored mtime when the flag is encountered.

D11842: dirstate-item: add a "second_ambiguous` flag in the mtime tuple

2021-12-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 will be used to support the `mtime-second-ambiguous` flag from dirstate v2. See format documentation for details. For now, we only make it possible

D11847: status: keep second-ambiguous mtimes during fixup

2021-12-02 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 support the feature, we can keep "second ambiguous" mtime during the fixup phase. These are the mtime that would be ambiguous if we did not had

D11845: dirstate-item: make sure we set the mtime-second-ambiguous on v2 write

2021-12-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We want to preserve the second-ambiguity alongside the ambiguous mtime. So we use the decimated flag for that. note: the C code was already doing so. No

D11844: dirstate-item: ignore mtime to write v1 when `mtime-second-ambiguous` is set

2021-12-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 cannot preserve that information in the v1 format so that mtime is ambiguous. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11843: dirstate-item: implement the comparison logic for mtime-second-ambiguous

2021-12-02 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 flag is set we now process it properly. We "just" need to actually set it and persist it. REPOSITORY rHG Mercurial BRANCH default REVISION

D11841: dirstate: drop comparison primitive on the timestamp class

2021-12-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY All comparison are now managed without using operator : - the status mtime comparisons is handled by the DirstateItem, - the fixup reliability check, -

D11833: test: mark rhg output as flaky

2021-11-30 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY rhg is not updating the dirstate on status yet, which make this part of the test flaky. This will be fixed soon. REPOSITORY rHG Mercurial BRANCH default

D11821: extensions: highlight the name of the faulty extensions in the error message

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 make it easier to understand the message when the extensions name is common. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

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