diff --git a/i18n/hggettext b/i18n/hggettext --- a/i18n/hggettext +++ b/i18n/hggettext @@ -119,6 +119,8 @@ def docstrings(path): for func, rstrip in functions: if func.__doc__: + docobj = func # this might be a proxy to provide formatted doc + func = getattr(func, '_origfunc', func) funcmod = inspect.getmodule(func) extra = '' if funcmod.__package__ == funcmod.__name__: @@ -128,8 +130,8 @@ def docstrings(path): src = inspect.getsource(func) name = "%s.%s" % (actualpath, func.__name__) lineno = inspect.getsourcelines(func)[1] - doc = func.__doc__ - origdoc = getattr(func, '_origdoc', '') + doc = docobj.__doc__ + origdoc = getattr(docobj, '_origdoc', '') if rstrip: doc = doc.rstrip() origdoc = origdoc.rstrip() diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -3752,6 +3752,8 @@ def bundlecompressiontopics(): value = docobject() value.__doc__ = doc + value._origdoc = engine.bundletype.__doc__ + value._origfunc = engine.bundletype items[bt[0]] = value