mercurial/dispatch.py
changeset 37140 1d56c539794e
parent 37139 aa55c5354b8f
child 37716 dfc51a482031
--- 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):