# HG changeset patch # User Yuya Nishihara # Date 2018-11-11 10:36:21 # Node ID 691c68bc12228de620912f42d76f38c7772b0ae0 # Parent ffd574c144d2d6cefed19575bbdf99dee5c94907 ui: pass in bytes opts dict to logger.log() This is the convention of the Mercurial API. diff --git a/hgext/logtoprocess.py b/hgext/logtoprocess.py --- a/hgext/logtoprocess.py +++ b/hgext/logtoprocess.py @@ -36,9 +36,6 @@ from __future__ import absolute_import import os -from mercurial import ( - pycompat, -) from mercurial.utils import ( procutil, ) @@ -70,7 +67,7 @@ class processlogger(object): } # keyword arguments get prefixed with OPT_ and uppercased env.update((b'OPT_%s' % key.upper(), value) - for key, value in pycompat.byteskwargs(opts).items()) + for key, value in opts.items()) fullenv = procutil.shellenviron(env) procutil.runbgcommand(script, fullenv, shell=True) diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -1742,6 +1742,7 @@ class ui(object): if not activeloggers: return msg = msgfmt % msgargs + opts = pycompat.byteskwargs(opts) # guard against recursion from e.g. ui.debug() registeredloggers = self._loggers self._loggers = {}