Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial Extension with no/default options

Say I want an extension that I can execute as follows: hg sayhi

I tried the following, but it tells me there are invalid arguments:

def sayhi(ui, repo, node, **opts):    
  """Says Hello"""
  ui.write("hi")

cmdtable = {                     
    "sayhi":  (sayhi, [], '')
}

It seems no matter what I do, I need to give it an option like hg sayhi s. Is there anyway to do this?

like image 582
Andre Avatar asked Nov 25 '10 07:11

Andre


1 Answers

Ok, got a fix. I removed the node parameter from the method signature and it works.

like image 154
Andre Avatar answered Sep 23 '22 23:09

Andre