Skip to content

Instantly share code, notes, and snippets.

@hashimotor
Created May 28, 2012 15:09
Show Gist options
  • Save hashimotor/2819644 to your computer and use it in GitHub Desktop.
Save hashimotor/2819644 to your computer and use it in GitHub Desktop.
HG foo
[extensions]
foo = /path/to/foo.py
# Thanks to http://aru-and-dhi.blogspot.jp/2009/12/mercurial.html
from mercurial import hg
def foo(ui, node, **opts):
""" Say foo! """
ui.write("Fooooooo!!!\n")
cmdtable={
"foo": (foo, [], "")
}
$ mkdir foo
$ cd foo
$ hg init
$ hg foo
Fooooooo!!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment