hgpoll.py

changeset 109
87ad0c1b3405
parent 108
8cf31b4d5fcb
child 110
b2770c43b752
equal deleted inserted replaced
108:8cf31b4d5fcb 109:87ad0c1b3405
241 usesandbox = repo_name == 'zandronum-sandbox' or repo_name == 'zandronum-sandbox-stable' 241 usesandbox = repo_name == 'zandronum-sandbox' or repo_name == 'zandronum-sandbox-stable'
242 repo_owner = 'Torr_Samaho' if not usesandbox else 'crimsondusk' 242 repo_owner = 'Torr_Samaho' if not usesandbox else 'crimsondusk'
243 zanrepo = hgapi.Repo (repo_name) 243 zanrepo = hgapi.Repo (repo_name)
244 commit_data = [] 244 commit_data = []
245 delimeter = '@@@@@@@@@@' 245 delimeter = '@@@@@@@@@@'
246 print 'Checking %s for updates' % repo_name 246 # print 'Checking %s for updates' % repo_name
247 247
248 try: 248 try:
249 data = zanrepo.hg_command ('incoming', '--quiet', '--template', 249 data = zanrepo.hg_command ('incoming', '--quiet', '--template',
250 '{node|short} {desc}' + delimeter) 250 '{node|short} {desc}' + delimeter)
251 except hgapi.hgapi.HgException as e: 251 except hgapi.hgapi.HgException as e:
291 291
292 # Drop commits that we already have 292 # Drop commits that we already have
293 i = 0 293 i = 0
294 while i < len (commit_data): 294 while i < len (commit_data):
295 try: 295 try:
296 zanrepo.hg_command ('log', '-r' commit_data[i][0]) 296 zanrepo.hg_command ('log', '-r', commit_data[i][0])
297 del commit_data[i] 297 del commit_data[i]
298 except: 298 except:
299 i += 1 299 i += 1
300 300
301 pull_args = []; 301 pull_args = [];

mercurial