Sun, 05 Oct 2014 23:33:29 +0300
- use a specific delimeter string '@@@@@@@@@@@' for hg incoming data as some commit messages are multi-line
cobalt.py | file | annotate | diff | comparison | revisions |
--- a/cobalt.py Sat Oct 04 18:18:28 2014 +0300 +++ b/cobalt.py Sun Oct 05 23:33:29 2014 +0300 @@ -265,9 +265,11 @@ repocheck_timeout[repo_name] = time.time() + (cfg ('hg_checkinterval', 15) * 60) zanrepo = hgapi.Repo (repo_name) commit_data = [] + delimeter = '@@@@@@@@@@' try: - data = zanrepo.hg_command ('incoming', '--quiet', '--template', '{node|short} {desc}\n') + data = zanrepo.hg_command ('incoming', '--quiet', '--template', + '{node|short} {desc}' + delimeter) except hgapi.hgapi.HgException as e: deciphered = decipher_hgapi_error (e) @@ -281,7 +283,7 @@ return #tried - for line in data.split ('\n'): + for line in data.split (delimeter): if line == '': continue #fi