Submitter | Yuya Nishihara |
---|---|
Date | June 10, 2015, 3:06 p.m. |
Message ID | <9b426dfe48be7d63162f.1433948763@mimosa> |
Download | mbox | patch |
Permalink | /patch/9580/ |
State | Accepted |
Headers | show |
Comments
On 06/10/2015 08:06 AM, Yuya Nishihara wrote: > # HG changeset patch > # User Yuya Nishihara <yuya@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. Pushed to the clowncopter, thanks.
On Thu, 2015-06-11 at 00:06 +0900, Yuya Nishihara wrote: > # HG changeset patch > # User Yuya Nishihara <yuya@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. We should probably build this into wrapfunction.
On Thu, 11 Jun 2015 17:54:09 -0500, Matt Mackall wrote: > On Thu, 2015-06-11 at 00:06 +0900, Yuya Nishihara wrote: > > # HG changeset patch > > # User Yuya Nishihara <yuya@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. > > We should probably build this into wrapfunction. I'm going to merge color.templatelabel() with templater.label().
Patch
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):