Show More
@@ -53,29 +53,29 b' class exthelper(object):' | |||
|
53 | 53 | revsetpredicate = eh.revsetpredicate |
|
54 | 54 | templatekeyword = eh.templatekeyword |
|
55 | 55 | |
|
56 | @eh.command('mynewcommand', | |
|
57 | [('r', 'rev', [], _('operate on these revisions'))], | |
|
58 | _('-r REV...'), | |
|
56 | @eh.command(b'mynewcommand', | |
|
57 | [(b'r', b'rev', [], _(b'operate on these revisions'))], | |
|
58 | _(b'-r REV...'), | |
|
59 | 59 | helpcategory=command.CATEGORY_XXX) |
|
60 | 60 | def newcommand(ui, repo, *revs, **opts): |
|
61 | 61 | # implementation goes here |
|
62 | 62 | |
|
63 | eh.configitem('experimental', 'foo', | |
|
63 | eh.configitem(b'experimental', b'foo', | |
|
64 | 64 | default=False, |
|
65 | 65 | ) |
|
66 | 66 | |
|
67 | @eh.filesetpredicate('lfs()') | |
|
67 | @eh.filesetpredicate(b'lfs()') | |
|
68 | 68 | def filesetbabar(mctx, x): |
|
69 | 69 | return mctx.predicate(...) |
|
70 | 70 | |
|
71 | @eh.revsetpredicate('hidden') | |
|
71 | @eh.revsetpredicate(b'hidden') | |
|
72 | 72 | def revsetbabar(repo, subset, x): |
|
73 | args = revset.getargs(x, 0, 0, 'babar accept no argument') | |
|
74 | return [r for r in subset if 'babar' in repo[r].description()] | |
|
73 | args = revset.getargs(x, 0, 0, b'babar accept no argument') | |
|
74 | return [r for r in subset if b'babar' in repo[r].description()] | |
|
75 | 75 | |
|
76 | @eh.templatekeyword('babar') | |
|
76 | @eh.templatekeyword(b'babar') | |
|
77 | 77 | def kwbabar(ctx): |
|
78 | return 'babar' | |
|
78 | return b'babar' | |
|
79 | 79 | """ |
|
80 | 80 | |
|
81 | 81 | def __init__(self): |
@@ -160,7 +160,7 b' class exthelper(object):' | |||
|
160 | 160 | The following operations belong here: |
|
161 | 161 | |
|
162 | 162 | - Changes depending on the status of other extensions. (if |
|
163 | extensions.find('mq')) | |
|
163 | extensions.find(b'mq')) | |
|
164 | 164 | - Add a global option to all commands |
|
165 | 165 | """ |
|
166 | 166 | knownexts = {} |
@@ -203,7 +203,7 b' class exthelper(object):' | |||
|
203 | 203 | |
|
204 | 204 | @eh.uisetup |
|
205 | 205 | def setupbabar(ui): |
|
206 |
print |
|
|
206 | print('this is uisetup!') | |
|
207 | 207 | """ |
|
208 | 208 | self._uicallables.append(call) |
|
209 | 209 | return call |
@@ -215,7 +215,7 b' class exthelper(object):' | |||
|
215 | 215 | |
|
216 | 216 | @eh.uipopulate |
|
217 | 217 | def setupfoo(ui): |
|
218 |
print |
|
|
218 | print('this is uipopulate!') | |
|
219 | 219 | """ |
|
220 | 220 | self._uipopulatecallables.append(call) |
|
221 | 221 | return call |
@@ -227,7 +227,7 b' class exthelper(object):' | |||
|
227 | 227 | |
|
228 | 228 | @eh.extsetup |
|
229 | 229 | def setupcelestine(ui): |
|
230 |
print |
|
|
230 | print('this is extsetup!') | |
|
231 | 231 | """ |
|
232 | 232 | self._extcallables.append(call) |
|
233 | 233 | return call |
@@ -239,7 +239,7 b' class exthelper(object):' | |||
|
239 | 239 | |
|
240 | 240 | @eh.reposetup |
|
241 | 241 | def setupzephir(ui, repo): |
|
242 |
print |
|
|
242 | print('this is reposetup!') | |
|
243 | 243 | """ |
|
244 | 244 | self._repocallables.append(call) |
|
245 | 245 | return call |
@@ -258,9 +258,9 b' class exthelper(object):' | |||
|
258 | 258 | |
|
259 | 259 | example:: |
|
260 | 260 | |
|
261 | @eh.wrapcommand('summary') | |
|
261 | @eh.wrapcommand(b'summary') | |
|
262 | 262 | def wrapsummary(orig, ui, repo, *args, **kwargs): |
|
263 | ui.note('Barry!') | |
|
263 | ui.note(b'Barry!') | |
|
264 | 264 | return orig(ui, repo, *args, **kwargs) |
|
265 | 265 | |
|
266 | 266 | The `opts` argument allows specifying a list of tuples for additional |
@@ -298,9 +298,9 b' class exthelper(object):' | |||
|
298 | 298 | |
|
299 | 299 | example:: |
|
300 | 300 | |
|
301 | @eh.function(discovery, 'checkheads') | |
|
301 | @eh.function(discovery, b'checkheads') | |
|
302 | 302 | def wrapfunction(orig, *args, **kwargs): |
|
303 | ui.note('His head smashed in and his heart cut out') | |
|
303 | ui.note(b'His head smashed in and his heart cut out') | |
|
304 | 304 | return orig(*args, **kwargs) |
|
305 | 305 | """ |
|
306 | 306 |
General Comments 0
You need to be logged in to leave comments.
Login now