D10594: revlog: define the actual index and datafile at loading time

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is just code movement, to make the code closer to where we actually use it and where it will be defined in the future.

D10593: revlog: simplify a conditionnal in _enforceinlinesize

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is a gratuitous change to make things a bit easier to read. REPOSITORY rHG Mercurial BRANCH default REVISION

D10592: revlog: drop `flush` parameter from `_peek_iscensored`

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is not used anywhere. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10591: revlog: fix error message when data are missing

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The error message the message was not using the requested offset, but the adjusted offset to that read more data for

D10590: revlog: rename `nodemap_file` to `_nodemap_file`

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Same reasoning as for `indexfile and datafile`, lets hide these implementation details. REPOSITORY rHG Mercurial BRANCH

D10589: revlog: use revlog.display_id in error related to bad revisions

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10589 AFFECTED FILES mercurial/revlog.py

D10586: revlog: use revlog.display_id in integrity error

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10586 AFFECTED FILES mercurial/revlog.py

D10588: revlog: use revlog.display_id in "revision too big" errors

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10588 AFFECTED FILES mercurial/revlog.py

D10587: revlog: use revlog.display_id in censor related errors

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10587 AFFECTED FILES mercurial/revlog.py

D10576: revlog: use a "radix" to address revlog

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Instead of pointing to the index directly and to derive the other file from that, we directly provide the radix and let the

D10585: revlog: use revlog.display_id in ambiguity errors

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10585 AFFECTED FILES mercurial/revlog.py

D10581: revlog: use revlog.display_id in LookupError

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10581 AFFECTED

D10583: revlog: use revlog.display_id in format related errors

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10583 AFFECTED FILES mercurial/revlog.py

D10584: revlog: use revlog.display_id for corruption error

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10584 AFFECTED FILES mercurial/revlog.py

D10582: revlog: use revlog.display_id in narrow error message

2021-05-03 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. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10582 AFFECTED FILES mercurial/changegroup.py

D10574: revlog: rename `indexfile` to `_indexfile`

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We want to make the actual location of the indexfile and location more of an implementation details than what is is

D10579: revlog: introduce a `display_id` property

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We currently using the "index file" to identify a revlog in error output. Since we are about to make the "index file"

D10580: revlog: use revlog.display_id for FilteredLookupError

2021-05-03 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/D10580 AFFECTED FILES mercurial/repoview.py CHANGE DETAILS diff --git

D10575: revlog: rename `datafile` to `datafile`

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We want to make the actual location of the datafile and location more of an implementation details than what is is

D10578: revlog: also use radix when computing nodemap data file

2021-05-03 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 a radix, lets use it! REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10578 AFFECTED FILES

D10577: revlog: stop usage of `_indexfile` to computing nodemap path

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We now have the radix explicitely lets use the radix explicitely REPOSITORY rHG Mercurial BRANCH default REVISION

D10565: revlog: split the `version` attribute into its two components

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The `revlog.version` attribute contained an integer coding 2 different informations: - the revlog version number - a

D10572: manifest: drop the `indexfile` from `manifestrevlog`

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Since `manifestrevlog` object are not revlog (no really, they are not…) we drop the revlog specific attribute. We need to directly access the underlying

D10569: revlog: always "append" full size tuple

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Same reasoning as the previous patch. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10573: filelog: drop `indexfile` from `filelog`

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Since `filelog` objects are not revlog (no really, they are not…) we drop the revlog specific attribute. We need to directly access the underlying revlog in a

D10571: revlog: deal with special "postfix" explicitely

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY revlog usually use a straight forward '.i' and '.d' naming except for two cases "in-transaction" changelog, and censoring.

D10570: revlog: split the option initialisation in its own method

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The part of the code is huge, keeping it separated will keep the `_loadindex` method simpler and help keeping logic well

D10568: revlog: make the index always return the same tuple

2021-05-03 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 simpler to manage the diferrence in on disk format in the internal index code itself and lets the rest of the code always handle the same object.

D10563: revlog: replace flag check related to generaldelta with attribute check

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

D10567: revlog: introduce an explicit `format_version` member in the index struct

2021-05-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 will allow for cleaner check than assuming each version has a different size. Unsurprisingly I am planning to use this to introduce more format variant.

