##// END OF EJS Templates
registrar: clarify the documentation about some byte strings being required...
Matt Harbison -
r46615:c1bb0273 default
parent child Browse files
Show More
@@ -37,7 +37,7 b' class _funcregistrarbase(object):'
37
37
38 keyword = registrar.keyword()
38 keyword = registrar.keyword()
39
39
40 @keyword('bar')
40 @keyword(b'bar')
41 def barfunc(*args, **kwargs):
41 def barfunc(*args, **kwargs):
42 '''Explanation of bar keyword ....
42 '''Explanation of bar keyword ....
43 '''
43 '''
@@ -249,7 +249,7 b' class revsetpredicate(_funcregistrarbase'
249
249
250 revsetpredicate = registrar.revsetpredicate()
250 revsetpredicate = registrar.revsetpredicate()
251
251
252 @revsetpredicate('mypredicate(arg1, arg2[, arg3])')
252 @revsetpredicate(b'mypredicate(arg1, arg2[, arg3])')
253 def mypredicatefunc(repo, subset, x):
253 def mypredicatefunc(repo, subset, x):
254 '''Explanation of this revset predicate ....
254 '''Explanation of this revset predicate ....
255 '''
255 '''
@@ -299,7 +299,7 b' class filesetpredicate(_funcregistrarbas'
299
299
300 filesetpredicate = registrar.filesetpredicate()
300 filesetpredicate = registrar.filesetpredicate()
301
301
302 @filesetpredicate('mypredicate()')
302 @filesetpredicate(b'mypredicate()')
303 def mypredicatefunc(mctx, x):
303 def mypredicatefunc(mctx, x):
304 '''Explanation of this fileset predicate ....
304 '''Explanation of this fileset predicate ....
305 '''
305 '''
@@ -356,7 +356,7 b' class templatekeyword(_templateregistrar'
356 templatekeyword = registrar.templatekeyword()
356 templatekeyword = registrar.templatekeyword()
357
357
358 # new API (since Mercurial 4.6)
358 # new API (since Mercurial 4.6)
359 @templatekeyword('mykeyword', requires={'repo', 'ctx'})
359 @templatekeyword(b'mykeyword', requires={b'repo', b'ctx'})
360 def mykeywordfunc(context, mapping):
360 def mykeywordfunc(context, mapping):
361 '''Explanation of this template keyword ....
361 '''Explanation of this template keyword ....
362 '''
362 '''
@@ -388,7 +388,7 b' class templatefilter(_templateregistrarb'
388
388
389 templatefilter = registrar.templatefilter()
389 templatefilter = registrar.templatefilter()
390
390
391 @templatefilter('myfilter', intype=bytes)
391 @templatefilter(b'myfilter', intype=bytes)
392 def myfilterfunc(text):
392 def myfilterfunc(text):
393 '''Explanation of this template filter ....
393 '''Explanation of this template filter ....
394 '''
394 '''
@@ -420,8 +420,8 b' class templatefunc(_templateregistrarbas'
420
420
421 templatefunc = registrar.templatefunc()
421 templatefunc = registrar.templatefunc()
422
422
423 @templatefunc('myfunc(arg1, arg2[, arg3])', argspec='arg1 arg2 arg3',
423 @templatefunc(b'myfunc(arg1, arg2[, arg3])', argspec=b'arg1 arg2 arg3',
424 requires={'ctx'})
424 requires={b'ctx'})
425 def myfuncfunc(context, mapping, args):
425 def myfuncfunc(context, mapping, args):
426 '''Explanation of this template function ....
426 '''Explanation of this template function ....
427 '''
427 '''
@@ -460,7 +460,7 b' class internalmerge(_funcregistrarbase):'
460
460
461 internalmerge = registrar.internalmerge()
461 internalmerge = registrar.internalmerge()
462
462
463 @internalmerge('mymerge', internalmerge.mergeonly,
463 @internalmerge(b'mymerge', internalmerge.mergeonly,
464 onfailure=None, precheck=None,
464 onfailure=None, precheck=None,
465 binary=False, symlink=False):
465 binary=False, symlink=False):
466 def mymergefunc(repo, mynode, orig, fcd, fco, fca,
466 def mymergefunc(repo, mynode, orig, fcd, fco, fca,
General Comments 0
You need to be logged in to leave comments. Login now