[PATCH 2 of 2] color: copy docstring of label() template function to wrapper

Yuya Nishihara yuya at tcha.org
Wed Jun 10 10:06:03 CDT 2015


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1433941695 -32400
#      Wed Jun 10 22:08:15 2015 +0900
# Node ID 9b426dfe48be7d63162f668e342c8abe0077c93c
# Parent  345ebbada28faee5263b09514102553444e6963c
color: copy docstring of label() template function to wrapper

Otherwise label() wouldn't be listed in "hg help template" if color extension
is enabled.

diff --git a/hgext/color.py b/hgext/color.py
--- a/hgext/color.py
+++ b/hgext/color.py
@@ -531,6 +531,7 @@ def uisetup(ui):
         return orig(gitsub, commands, env, stream, cwd)
     extensions.wrapfunction(dispatch, '_runcommand', colorcmd)
     extensions.wrapfunction(subrepo.gitsubrepo, '_gitnodir', colorgit)
+    templatelabel.__doc__ = templater.funcs['label'].__doc__
     templater.funcs['label'] = templatelabel
 
 def extsetup(ui):


More information about the Mercurial-devel mailing list