Wed, 14 Apr 2021 00:38:25 +0800 help: clarify when `$HG_URL` and `$HG_SOURCE` are added in hooks
Aay Jay Chan <aayjaychan@itopia.com.hk> [Wed, 14 Apr 2021 00:38:25 +0800] rev 46972
help: clarify when `$HG_URL` and `$HG_SOURCE` are added in hooks Differential Revision: https://phab.mercurial-scm.org/D10400
Fri, 16 Apr 2021 15:39:00 +0200 nodemap: deal with data mmap error
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Apr 2021 15:39:00 +0200] rev 46971
nodemap: deal with data mmap error 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 repository slightly slower (until the next write) but usable. Unlike the current crash. Differential Revision: https://phab.mercurial-scm.org/D10458
Fri, 16 Apr 2021 14:59:13 +0200 nodemap: test various corruption scenario for the persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Apr 2021 14:59:13 +0200] rev 46970
nodemap: test various corruption scenario for the persistent nodemap 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 one of the corruption case (not enough data) lead to a crash. We add explicit tests for theses cases. Differential Revision: https://phab.mercurial-scm.org/D10457
Sat, 17 Apr 2021 00:28:21 -0400 cmdutil: fix an uninitialize variable usage in clearunfinished()
Matt Harbison <matt_harbison@yahoo.com> [Sat, 17 Apr 2021 00:28:21 -0400] rev 46969
cmdutil: fix an uninitialize variable usage in clearunfinished() I happened to notice that PyCharm flagged this while looking for something else. I'm pretty sure it meant to check the current state in the iteration, and not keep reusing the last one in the previous iteration. Differential Revision: https://phab.mercurial-scm.org/D10459
Mon, 05 Apr 2021 14:19:17 +0800 help: document `$HG_NEW_OBSMARKERS` in pretxnclose hook
Aay Jay Chan <aayjaychan@itopia.com.hk> [Mon, 05 Apr 2021 14:19:17 +0800] rev 46968
help: document `$HG_NEW_OBSMARKERS` in pretxnclose hook Differential Revision: https://phab.mercurial-scm.org/D10399
Thu, 01 Apr 2021 22:43:55 +0800 help: prepend environment variables used in hooks with "$"
Aay Jay Chan <aayjaychan@itopia.com.hk> [Thu, 01 Apr 2021 22:43:55 +0800] rev 46967
help: prepend environment variables used in hooks with "$" Most of them have "$" prefix but some don't, so adding it for consistency. Differential Revision: https://phab.mercurial-scm.org/D10398
Thu, 15 Apr 2021 09:59:12 +0200 revset: drop an outdated comment
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 09:59:12 +0200] rev 46966
revset: drop an outdated comment There is not `ui.expandpath` call there anymore. Differential Revision: https://phab.mercurial-scm.org/D10435
Thu, 15 Apr 2021 01:03:12 +0200 ui: deprecated `ui.expandpath`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 01:03:12 +0200] rev 46965
ui: deprecated `ui.expandpath` This function return a single path, something incompatible with the coming change to `[paths]` definition to allow multiple associated urls. Now that all user got migrated, we deprecate the function. Differential Revision: https://phab.mercurial-scm.org/D10432
Wed, 14 Apr 2021 21:29:27 +0200 urlutil: remove usage of `ui.expandpath` in `get_clone_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:29:27 +0200] rev 46964
urlutil: remove usage of `ui.expandpath` in `get_clone_path` 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 the relevant bits. Differential Revision: https://phab.mercurial-scm.org/D10431
Wed, 14 Apr 2021 21:27:00 +0200 urlutil: remove usage of `ui.expandpath` in `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:27:00 +0200] rev 46963
urlutil: remove usage of `ui.expandpath` in `get_unique_pull_path` 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 the relevant bits. Differential Revision: https://phab.mercurial-scm.org/D10430
Wed, 14 Apr 2021 21:20:58 +0200 urlutil: remove usage of `ui.expandpath` in `get_pull_paths`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:20:58 +0200] rev 46962
urlutil: remove usage of `ui.expandpath` in `get_pull_paths` 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 the relevant bits. Differential Revision: https://phab.mercurial-scm.org/D10429
Wed, 14 Apr 2021 21:15:53 +0200 debugbackupbundle: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:15:53 +0200] rev 46961
debugbackupbundle: use `get_unique_pull_path` This is the last known user of `ui.expandpath` outside of `urlutil`. Hooray. Differential Revision: https://phab.mercurial-scm.org/D10428
Wed, 14 Apr 2021 21:15:22 +0200 debugssl: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:15:22 +0200] rev 46960
debugssl: use `get_unique_pull_path` Let's move this code to the new API. Differential Revision: https://phab.mercurial-scm.org/D10427
Wed, 14 Apr 2021 21:11:39 +0200 debugdiscovery: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:11:39 +0200] rev 46959
debugdiscovery: use `get_unique_pull_path` Lets move this code to the new API. Differential Revision: https://phab.mercurial-scm.org/D10426
Wed, 14 Apr 2021 21:02:38 +0200 profiling: use `util.expandpath` instead of `ui.expandpath` for output
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
Wed, 14 Apr 2021 20:57:34 +0200 dispatch: use the new API to resolve --repository
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
Wed, 14 Apr 2021 20:21:11 +0200 revset: use `get_unique_pull_path` for `remote(…)`
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
Wed, 14 Apr 2021 20:15:09 +0200 remotefilelog: use `get_unique_pull_path` in `getflogheads`
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
Wed, 14 Apr 2021 19:30:48 +0200 summary: use the new APIs
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
Wed, 14 Apr 2021 18:37:29 +0200 share: use `get_clone_path`
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
Wed, 14 Apr 2021 18:02:25 +0200 init: use `get_clone_path` when suitable
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
Wed, 14 Apr 2021 18:34:42 +0200 clone: use `get_clone_path`
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
Wed, 14 Apr 2021 17:41:02 +0200 incoming: kill the `repo._subtoppath =` hack
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
Wed, 14 Apr 2021 17:29:27 +0200 identify: use `get_unique_pull_path`
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
Wed, 14 Apr 2021 17:02:20 +0200 bundle: support multiple destinations
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
Wed, 14 Apr 2021 14:35:13 +0200 lfs: use the new APIs
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
Wed, 14 Apr 2021 13:06:09 +0200 fastannotate: use `get_unique_pull_path`
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
Wed, 14 Apr 2021 12:57:55 +0200 remotefilelog: use the right expandpath in to expand `~`
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
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -28 +28 +50 +100 +300 +1000 +3000 tip