| 228 #enddef |
228 #enddef |
| 229 |
229 |
| 230 check_repo_exists ('zandronum', 'Torr_Samaho') |
230 check_repo_exists ('zandronum', 'Torr_Samaho') |
| 231 check_repo_exists ('zandronum-stable', 'Torr_Samaho') |
231 check_repo_exists ('zandronum-stable', 'Torr_Samaho') |
| 232 check_repo_exists ('zandronum-sandbox', 'crimsondusk') |
232 check_repo_exists ('zandronum-sandbox', 'crimsondusk') |
| 233 |
233 check_repo_exists ('zandronum-sandbox-stable', 'crimsondusk') |
| 234 repocheck_timeout = {'zandronum':(time.time()) + 15, 'zandronum-stable':(time.time() + 15), 'zandronum-sandbox':(time.time()) + 15} |
234 |
| |
235 repocheck_timeout = {'zandronum':(time.time()) + 15, 'zandronum-stable':(time.time() + 15), 'zandronum-sandbox':(time.time()) + 15, 'zandronum-sandbox-stable':(time.time()) + 15} |
| 235 |
236 |
| 236 def get_commit_data (zanrepo, rev, template): |
237 def get_commit_data (zanrepo, rev, template): |
| 237 return zanrepo.hg_command ('log', '-l', '1', '-r', rev, '--template', template) |
238 return zanrepo.hg_command ('log', '-l', '1', '-r', rev, '--template', template) |
| 238 #enddef |
239 #enddef |
| 239 |
240 |
| 290 global suds_client |
291 global suds_client |
| 291 global g_config |
292 global g_config |
| 292 global g_clients |
293 global g_clients |
| 293 |
294 |
| 294 usestable = repo_name == 'zandronum-stable' |
295 usestable = repo_name == 'zandronum-stable' |
| 295 usesandbox = repo_name == 'zandronum-sandbox' |
296 usesandbox = repo_name == 'zandronum-sandbox' or repo_name == 'zandronum-sandbox-stable' |
| 296 repo_owner = 'Torr_Samaho' if not usesandbox else 'crimsondusk' |
297 repo_owner = 'Torr_Samaho' if not usesandbox else 'crimsondusk' |
| 297 repo_url = 'https://bitbucket.org/%s/%s' % (repo_owner, repo_name) |
298 repo_url = 'https://bitbucket.org/%s/%s' % (repo_owner, repo_name) |
| 298 num_commits = 0 |
299 num_commits = 0 |
| 299 |
300 |
| 300 if time.time() < repocheck_timeout[repo_name]: |
301 if time.time() < repocheck_timeout[repo_name]: |
| 356 devrepo = hgapi.Repo ('zandronum') |
357 devrepo = hgapi.Repo ('zandronum') |
| 357 pull_args.insert (1, '../zandronum-stable') |
358 pull_args.insert (1, '../zandronum-stable') |
| 358 devrepo.hg_command (*pull_args) |
359 devrepo.hg_command (*pull_args) |
| 359 #fi |
360 #fi |
| 360 |
361 |
| 361 # Pull everything into sandbox too |
362 # Pull everything into sandboxes too |
| 362 if not usesandbox: |
363 if not usesandbox: |
| 363 devrepo = hgapi.Repo ('zandronum-sandbox') |
364 devrepo = hgapi.Repo ('zandronum-sandbox') |
| |
365 pull_args.insert (1, '../%s' % repo_name) |
| |
366 devrepo.hg_command (*pull_args) |
| |
367 |
| |
368 devrepo = hgapi.Repo ('zandronum-sandbox-stable') |
| 364 pull_args.insert (1, '../%s' % repo_name) |
369 pull_args.insert (1, '../%s' % repo_name) |
| 365 devrepo.hg_command (*pull_args) |
370 devrepo.hg_command (*pull_args) |
| 366 #fi |
371 #fi |
| 367 except Exception as e: |
372 except Exception as e: |
| 368 chanlog ('Warning: unable to pull: %s' % `e`) |
373 chanlog ('Warning: unable to pull: %s' % `e`) |
| 651 |
656 |
| 652 # Check for new issues on the bugtracker |
657 # Check for new issues on the bugtracker |
| 653 bt_checklatest() |
658 bt_checklatest() |
| 654 |
659 |
| 655 # Check for new commits in the repositories |
660 # Check for new commits in the repositories |
| 656 for n in ['zandronum-stable', 'zandronum', 'zandronum-sandbox']: |
661 for n in ['zandronum-stable', 'zandronum', 'zandronum-sandbox', 'zandronum-sandbox-stable']: |
| 657 process_zan_repo_updates (n) |
662 process_zan_repo_updates (n) |
| 658 |
663 |
| 659 def channel_by_name (self, name): |
664 def channel_by_name (self, name): |
| 660 for channel in self.channels: |
665 for channel in self.channels: |
| 661 if channel['name'].upper() == args[0].upper(): |
666 if channel['name'].upper() == args[0].upper(): |
| 963 self.privmsg (replyto, 'No dev emails.') |
968 self.privmsg (replyto, 'No dev emails.') |
| 964 #fi |
969 #fi |
| 965 elif command == 'checkhg': |
970 elif command == 'checkhg': |
| 966 check_admin (sender, ident, host, command) |
971 check_admin (sender, ident, host, command) |
| 967 global repocheck_timeout |
972 global repocheck_timeout |
| 968 repocheck_timeout = {'zandronum':0, 'zandronum-stable':0, 'zandronum-sandbox':0} |
973 repocheck_timeout = {'zandronum':0, 'zandronum-stable':0, 'zandronum-sandbox':0, 'zandronum-sandbox-stable':0} |
| 969 |
974 |
| 970 for n in ['zandronum-stable', 'zandronum', 'zandronum-sandbox']: |
975 for n in ['zandronum-stable', 'zandronum', 'zandronum-sandbox', 'zandronum-sandbox-stable']: |
| 971 numcommits = process_zan_repo_updates (n) |
976 numcommits = process_zan_repo_updates (n) |
| 972 |
977 |
| 973 if numcommits == 0: |
978 if numcommits == 0: |
| 974 self.privmsg (replyto, 'No new commits in ' + n) |
979 self.privmsg (replyto, 'No new commits in ' + n) |
| 975 #fi |
980 #fi |