# HG changeset patch # User Yuya Nishihara # Date 1522242407 -32400 # Node ID 1d56c539794e7e0bef4eb9bb27cf85d9dc8ba887 # Parent aa55c5354b8f43b874e045bbf46df86a8c3ab0ef py3: bytes/unicode dance on __doc__ of cmdalias diff -r aa55c5354b8f -r 1d56c539794e mercurial/dispatch.py --- a/mercurial/dispatch.py Wed Mar 28 22:04:45 2018 +0900 +++ b/mercurial/dispatch.py Wed Mar 28 22:06:47 2018 +0900 @@ -551,7 +551,10 @@ # drop prefix in old-style help lines so hg shows the alias self.help = self.help[4 + len(cmd):] - self.__doc__ = cfg.get('doc', fn.__doc__) + doc = cfg.get('doc', pycompat.getdoc(fn)) + if doc is not None: + doc = pycompat.sysstr(doc) + self.__doc__ = doc @property def args(self):