Mercurial > hg
comparison mercurial/dispatch.py @ 37140:1d56c539794e
py3: bytes/unicode dance on __doc__ of cmdalias
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 28 Mar 2018 22:06:47 +0900 |
parents | aa55c5354b8f |
children | dfc51a482031 |
comparison
equal
deleted
inserted
replaced
37139:aa55c5354b8f | 37140:1d56c539794e |
---|---|
549 self.help = cfg.get('help', defaulthelp or '') | 549 self.help = cfg.get('help', defaulthelp or '') |
550 if self.help and self.help.startswith("hg " + cmd): | 550 if self.help and self.help.startswith("hg " + cmd): |
551 # drop prefix in old-style help lines so hg shows the alias | 551 # drop prefix in old-style help lines so hg shows the alias |
552 self.help = self.help[4 + len(cmd):] | 552 self.help = self.help[4 + len(cmd):] |
553 | 553 |
554 self.__doc__ = cfg.get('doc', fn.__doc__) | 554 doc = cfg.get('doc', pycompat.getdoc(fn)) |
555 if doc is not None: | |
556 doc = pycompat.sysstr(doc) | |
557 self.__doc__ = doc | |
555 | 558 |
556 @property | 559 @property |
557 def args(self): | 560 def args(self): |
558 args = pycompat.maplist(util.expandpath, self.givenargs) | 561 args = pycompat.maplist(util.expandpath, self.givenargs) |
559 return aliasargs(self.fn, args) | 562 return aliasargs(self.fn, args) |