--- a/mod_hgpoll.py Mon Nov 10 02:11:57 2014 +0200 +++ b/mod_hgpoll.py Mon Nov 10 02:30:31 2014 +0200 @@ -2,6 +2,8 @@ from datetime import datetime import hgpoll as HgPoll import re +import bt as Bt +from configfile import Config ModuleData = { 'commands': @@ -27,10 +29,13 @@ ] } +def plural (a): + return '' if a == 1 else 's' + def cmd_checkhg (bot, **rest): HgPoll.force_poll() -def cmd_cset (bot, args, **rest): +def cmd_cset (bot, args, replyto, **rest): repo = Repo ('zandronum-everything') data = "" node = args['key'] @@ -38,7 +43,7 @@ # Possibly we're passed a date version instead. Try find the node for this. try: datetime.strptime (args['key'], '%y%m%d-%H%M') - make_commits_txt() + HgPoll.make_commits_txt() commits_txt = open ('commits.txt', 'r') for line in commits_txt: @@ -82,7 +87,7 @@ author = match.group (1) email = match.group (2) - username = Bt.find_developer_by_email (email) + username = Config.find_developer_by_email (email) if username != '': author = username