diff -r f899af683bbe -r aeb0d0788869 mod_hg.py --- a/mod_hg.py Sat Apr 11 21:02:54 2015 +0300 +++ b/mod_hg.py Sun Apr 19 19:45:42 2015 +0300 @@ -32,10 +32,17 @@ { 'name': 'resolves', - 'description': 'Manually cause a ticket to be resolved by a changeset', + 'description': '''Manually cause a ticket to be resolved by a changeset''', 'args': ' ', 'level': 'admin', # TODO }, + + { + 'name': 'rebuildcommitsdb', + 'description': '''Rebuilds commits.db''', + 'args': None, + 'level': 'admin', + }, ] } @@ -140,7 +147,6 @@ except IOError: pass - repo.hg_command ('revert', '--all') # Remove the email address from the author if possible @@ -211,7 +217,7 @@ command_error (`e`) def cmd_resolves (bot, args, **rest): - try: - HgPoll.announce_ticket_resolved (args['ticket'], args['changeset']) - except Exception as e: - command_error (str (e)) + HgPoll.announce_ticket_resolved (args['ticket'], args['changeset']) + +def cmd_rebuildcommitsdb (bot, args, **rest): + HgPoll.g_CommitsDb.create_new() \ No newline at end of file