Show More
@@ -69,7 +69,7 b' Install an extension that can sleep and ' | |||||
69 | > from mercurial import registrar, commands |
|
69 | > from mercurial import registrar, commands | |
70 | > cmdtable = {} |
|
70 | > cmdtable = {} | |
71 | > command = registrar.command(cmdtable) |
|
71 | > command = registrar.command(cmdtable) | |
72 | > @command(b'sleep', [], 'hg sleep') |
|
72 | > @command(b'sleep', [], b'hg sleep') | |
73 | > def sleep(ui, *args, **kwargs): |
|
73 | > def sleep(ui, *args, **kwargs): | |
74 | > time.sleep(0.1) |
|
74 | > time.sleep(0.1) | |
75 | > EOF |
|
75 | > EOF | |
@@ -123,13 +123,13 b' profiler extension could be loaded befor' | |||||
123 | > yield |
|
123 | > yield | |
124 | > print('fooprof: end profile') |
|
124 | > print('fooprof: end profile') | |
125 | > def extsetup(ui): |
|
125 | > def extsetup(ui): | |
126 | > ui.write('fooprof: loaded\n') |
|
126 | > ui.write(b'fooprof: loaded\n') | |
127 | > EOF |
|
127 | > EOF | |
128 |
|
128 | |||
129 | $ cat > otherextension.py <<EOF |
|
129 | $ cat > otherextension.py <<EOF | |
130 | > from __future__ import absolute_import |
|
130 | > from __future__ import absolute_import | |
131 | > def extsetup(ui): |
|
131 | > def extsetup(ui): | |
132 | > ui.write('otherextension: loaded\n') |
|
132 | > ui.write(b'otherextension: loaded\n') | |
133 | > EOF |
|
133 | > EOF | |
134 |
|
134 | |||
135 | $ hg init b |
|
135 | $ hg init b |
General Comments 0
You need to be logged in to leave comments.
Login now