Mon, 06 Jul 2020 23:14:52 +0200 commitctx: extract the function in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Jul 2020 23:14:52 +0200] rev 45203
commitctx: extract the function in a dedicated module the function have few callers (< 15) is quite long a mostly independent from the repository itself. It seems like a good candidate to reduce the bloatness of the localrepository class. Extracting it will help us cleaning the code up and splitting it into more reasonable-size function. We don't use a copy trick because the amount of code extract is quite small (<5%) and the de-indent means every single line change anyway. So this is not deemed valuable to do so. This is part of a larger refactoring/cleanup of the commitctx code to clarify and augment the logic gathering metadata useful for copy tracing. The current code is a tad too long and entangled to make such update easy. Differential Revision: https://phab.mercurial-scm.org/D8709
Mon, 06 Jul 2020 19:13:19 +0200 commitctx: document a fast path in _filecommit
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Jul 2020 19:13:19 +0200] rev 45202
commitctx: document a fast path in _filecommit This block cut off a lot of logic, documenting the why and how seems useful to future reader. This is part of a larger refactoring/cleanup of the commitctx code to clarify and augment the logic gathering metadata useful for copy tracing. The current code is a tad too long and entangled to make such update easy. We start with easy and small cleanup. Differential Revision: https://phab.mercurial-scm.org/D8700
Tue, 21 Jul 2020 13:36:48 -0700 hgweb: simplify now that we always have a single path
Martin von Zweigbergk <martinvonz@google.com> [Tue, 21 Jul 2020 13:36:48 -0700] rev 45201
hgweb: simplify now that we always have a single path Both `templatedir()` and `web.templatepath` are now always a single path (or None). Differential Revision: https://phab.mercurial-scm.org/D8788
Tue, 21 Jul 2020 13:41:26 -0700 templater: simplify stylemap() now that templatedir() returns a single path
Martin von Zweigbergk <martinvonz@google.com> [Tue, 21 Jul 2020 13:41:26 -0700] rev 45200
templater: simplify stylemap() now that templatedir() returns a single path Differential Revision: https://phab.mercurial-scm.org/D8787
Tue, 21 Jul 2020 13:11:49 -0700 templater: make templatepaths() return a single path, or None
Martin von Zweigbergk <martinvonz@google.com> [Tue, 21 Jul 2020 13:11:49 -0700] rev 45199
templater: make templatepaths() return a single path, or None The function returns either a singleton list or an empty list, so it makes more sense to return a value or None. The plural in the name also doesn't make sense, but `templatepath()` is already taken, so I renamed it to `templatedir()` instead. Differential Revision: https://phab.mercurial-scm.org/D8786
Tue, 21 Jul 2020 13:05:37 -0700 templater: simplify templatepaths() to avoid iterating a singleton list
Martin von Zweigbergk <martinvonz@google.com> [Tue, 21 Jul 2020 13:05:37 -0700] rev 45198
templater: simplify templatepaths() to avoid iterating a singleton list The function iterates over a hard-coded list of one element since d844e220792a (templater: don't search randomly for templates - trust util.datapath, 2014-09-28). Differential Revision: https://phab.mercurial-scm.org/D8785
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -6 +6 +10 +30 +100 +300 +1000 +3000 tip