Mercurial > hg
comparison mercurial/registrar.py @ 30332:318a24b52eeb
spelling: fixes of non-dictionary words
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 17 Oct 2016 23:16:55 +0200 |
parents | 6ffb7e0249f4 |
children | b52e8a4f4c0f |
comparison
equal
deleted
inserted
replaced
30331:b19291e5d506 | 30332:318a24b52eeb |
---|---|
11 pycompat, | 11 pycompat, |
12 util, | 12 util, |
13 ) | 13 ) |
14 | 14 |
15 class _funcregistrarbase(object): | 15 class _funcregistrarbase(object): |
16 """Base of decorator to register a fuction for specific purpose | 16 """Base of decorator to register a function for specific purpose |
17 | 17 |
18 This decorator stores decorated functions into own dict 'table'. | 18 This decorator stores decorated functions into own dict 'table'. |
19 | 19 |
20 The least derived class can be defined by overriding 'formatdoc', | 20 The least derived class can be defined by overriding 'formatdoc', |
21 for example:: | 21 for example:: |
175 class templatekeyword(_templateregistrarbase): | 175 class templatekeyword(_templateregistrarbase): |
176 """Decorator to register template keyword | 176 """Decorator to register template keyword |
177 | 177 |
178 Usage:: | 178 Usage:: |
179 | 179 |
180 templaetkeyword = registrar.templatekeyword() | 180 templatekeyword = registrar.templatekeyword() |
181 | 181 |
182 @templatekeyword('mykeyword') | 182 @templatekeyword('mykeyword') |
183 def mykeywordfunc(repo, ctx, templ, cache, revcache, **args): | 183 def mykeywordfunc(repo, ctx, templ, cache, revcache, **args): |
184 '''Explanation of this template keyword .... | 184 '''Explanation of this template keyword .... |
185 ''' | 185 ''' |