Sat, 25 Jul 2020 16:13:17 +0200 commitctx: no longer make the storage and added/removed file optional
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 25 Jul 2020 16:13:17 +0200] rev 45327
commitctx: no longer make the storage and added/removed file optional The code using this variable is always using other, stricter, condition before using these value. So it is safe to always carry them along.
Sat, 25 Jul 2020 16:07:38 +0200 commitctx: directly gather p1 and p2 copies in `files`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 25 Jul 2020 16:07:38 +0200] rev 45326
commitctx: directly gather p1 and p2 copies in `files` The only thing we do with the p1copies and p2copies is to pass them around, we we can gather them later and directly stored them in the `ChangingFiles` object.
Sat, 25 Jul 2020 16:02:26 +0200 commitctx: extract sidedata encoding inside its own function
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 25 Jul 2020 16:02:26 +0200] rev 45325
commitctx: extract sidedata encoding inside its own function This part of the code is quite independent from the rest. Thank to the new ChangingFiles object, moving with the rest of the sidedata code (in metadata.py) is simple. The changelog.add method is simply passing the `files` object to the new function. It will be easy to increase/change the data we gather and encode without impacting the changelog method.
Sat, 25 Jul 2020 15:55:09 +0200 commitctx: directly pass a ChangingFiles object to changelog.add
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 25 Jul 2020 15:55:09 +0200] rev 45324
commitctx: directly pass a ChangingFiles object to changelog.add We pass the rich object to the changelog and it read the field it needs.
Sat, 25 Jul 2020 15:49:12 +0200 commitctx: return a richer object from _prepare_files
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 25 Jul 2020 15:49:12 +0200] rev 45323
commitctx: return a richer object from _prepare_files Instead of returning a lot of different list, we introduce a rich object that hold all the file related information. The unique object help with data consistency and simply functions arguments and return. In the rest of this series we will increase usage of this object to simplify more code.
Thu, 06 Aug 2020 10:53:00 -0700 templater: teach template loader to use open_template() function
Martin von Zweigbergk <martinvonz@google.com> [Thu, 06 Aug 2020 10:53:00 -0700] rev 45322
templater: teach template loader to use open_template() function The template loader can apparently load templates from relative paths, so I needed to add that support to `open_template()`. This takes the number of failing tests with PyOxidizer from 54 to 34. Differential Revision: https://phab.mercurial-scm.org/D8907
Thu, 06 Aug 2020 10:52:52 -0700 templater: restructure open_template() a little to prepare for relative paths
Martin von Zweigbergk <martinvonz@google.com> [Thu, 06 Aug 2020 10:52:52 -0700] rev 45321
templater: restructure open_template() a little to prepare for relative paths I found that it was easier to add support for relative paths after this restructuring. It also made it easier to explain each case with a code comment (which I did). Differential Revision: https://phab.mercurial-scm.org/D8906
Thu, 06 Aug 2020 09:50:10 -0700 templater: add exception-raising version of open_template()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 06 Aug 2020 09:50:10 -0700] rev 45320
templater: add exception-raising version of open_template() I'm about to add another caller of `open_template()` (in the template loader). That caller will want to get exceptions instead of `(None, None)` if the template doesn't exist. This patch therefore changes `open_template()` to raise exceptions and adds a new `try_open_template()` that returns the `(None, None)` value. Differential Revision: https://phab.mercurial-scm.org/D8905
Wed, 05 Aug 2020 22:13:51 -0700 templater: replace Py3-only exception types by super-types available in Py2
Martin von Zweigbergk <martinvonz@google.com> [Wed, 05 Aug 2020 22:13:51 -0700] rev 45319
templater: replace Py3-only exception types by super-types available in Py2 As noted by @indygreg, `test-check-pyflakes.t` started failing on Py2 after my recent D8894, because that introduced catching of the Py3-only types `ModuleNotFoundError` and `FileNotFoundError`. Let's switch to less precise types that are also available in Py2. Differential Revision: https://phab.mercurial-scm.org/D8902
Wed, 05 Aug 2020 14:19:42 -0700 hgweb: enable reading styles from resources in frozen binaries
Martin von Zweigbergk <martinvonz@google.com> [Wed, 05 Aug 2020 14:19:42 -0700] rev 45318
hgweb: enable reading styles from resources in frozen binaries All we need to do to read styles from resources is to pass the file-like object we get from `open_template()` on to `frommapfile()`. This takes the number of failing tests with PyOxidizer from 62 to 54. Differential Revision: https://phab.mercurial-scm.org/D8901
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip