mirror of
https://github.com/facebook/sapling.git
synced 2024-12-26 22:47:26 +03:00
36ff5d6a7d
Summary: We need to encode/decode utf8 when reading/writing to the hgrc file. Reviewed By: DurhamG Differential Revision: D20286068 fbshipit-source-id: b1d6828fb62a83ad22414de6883004411f302142
16 lines
460 B
Perl
16 lines
460 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:`python -c 'import base64; print(base64.b64encode(open(\"foo.py\", "rb").read()).decode("utf-8").replace(\"\\n\",\"\"))'`"
|
|
|
|
$ hg foo
|
|
This is the foo command
|