D7611: py3: pass bytes to `configint` and `configbool`

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Fri Dec 13 13:17:58 EST 2019


Closed by commit rHG578c42f998d9: py3: pass bytes to `configint` and `configbool` (authored by Alphare).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7611?vs=18641&id=18689

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7611/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7611

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -1119,11 +1119,11 @@
             # Force Rayon (Rust parallelism library) to respect the number of
             # workers. This is a temporary workaround until Rust code knows
             # how to read the config file.
-            numcpus = self._ui.configint("worker", "numcpus")
+            numcpus = self._ui.configint(b"worker", b"numcpus")
             if numcpus is not None:
                 encoding.environ.setdefault(b'RAYON_NUM_THREADS', b'%d' % numcpus)
 
-            workers_enabled = self._ui.configbool("worker", "enabled", True)
+            workers_enabled = self._ui.configbool(b"worker", b"enabled", True)
             if not workers_enabled:
                 encoding.environ[b"RAYON_NUM_THREADS"] = b"1"
 



To: Alphare, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list