- merged the two fixes

Sun, 09 Nov 2014 22:35:46 +0200

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Sun, 09 Nov 2014 22:35:46 +0200
changeset 70
3fd78ed9a19f
parent 69
1b84de3e0d29 (diff)
parent 68
ecc161d4a6fa (current diff)
child 71
5ac56e71d820

- merged the two fixes

cobalt.py file | annotate | diff | comparison | revisions
--- 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:

mercurial