Mercurial > public > mercurial-scm > hg
comparison hgext/extdiff.py @ 36266:1fa33bd848ee
py3: fix bytes-unicode dance while building docstring of extdiff
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 17 Feb 2018 18:14:51 +0900 |
parents | 33ed8b511185 |
children | 08f061a48a8f |
comparison
equal
deleted
inserted
replaced
36265:b44fac3a49fb | 36266:1fa33bd848ee |
---|---|
364 | 364 |
365 def __init__(self, path, cmdline): | 365 def __init__(self, path, cmdline): |
366 # We can't pass non-ASCII through docstrings (and path is | 366 # We can't pass non-ASCII through docstrings (and path is |
367 # in an unknown encoding anyway) | 367 # in an unknown encoding anyway) |
368 docpath = util.escapestr(path) | 368 docpath = util.escapestr(path) |
369 self.__doc__ = self.__doc__ % {'path': util.uirepr(docpath)} | 369 self.__doc__ %= {r'path': pycompat.sysstr(util.uirepr(docpath))} |
370 self._cmdline = cmdline | 370 self._cmdline = cmdline |
371 | 371 |
372 def __call__(self, ui, repo, *pats, **opts): | 372 def __call__(self, ui, repo, *pats, **opts): |
373 opts = pycompat.byteskwargs(opts) | 373 opts = pycompat.byteskwargs(opts) |
374 options = ' '.join(map(util.shellquote, opts['option'])) | 374 options = ' '.join(map(util.shellquote, opts['option'])) |