Mon, 20 Jul 2020 21:32:10 -0700 templatespec: logcmdutil.templatespec() gets either template or mapfile
Martin von Zweigbergk <martinvonz@google.com> [Mon, 20 Jul 2020 21:32:10 -0700] rev 45289
templatespec: logcmdutil.templatespec() gets either template or mapfile The callers of the function already never pass (non-`None`) values for both, so let's check that and call the new factory functions. Differential Revision: https://phab.mercurial-scm.org/D8846
Thu, 16 Jul 2020 13:33:46 -0700 templatespec: create a factory function for each type there is
Martin von Zweigbergk <martinvonz@google.com> [Thu, 16 Jul 2020 13:33:46 -0700] rev 45288
templatespec: create a factory function for each type there is Most of the arguments to the `templatespec` constructor are mutually exclusive, so each combination creates a different type of templatespec. Let's clarify that by creating factory functions. I've left the callers in `logcmdutil` unchanged for now because they are more complex and `logcmdutil.templatespec()` is slightly higher level in that it is specific to changesets. My larger goal is to add support frozen binaries (specifically PyOxidizer) by adding a specific type of `templatespec` for built-in templates. That will get its own factory function. Differential Revision: https://phab.mercurial-scm.org/D8845
Wed, 29 Jul 2020 10:42:09 -0700 templater: stop accepting a single style to stylemap()
Martin von Zweigbergk <martinvonz@google.com> [Wed, 29 Jul 2020 10:42:09 -0700] rev 45287
templater: stop accepting a single style to stylemap() The code seems to have been for compatibility across d3dbdca92458 (hgweb: don't choke when an inexistent style is requested (issue1901), 2009-11-12). Differential Revision: https://phab.mercurial-scm.org/D8844
Thu, 23 Jul 2020 10:20:48 -0700 formatter: inline a variable assigned from `templater.templater.frommapfile`
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Jul 2020 10:20:48 -0700] rev 45286
formatter: inline a variable assigned from `templater.templater.frommapfile` The variable doesn't get reused and it doesn't help formatting, so I don't see any reason for it. Differential Revision: https://phab.mercurial-scm.org/D8807
Wed, 22 Jul 2020 21:23:46 -0700 templater: don't normalize path separators to '/' when interacting with OS
Martin von Zweigbergk <martinvonz@google.com> [Wed, 22 Jul 2020 21:23:46 -0700] rev 45285
templater: don't normalize path separators to '/' when interacting with OS `_readmapfile()` is about reading a map file from the file system, so we shouldn't use our `util.normpath()`, which also normalizes `os.sep` to '/'. Differential Revision: https://phab.mercurial-scm.org/D8806
Thu, 23 Jul 2020 22:50:20 -0700 formatter: remove now-unnecessary check for file-ness
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Jul 2020 22:50:20 -0700] rev 45284
formatter: remove now-unnecessary check for file-ness `templater.templatepath()` now returns non-`None` only for files, so the caller doesn't have to check. Differential Revision: https://phab.mercurial-scm.org/D8805
Thu, 23 Jul 2020 22:47:55 -0700 templater: make templatepath() not return directory paths
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Jul 2020 22:47:55 -0700] rev 45283
templater: make templatepath() not return directory paths The previous patch added a test showing an unusal error message. This make it more like other error messages. Differential Revision: https://phab.mercurial-scm.org/D8804
Thu, 23 Jul 2020 22:44:18 -0700 tests: show unusual error message for `hg log --style coal`
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Jul 2020 22:44:18 -0700] rev 45282
tests: show unusual error message for `hg log --style coal` It turns out that we show the full path when the given style name matches a subdirectory of `mercurial/templates/`. Differential Revision: https://phab.mercurial-scm.org/D8803
Wed, 22 Jul 2020 10:34:24 -0700 config: remove now-unused `abs` argument from `include` callback
Martin von Zweigbergk <martinvonz@google.com> [Wed, 22 Jul 2020 10:34:24 -0700] rev 45281
config: remove now-unused `abs` argument from `include` callback Differential Revision: https://phab.mercurial-scm.org/D8796
Wed, 22 Jul 2020 10:32:28 -0700 config: re-calculate absolute %include path in `include` callback
Martin von Zweigbergk <martinvonz@google.com> [Wed, 22 Jul 2020 10:32:28 -0700] rev 45280
config: re-calculate absolute %include path in `include` callback This removes the last user of the `abs` argument for the `include` callback. The next patch will remove the argument. Differential Revision: https://phab.mercurial-scm.org/D8795
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip