30 'level': 'admin', |
30 'level': 'admin', |
31 }, |
31 }, |
32 |
32 |
33 { |
33 { |
34 'name': 'resolves', |
34 'name': 'resolves', |
35 'description': 'Manually cause a ticket to be resolved by a changeset', |
35 'description': '''Manually cause a ticket to be resolved by a changeset''', |
36 'args': '<ticket> <changeset>', |
36 'args': '<ticket> <changeset>', |
37 'level': 'admin', # TODO |
37 'level': 'admin', # TODO |
|
38 }, |
|
39 |
|
40 { |
|
41 'name': 'rebuildcommitsdb', |
|
42 'description': '''Rebuilds commits.db''', |
|
43 'args': None, |
|
44 'level': 'admin', |
38 }, |
45 }, |
39 ] |
46 ] |
40 } |
47 } |
41 |
48 |
42 def plural (a): |
49 def plural (a): |
209 command_error (result[1]) |
215 command_error (result[1]) |
210 else: |
216 else: |
211 command_error (`e`) |
217 command_error (`e`) |
212 |
218 |
213 def cmd_resolves (bot, args, **rest): |
219 def cmd_resolves (bot, args, **rest): |
214 try: |
220 HgPoll.announce_ticket_resolved (args['ticket'], args['changeset']) |
215 HgPoll.announce_ticket_resolved (args['ticket'], args['changeset']) |
221 |
216 except Exception as e: |
222 def cmd_rebuildcommitsdb (bot, args, **rest): |
217 command_error (str (e)) |
223 HgPoll.g_CommitsDb.create_new() |