D10566: revlog: rename `hdrsize` to `entry_size` in the C code

2021-05-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 is the size of and index entry, so lets make it clearer. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10562: revlog: replace REVLOGV2 check related to sidedata with `hassidedata` checks

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is more flexible and semantically more correct. The associated revlog's attribute exist since 827cb4fe62a3

D10564: verify: pass a revlog to `_checkrevlog` in `_verifymanifest`

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Since `manifestrevlog` is not a `revlog`, we are passing strange thing to `_checkrevlog`. We fix this to avoid breakage during future change. REPOSITORY rHG

D10561: revlog: explicitely pass the "indexfile" parameter

2021-05-03 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Most of this was already done when introducing the `target` parameter, but some remained. Having "indexfile" passed explicitely will help us to change the way

D10545: enforcesinglehead-test: add the expected node output next to the error

2021-05-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 make it simpler to validate that the test is correct. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10545

D10544: revlog: highlight current incompatibility in `rewrite_sidedata`

2021-05-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY See comment for details. We will need to fix the test coverage when this incompatibility is lifted. REPOSITORY rHG

D10543: revlog: adjust rewrite_sidedata code to not delete existing revlog content

2021-05-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The "w+" file mode is deleting all the content of the opened file. Which is bad… This is not caught by the test because

D10542: revlog: fix some comment style

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

D10509: revlog: remove the revlogio class

2021-04-28 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The class only contains a single `parseindex` method. Lets just make it a function and remove the `revlogio` class. It served

D10511: revlog: code for `revlogv0` in its own module

2021-04-28 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This code is mostly unused compatiblity code. Yet it take a prohiminent place in the `revlog.py` module. That module is

D10508: revlog: add a `entry_binary` method on index

2021-04-28 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The revlog index is already responsible for unpacking the binary entry, it would be simpler to make it responsible for

D10510: revlog: have an explicit "pack_header" method

2021-04-28 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Having to pass the version header when retrieving the binary version of every single entry is a bit silly. So we extract that

D10499: relnote: mention a nodemap bug fixes

2021-04-20 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The fix was in a3720569a43f . REPOSITORY rHG Mercurial BRANCH default

D10498: relnote: document the use of persistent-nodemap by default for Rust build

2021-04-20 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/D10498 AFFECTED FILES relnotes/next CHANGE DETAILS diff --git a/relnotes/next

D10497: relnode: document the move to `zstd` as default compression

2021-04-20 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/D10497 AFFECTED FILES relnotes/next CHANGE DETAILS diff --git a/relnotes/next

D10496: relnote: clarify the backward compatibility entry about p1/p2 swap

2021-04-20 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 might read a bit scary. So we clarify that the nodeid are not affected. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10481: streamclone: treat volatile file as "fullfile"

2021-04-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 nodemap related file might change (or get deleted) during the stream clone in a way incompatible with the streaming process. So we introduce a new

D10482: store: exclude `undo.` nodemap's file from `walk`

2021-04-19 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY There are "temporary" local file that we should not be transfered by `walk` user like local clone and stream clone. This fix the small issue that the new

D10480: nodemap: add a test about nodemap "vacuum" during stream clone

2021-04-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 the nodemap "vacuum" it generate a new datafile, with a new unique name and delete the old one. This confuse the stream clone code and create the same

D10479: nodemap: add a test about racy commit during stream clone

2021-04-19 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY That test show that the resulting client nodemap is different from the server one. This happens because the server one transferred a corrupted node map. The

D10478: streamclone: remove sleep based "synchronisation" in tests

2021-04-19 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Sleep based test synchronisation does not work. Variation in machine performance and load can make the two process miss their windows. Instead we migrate

D10477: testing: add a `write_file` function

2021-04-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 function is kinda trivial, but having a simple function avoid silly mistake. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10475: streamclone: check the errors log in tests

2021-04-19 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Code can be buggy, in that case having error message tend to help. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10476: testing: add a utility function to wait for file create

2021-04-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 is similar to `tests/testlib/wait-on-file`, but for the python code REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10464: phab-refresh: use a special comment on the stable branch

2021-04-19 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Phabricator make it hard to spot the branch information. As a result patch intended for stable are consistently queued for default. We add a special

D10463: phab-refresh: extract the comment in a variable

2021-04-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 make the script more readable and it is about to become more complex. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10458: nodemap: deal with data mmap error

2021-04-16 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 file is too small, the mmapread call would raise a ValueError. We catch that and ignore nodemap content (as we do without mmap). This make the

D10457: nodemap: test various corruption scenario for the persistent nodemap

2021-04-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Corruption can happens in the wild, either because some of our code is buggy or because repository were shared/transfered in a strange manners. Currently

Re: development heads up: push/pull improvements

2021-04-16 Thread Pierre-Yves David
On 4/16/21 3:41 PM, Manuel Jacob wrote: On 13/04/2021 12.16, Pierre-Yves David wrote: On 4/13/21 3:03 AM, Manuel Jacob wrote: On 17/03/2021 16.05, Pierre-Yves David wrote: Hello everyone, I have been working on improvements to push and pull. The core goal can be summarized as: * make

D10456: infinitepush: use `get_unique_pull_path`

2021-04-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 extension does not support multiple destination (yet). REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10456

D10451: urlutil: move url "fixing" at the time of `ui.paths` initialization

2021-04-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Doing such fixing at the time is simpler and will be necessary to deal with urls list in a sane manner. It also reduce the size of fix-config which is always

D10455: urlutil: provide some information about "bad url" when processing `pushurl`

2021-04-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY It appears pushurl only support `://` entries. This is not obvious and can lead to obscure error. We make the error less obscure as a start.. REPOSITORY rHG

D10454: revset: document the `outgoing` behavior if the path resolve to multiple urls

2021-04-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/D10454 AFFECTED FILES mercurial/revset.py CHANGE DETAILS diff --git

D10452: multi-urls: add a boolean suboption that unlock path specification as list

2021-04-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY When this option is set, a list of patch can be specifed as value for `[paths]` entries. For the command who support it, this behave the same as providing

D10449: parselist: move the function from config to stringutil

2021-04-15 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 the function in a lower level module to avoid cycle. It moves next to `parsebool` who had to migrate for the same reasons. REPOSITORY rHG Mercurial

D10453: multi-urls: document the feature

2021-04-15 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 a feature lets make it visible to people. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10453

D10450: path: teach the `hg path` command to display boolean sub-option

2021-04-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The next changeset introduce one. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10450 AFFECTED FILES

D10448: bookmark: use `list_paths` to access path definition

2021-04-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The content of the `[paths]` config section is receiving transformation that make it hard to recognise whats the actual name, and the next changeset will

D10447: urlutil: make `paths` class old list of `path`

2021-04-15 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 from a `{name → path}` mapping to a `{name → [path]}` mapping. And update all user code accordingly. For now, all the list contains exactly one

D10446: urlutil: extract `chain_path` in a function

2021-04-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 no longer modify `path` inplace so it does not make much sense as a method. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10444: template: add a `paths` field to all entry in peersurl

