Thu, 31 Dec 2020 19:24:23 +0530 upgrade: remove unnecessary `is None` check
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 31 Dec 2020 19:24:23 +0530] rev 46221
upgrade: remove unnecessary `is None` check `upgrade_engine.upgrade()` always return the `backuppath` value and there are not early returns. Hence I don't see how `backuppath` can be None. Adding extra unncessary safe checks hides unknown bugs. Hence removing it. Differential Revision: https://phab.mercurial-scm.org/D9675
Thu, 31 Dec 2020 14:45:16 +0530 engine: refactor code to replace stores in separate function
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 31 Dec 2020 14:45:16 +0530] rev 46220
engine: refactor code to replace stores in separate function In not all upgrades, we need to change the whole store. For example, when upgrading repository to share-safe mode, we don't touch revlogs at all hence store cloning and copying is not required. The store replacing code needs to be made aware about what all has changed and hence only copy/rename those things. To kickstart that, this patch moves existing logic into a separate function. Differential Revision: https://phab.mercurial-scm.org/D9674
Thu, 31 Dec 2020 14:10:25 +0530 engine: make hook point for extension a public function
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 31 Dec 2020 14:10:25 +0530] rev 46219
engine: make hook point for extension a public function Well there are no private public functions in Python, but we generally treat functions and variables starting with `_` as private ones. A function which needs to be overrided in extension should be a public one. Differential Revision: https://phab.mercurial-scm.org/D9672
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -3 +3 +10 +30 +100 +300 +1000 +3000 tip