Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 12:41:33 -0800] rev 43673
i18n: get datapath directly from resourceutil
The new resourceutil module is lower in the dependency graph, so we
can depend directly on it and won't have to depend on the util module
to inject the datapath.
Differential Revision: https://phab.mercurial-scm.org/D7435
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 12:33:10 -0800] rev 43672
util: move definition of datapath to resourceutil
Since this means moving the function into a subdirectory, we have to
compensate by adding another layer of os.path.dirname().
Differential Revision: https://phab.mercurial-scm.org/D7434
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 11:52:22 -0800] rev 43671
procutil: move mainfrozen() to new resourceutil.py
The i18n module practically depends on procutil for mainfrozen() but
since procutil depends on i18n, it would be a circular dependency if
i18n depended directly on procutil. The cycle is currently resolved by
having the higher-level util module calculate the "datapath" and
inject it into i18n. Extracting mainfrozen() to a new module lets us
clean up the dependencies.
Differential Revision: https://phab.mercurial-scm.org/D7433
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 17:36:01 -0800] rev 43670
defaults: rename default.d to defaultrc to make it a valid package name
"default.d" is not a valid Python package name, and it needs to be a
valid package name if we want to be able to load the files from here
as resources.
Differential Revision: https://phab.mercurial-scm.org/D7426
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 17:30:52 -0800] rev 43669
help: remove references to default.d/ from user-facing docs
The user doesn't need to know what we call the internal directory and
I'm about to rename it.
Differential Revision: https://phab.mercurial-scm.org/D7425
Manuel Jacob <me@manueljacob.de> [Sun, 17 Nov 2019 19:55:01 +0100] rev 43668
cffi: fix build on Python 3
CFFI expects the arguments to be of type str, which means that the string
literals should not have the `b` prefix.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 16 Nov 2019 20:08:35 +0100] rev 43667
pure: use string for another exception in the pure version of base85
That message does not seems tested, but I am assuming that the same reasoning as
for the previous changeset applies.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 16 Nov 2019 20:07:49 +0100] rev 43666
pure: use string for exception in the pure version of base85
Without this change, running the test with python3 and --pure gives the
following error::
--- /home/marmoute/src/mercurial-dev/tests/test-import-git.t
+++ /home/marmoute/src/mercurial-dev/tests/test-import-git.t.err
@@ -518,7 +518,7 @@
>
> EOF
applying patch from stdin
- abort: could not decode "binary2" binary patch: bad base85 character at position 6
+ abort: could not decode "binary2" binary patch: b'bad base85 character at position 6'
[255]
$ hg revert -aq
To make the cext implementation, we use a "native" string for the exception.
This fix the test failure.