2021-04-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 make it possible to display multiple path per name in the near future. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10445: urlutil: add a `copy` method to `path

2021-04-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 be useful when inheriting from multiple path at the same time. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10442: template: use `list_paths` in `peerurls`

2021-04-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Using common code will make it simpler to update the logic behind the path definition and storage. REPOSITORY rHG Mercurial BRANCH default REVISION

D10443: template: make an explicit closure for formatting entry in peerurls

2021-04-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 about to be become significantly more complicated as `ui.path[x]` will become a list. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10440: urlutil: introduce a new `list_paths` function

2021-04-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 function will be useful for command and template that wants to display path related information. REPOSITORY rHG Mercurial BRANCH default REVISION

D10441: paths: use `list_paths` in `hg paths`

2021-04-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Using common code will make it simpler to update the logic behind the path definition and storage. REPOSITORY rHG Mercurial BRANCH default REVISION

D10439: urlutil: deprecate `getpath`

2021-04-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY There as no remaining user of that function. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10439 AFFECTED

D10436: perfphasesremote: use `get_unique_push_path` if available

2021-04-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY After `ui.expandpath` we are not after `getpath` (that will be much simpler). The reason is still the fact we can't rely on getting a single url from a single

D10435: revset: drop an outdated comment

2021-04-15 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 not `ui.expandpath` call there anymore. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10435 AFFECTED

D10438: urlutil: inline the relevant part of `getpath` in `get_push_paths`

2021-04-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The part that `get_push_paths` needs is quite simple, inclining will help us to deprecated `getpath`. REPOSITORY rHG Mercurial BRANCH default REVISION

D10437: url_util: introduce a `try_path` function

2021-04-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY That function… try a build a path, returning None on failure. This helps us to simplify various part of the existing code. REPOSITORY rHG Mercurial BRANCH

D10434: subrepo: introduce a `repo_rel_or_abs_source` function

2021-04-15 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The `subrepoutil` module has various function to compute the path of a sub-repository compared to the root of the top repository. However, they was no

D10428: debugbackupbundle: use `get_unique_pull_path`

2021-04-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 last known user of `ui.expandpath` outside of `urlutil`. Hooray. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10432: ui: deprecated `ui.expandpath`

2021-04-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 function return a single path, something incompatible with the coming change to `[paths]` definition to allow multiple associated urls. Now that all

D10427: debugssl: use `get_unique_pull_path`

2021-04-14 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Let's move this code to the new API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10427 AFFECTED FILES

D10426: debugdiscovery: use `get_unique_pull_path`

2021-04-14 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Lets move this code to the new API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10426 AFFECTED FILES

D10430: urlutil: remove usage of `ui.expandpath` in `get_unique_pull_path`

2021-04-14 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 deprecate `ui.expandpath` and simplify the code before adding more complexity in the form of `[paths]` entry pointing to multiple url. So we inline

D10431: urlutil: remove usage of `ui.expandpath` in `get_clone_path`

2021-04-14 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 deprecate `ui.expandpath` and simplify the code before adding more complexity in the form of `[paths]` entry pointing to multiple url. So we inline

D10429: urlutil: remove usage of `ui.expandpath` in `get_pull_paths`

2021-04-14 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 deprecate `ui.expandpath` and simplify the code before adding more complexity in the form of `[paths]` entry pointing to multiple url. So we inline

D10423: perf-discovery: use `get_unique_pull_path`

2021-04-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 performance command now use the new API, unless the benchmarked Mercurial is older. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10420: summary: use the new APIs

2021-04-14 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Summary can perform some incoming/outgoing queries (that should be common to the other command with the same needs, but that is another story). We now

D10425: profiling: use `util.expandpath` instead of `ui.expandpath` for output

2021-04-14 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Given we are talking about the path to an output file, I am fairly certain that the initial author meant to expand `~` and the like and not to resolve entry

D10424: dispatch: use the new API to resolve --repository

2021-04-14 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY An even weirder feature of Mercurial is the ability to use `[paths]` alias as value of `--repository`. The weird feature now use the new APIs. REPOSITORY

D10422: revset: use `get_unique_pull_path` for `remote(…)`

2021-04-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 one is also resolving path. For now we restrict the feature to a single destination. This might change in the future. REPOSITORY rHG Mercurial BRANCH

D10416: incoming: kill the `repo._subtoppath =` hack

2021-04-14 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We do the same as for `hg outgoing`, instead of relying on implicit passing value by monkey punching them onto the repo object, we pass equivalent

D10418: init: use `get_clone_path` when suitable

2021-04-14 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY `hg init` has this weird feature were you can refer to `[paths]` entry select the path to initialize. We move that code to the new APIs. REPOSITORY rHG

D10419: share: use `get_clone_path`

2021-04-14 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Since `hg share` is mostly like clone, do the same changes there. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10421: remotefilelog: use `get_unique_pull_path` in `getflogheads`

2021-04-14 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Another command moved to the new API, hooray. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10421 AFFECTED

D10415: identify: use `get_unique_pull_path`

2021-04-14 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The command only support a single destination. We use the associated API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10414: bundle: support multiple destinations

2021-04-14 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY `hg outgoing` and `hg push` now support multiple destination. We do the same for `hg bundle`. Various other commands needs this kind of behavior and it would

<    5   6   7   8   9   10   11   12   13   14   >