# HG changeset patch # User Teemu Piippo # Date 1415565346 -7200 # Node ID 3fd78ed9a19f404bdb0ec1a427f644a32adc5c5b # Parent 1b84de3e0d297d9f148489401b8fff94f902dbef# Parent ecc161d4a6fa9e9042cc09b301e60cbf468630ff - merged the two fixes diff -r ecc161d4a6fa -r 3fd78ed9a19f cobalt.py --- a/cobalt.py Sun Nov 09 20:01:06 2014 +0200 +++ b/cobalt.py Sun Nov 09 22:35:46 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: