- fixed commit processing

Sun, 09 Nov 2014 22:33:01 +0200

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Sun, 09 Nov 2014 22:33:01 +0200
changeset 69
1b84de3e0d29
parent 67
f8cc57c608e2
child 70
3fd78ed9a19f

- fixed commit processing

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

mercurial