Augie Fackler <augie@google.com> [Wed, 22 Jul 2020 22:09:38 -0400] rev 45205
merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 07 Jul 2020 00:18:15 +0200] rev 45204
commitctx: extract _filecommit too
This function is exclusively used in `commitctx`. So we should extract it too
for consistency and to reduce the `localrepo` bloat.
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/D8710
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
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
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
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
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