cobalt.py

changeset 42
adbf42ede463
parent 41
aa214b9504de
child 43
637cee1d89f0
equal deleted inserted replaced
41:aa214b9504de 42:adbf42ede463
263 return 263 return
264 264
265 repocheck_timeout[repo_name] = time.time() + (cfg ('hg_checkinterval', 15) * 60) 265 repocheck_timeout[repo_name] = time.time() + (cfg ('hg_checkinterval', 15) * 60)
266 zanrepo = hgapi.Repo (repo_name) 266 zanrepo = hgapi.Repo (repo_name)
267 commit_data = [] 267 commit_data = []
268 delimeter = '@@@@@@@@@@'
268 269
269 try: 270 try:
270 data = zanrepo.hg_command ('incoming', '--quiet', '--template', '{node|short} {desc}\n') 271 data = zanrepo.hg_command ('incoming', '--quiet', '--template',
272 '{node|short} {desc}' + delimeter)
271 except hgapi.hgapi.HgException as e: 273 except hgapi.hgapi.HgException as e:
272 deciphered = decipher_hgapi_error (e) 274 deciphered = decipher_hgapi_error (e)
273 275
274 if deciphered[0] and len(deciphered[1]) > 0: 276 if deciphered[0] and len(deciphered[1]) > 0:
275 chanlog ("error while using hg import on %s: %s" % (repo_name, deciphered[1])) 277 chanlog ("error while using hg import on %s: %s" % (repo_name, deciphered[1]))
279 except Exception as e: 281 except Exception as e:
280 chanlog ("%s" % `e`) 282 chanlog ("%s" % `e`)
281 return 283 return
282 #tried 284 #tried
283 285
284 for line in data.split ('\n'): 286 for line in data.split (delimeter):
285 if line == '': 287 if line == '':
286 continue 288 continue
287 #fi 289 #fi
288 290
289 rex = re.compile (r'^([^ ]+) (.+)$') 291 rex = re.compile (r'^([^ ]+) (.+)$')

mercurial