mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
a25521a48b
Reviewed By: quark-zju, ikostia Differential Revision: D23151936 fbshipit-source-id: f5dc1bf1e2007fe82c8ea67fa94c7b5aa3fd9a0c
16 lines
490 B
Perl
16 lines
490 B
Perl
#chg-compatible
|
|
|
|
$ cat >> foo.py << EOF
|
|
> from edenscm.mercurial import registrar
|
|
> cmdtable = {}
|
|
> command = registrar.command(cmdtable)
|
|
> @command('foo', [], norepo=True)
|
|
> def foo(ui):
|
|
> ui.write('This is the foo command\n')
|
|
> EOF
|
|
|
|
$ setconfig "extensions.foo=python-base64:`hg debugsh -c 'import base64; ui.writebytes(base64.b64encode(open(\"foo.py\", \"rb\").read()).decode("utf-8").replace(\"\\n\",\"\").encode("utf-8"))'`"
|
|
|
|
$ hg foo
|
|
This is the foo command
|