diff -r 9e483447654b -r 6c0609395889 mod_hg.py --- a/mod_hg.py Mon Jan 12 02:44:56 2015 -0500 +++ b/mod_hg.py Mon Jan 12 10:55:45 2015 +0200 @@ -15,24 +15,34 @@ 'args': None, 'level': 'admin', }, + { 'name': 'cset', 'description': 'Yields changeset information (use a hash or date as key)', 'args': '', 'level': 'normal', }, + { 'name': 'hg', 'description': 'Executes a hg command', 'args': ' ', 'level': 'admin', }, + { 'name': 'resolves', 'description': 'Manually cause a ticket to be resolved by a changeset', 'args': ' ', - 'level': 'admin', + 'level': 'admin', # TODO }, + + { + 'name': 'compress', + 'description': 'Compresses a head on the sandbox repositories.', + 'args': '', + 'level': 'admin', # TODO + } ] } @@ -170,11 +180,11 @@ else: command_error (`e`) -def cmd_hg (bot, args, **rest): +def cmd_hg (bot, args, reply, **rest): try: repo = hgapi.Repo (args['repo']) result = repo.hg_command (*args['command']) - reply (replyto, result) + reply (result) except hgapi.hgapi.HgException as e: result = HgPoll.decipher_hgapi_error (e) @@ -183,7 +193,7 @@ else: command_error (`e`) -def cmd_resolves (bot, args, replyto, **rest): +def cmd_resolves (bot, args, **rest): try: HgPoll.announce_ticket_resolved (args['ticket'], args['changeset']) except Exception as e: