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
Mon, 06 Jul 2020 22:46:49 +0200 commitctx: move a tiny else clause above the very long one
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Jul 2020 22:46:49 +0200] rev 45197
commitctx: move a tiny else clause above the very long one This is simple to have all the simple case unfold before the 100+ line one. Otherwise it is hard to relate the `else` to the initial conditionnal. 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/D8708
Mon, 06 Jul 2020 22:37:53 +0200 commitctx: consider removed as touched
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Jul 2020 22:37:53 +0200] rev 45196
commitctx: consider removed as touched This achieve the same result with clearer code. 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/D8707
Mon, 06 Jul 2020 22:35:34 +0200 commitctx: rename "changed" to touched
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Jul 2020 22:35:34 +0200] rev 45195
commitctx: rename "changed" to touched The variable contains content that are both added and modified. "changed" could be confused with "modified" only, so we pick a less ambiguous naming that will help with more unification. For example, it would make sense to shove the "removed" item in there since this is how the variable is used. 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/D8706
Tue, 07 Jul 2020 11:16:28 +0200 commitctx: more filesremoved assignment closer to removed computation
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 07 Jul 2020 11:16:28 +0200] rev 45194
commitctx: more filesremoved assignment closer to removed computation A small change that makes the code flow clearer. 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/D8704
Mon, 06 Jul 2020 20:03:30 +0200 commitctx: compute files added from _filecommit returns
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Jul 2020 20:03:30 +0200] rev 45193
commitctx: compute files added from _filecommit returns When possible, lets avoid recomputing the same information again. 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/D8703
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip