문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top