mercurial/registrar.py
changeset 43115 4aa72cdf616f
parent 43077 687b865b95ad
child 45403 6a0e7bf73bb2
equal deleted inserted replaced
43114:8197b395710e 43115:4aa72cdf616f
    63 
    63 
    64         if name in self._table:
    64         if name in self._table:
    65             msg = b'duplicate registration for name: "%s"' % name
    65             msg = b'duplicate registration for name: "%s"' % name
    66             raise error.ProgrammingError(msg)
    66             raise error.ProgrammingError(msg)
    67 
    67 
    68         if func.__doc__ and not util.safehasattr(func, b'_origdoc'):
    68         if func.__doc__ and not util.safehasattr(func, '_origdoc'):
    69             func._origdoc = func.__doc__.strip()
    69             func._origdoc = func.__doc__.strip()
    70             doc = pycompat.sysbytes(func._origdoc)
    70             doc = pycompat.sysbytes(func._origdoc)
    71             func.__doc__ = pycompat.sysstr(self._formatdoc(decl, doc))
    71             func.__doc__ = pycompat.sysstr(self._formatdoc(decl, doc))
    72 
    72 
    73         self._table[name] = func
    73         self._table[name] = func