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