Thu, 30 Jul 2020 12:22:41 -0700 templatespec: use new factory functions in hooklib
Martin von Zweigbergk <martinvonz@google.com> [Thu, 30 Jul 2020 12:22:41 -0700] rev 45268
templatespec: use new factory functions in hooklib Differential Revision: https://phab.mercurial-scm.org/D8853
Mon, 20 Jul 2020 22:43:33 -0700 templatespec: use new factory functions in logcmdutil
Martin von Zweigbergk <martinvonz@google.com> [Mon, 20 Jul 2020 22:43:33 -0700] rev 45267
templatespec: use new factory functions in logcmdutil Differential Revision: https://phab.mercurial-scm.org/D8848
Mon, 20 Jul 2020 21:33:28 -0700 templatespec: move check for non-unicode to lower-level function
Martin von Zweigbergk <martinvonz@google.com> [Mon, 20 Jul 2020 21:33:28 -0700] rev 45266
templatespec: move check for non-unicode to lower-level function Now that we have the factory functions, it makes sense to have the check there. Differential Revision: https://phab.mercurial-scm.org/D8847
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 45265
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 45264
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 45263
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 45262
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 45261
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 45260
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 45259
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
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip