# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2016-10-08 14:10:58 # Node ID aa23c93e636d1045b932588cdb742cce6fd62313 # Parent 87b8e40eb8125d5ddc848d972b117989346057dd py3: make format strings unicodes and not bytes Fixes issues on Python 3, wherein docstrings are unicodes. Shouldn't break anything on Python 2. diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py --- a/mercurial/filemerge.py +++ b/mercurial/filemerge.py @@ -19,6 +19,7 @@ from . import ( error, formatter, match, + pycompat, scmutil, simplemerge, tagmerge, @@ -93,7 +94,8 @@ def internaltool(name, mergetype, onfail '''return a decorator for populating internal merge tool table''' def decorator(func): fullname = ':' + name - func.__doc__ = "``%s``\n" % fullname + func.__doc__.strip() + func.__doc__ = (pycompat.sysstr("``%s``\n" % fullname) + + func.__doc__.strip()) internals[fullname] = func internals['internal:' + name] = func internalsdoc[fullname] = func