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 CHANG

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 test

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 test

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 currently

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" locati

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 a/mercurial

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 currently.

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 mercurial/r

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 DETAIL

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 bi

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 revlo

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 https://phab.mercurial-s

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. O

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 insu

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. Thi

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 me

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 https://phab.mercurial-scm.org/D105

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 Mercuri

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 t

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 mercurial/cext

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 alread

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 packi

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 REVISION

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 b/r

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 b/r

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 ht

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 flag

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 ki

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 d

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 t

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 https://phab.me

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 https://phab.mercurial-scm.org

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 https://phab.mercurial-s

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 comman

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 https://phab.mercurial

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 repositor

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 it

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 a/mercurial/r

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 mu

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 AFFECTED

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 mercuri

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 make

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 elemen

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 https://ph

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 https://phab.mercuria

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 https://phab.mercurial-s

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 DETAI

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 h

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 D

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 DETAI

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 FILE

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 p

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 DE

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 functi

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 https://phab.mercuri

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 u

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 merc

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 mercu

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 https:

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 use

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 rHG

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 information

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 Mercur

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 https://phab.mercurial-scm.org/

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 FIL

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 https://phab.mercurial-

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

D10417: clone: use `get_clone_path_usage`

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 "Surprisingly", the new API is well suited for `hg clone` too. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10

D10413: lfs: 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 The part of the lfs store that requires a destination cannot operate on multiple destination (yet). So we move them to the dedicated APIs. REPOSITORY rHG Merc

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

D10411: remotefilelog: use the right expandpath in to expand `~`

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 the context where path is most likely a file system path, I suspect that the initial author confused ui.expandpath and util.expandpath (a proxy for os.p

D10412: fastannotate: 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 code does not support multiple destination yet, so lets move it to the dedicated API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https

D10408: histedit: use `get_unique_push_path`

2021-04-14 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 Same as for `pathbomb`, this code does not support multiple destinations yet. It might in the future, probably with code put in

D10409: relink: 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 code does not support multiple destination and will probably never do so. So lets use the dedicated API for this case. REPOSITORY rHG Mercurial BRANCH

D10402: mq: use the new `get_clone_path` to get the remote url

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 stop using `ui.expandpath` to use a function with a more defined semantic. This will help us to make it an option to point [paths] entry to multiple destinat

D10405: patchbomb: 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 patchbomb code does not support multiple destinations yet. It would not be too hard to implemented since `hg outgoing` does. However that is a bit too muc

D10407: get_unique_push_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. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10407 AFFECTED FILES mercurial/utils/urlutil.py CHANGE DETAILS diff --git a/merc

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