Это возможно с помощью extensions.wrapcommand
:
def commit(originalcommit, ui, repo, **opts):
return originalcommit(ui, repo, **opts)
def uisetup(ui):
entry = extensions.wrapcommand(commands.table, "commit", commit)
entry[1].append(('', 'newcommitoption', None, ('Description for the new commit option')))