Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:02:38 +0200] rev 46958
profiling: use `util.expandpath` instead of `ui.expandpath` for output
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
from `[paths]`.
Differential Revision: https://phab.mercurial-scm.org/D10425
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 20:57:34 +0200] rev 46957
dispatch: use the new API to resolve --repository
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.
Differential Revision: https://phab.mercurial-scm.org/D10424
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 20:21:11 +0200] rev 46956
revset: use `get_unique_pull_path` for `remote(…)`
This one is also resolving path. For now we restrict the feature to a single
destination. This might change in the future.
Differential Revision: https://phab.mercurial-scm.org/D10422
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 20:15:09 +0200] rev 46955
remotefilelog: use `get_unique_pull_path` in `getflogheads`
Another command moved to the new API, hooray.
Differential Revision: https://phab.mercurial-scm.org/D10421
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 19:30:48 +0200] rev 46954
summary: use the new APIs
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 the new APIs to do so. The current code behavior is a bit fishy,
relying to the fact "default" will be picked as the destination in last resort.
I did not altered that, but left various comment to highlight the issue.
Differential Revision: https://phab.mercurial-scm.org/D10420
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 18:37:29 +0200] rev 46953
share: use `get_clone_path`
Since `hg share` is mostly like clone, do the same changes there.
Differential Revision: https://phab.mercurial-scm.org/D10419
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 18:02:25 +0200] rev 46952
init: use `get_clone_path` when suitable
`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.
Differential Revision: https://phab.mercurial-scm.org/D10418
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 18:34:42 +0200] rev 46951
clone: use `get_clone_path`
"Surprisingly", the new API is well suited for `hg clone` too.
Differential Revision: https://phab.mercurial-scm.org/D10417
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 17:41:02 +0200] rev 46950
incoming: kill the `repo._subtoppath =` hack
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 by argument to the proper function.
This is way cleaner.
Differential Revision: https://phab.mercurial-scm.org/D10416
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 17:29:27 +0200] rev 46949
identify: use `get_unique_pull_path`
The command only support a single destination. We use the associated API.
Differential Revision: https://phab.mercurial-scm.org/D10415
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 17:02:20 +0200] rev 46948
bundle: support multiple destinations
`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 be create to factor this code out for their usage. However this is an
adventure for another time.
They are some minor change to the tests (in addition to the new test for the
feature):
* one because I updated a message to plurals,
* another one because the error changed, and I actually find it clearer.
Differential Revision: https://phab.mercurial-scm.org/D10414
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 14:35:13 +0200] rev 46947
lfs: use the new APIs
The part of the lfs store that requires a destination cannot operate on multiple destination (yet). So we move them to the dedicated APIs.
Differential Revision: https://phab.mercurial-scm.org/D10413
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 13:06:09 +0200] rev 46946
fastannotate: use `get_unique_pull_path`
The code does not support multiple destination yet, so lets move it to the
dedicated API.
Differential Revision: https://phab.mercurial-scm.org/D10412
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 12:57:55 +0200] rev 46945
remotefilelog: use the right expandpath in to expand `~`
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.path.expanduser and co)
Differential Revision: https://phab.mercurial-scm.org/D10411
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Apr 2021 10:46:56 +0200] rev 46944
transplant: use `get_unique_pull_path`
The command does not support multiple destination (yet).
Differential Revision: https://phab.mercurial-scm.org/D10410