# HG changeset patch # User Teemu Piippo # Date 1415565181 -7200 # Node ID 1b84de3e0d297d9f148489401b8fff94f902dbef # Parent f8cc57c608e2e5af58d28124962f28b6616c3efd - fixed commit processing diff -r f8cc57c608e2 -r 1b84de3e0d29 cobalt.py --- a/cobalt.py Sun Nov 09 19:18:58 2014 +0200 +++ b/cobalt.py Sun Nov 09 22:33:01 2014 +0200 @@ -320,14 +320,21 @@ ' Retrieves and processes commits for zandronum repositories ' ' Ensure both repositories are OK before using this! ' def process_zan_repo_updates(): + global repocheck_timeout + if time.time() < repocheck_timeout: + return + for n in ['zandronum-stable', 'zandronum', 'zandronum-sandbox', 'zandronum-sandbox-stable']: process_one_repo (n) + + hgns = Config.get_node ('hg') + repocheck_timeout = time.time() + hgns.get_value ('checkinterval', default=15) * 60 def process_one_repo (repo_name): global repocheck_timeout global suds_client global g_clients - + hgns = Config.get_node ('hg') if not hgns.get_value ('track', default=True): @@ -339,14 +346,10 @@ repo_url = 'https://bitbucket.org/%s/%s' % (repo_owner, repo_name) num_commits = 0 btuser, btpassword = bt_credentials() - - if time.time() < repocheck_timeout: - return - - repocheck_timeout = time.time() + hgns.get_value ('checkinterval', default=15) * 60 zanrepo = hgapi.Repo (repo_name) commit_data = [] delimeter = '@@@@@@@@@@' + print 'Checking %s for updates' % repo_name try: data = zanrepo.hg_command ('incoming', '--quiet', '--template', @@ -423,6 +426,7 @@ for commit in commit_data: commit_node = commit[0] commit_message = commit[1] + print 'Processing new commit: %s' % commit_node try: if usesandbox: