diff -r b2770c43b752 -r 44d9aea72947 hgpoll.py --- a/hgpoll.py Mon Dec 08 16:12:51 2014 -0500 +++ b/hgpoll.py Mon Dec 08 23:27:43 2014 +0200 @@ -21,6 +21,9 @@ color = 0 return color +def prettify_bookmarks (bookmarks): + return "\0036 [\002%s\002]" % bookmarks + def make_commits_txt(): global g_needCommitsTxtRebuild @@ -223,8 +226,8 @@ match = rex.match (line) if match: line = '%s|%s [color=#5F7]%s[/color][color=#F53]%s[/color]%s\n' \ - % (match.group (1), match.group (2), match.group (3), match.group (4), match.group -(5)) + % (match.group (1), match.group (2), match.group (3), + match.group (4), match.group (5)) # Tracker doesn't seem to like empty color tags line = line.replace ('[color=#5F7][/color]', '').replace ('[color=#F53][/color]', '') @@ -349,7 +352,9 @@ print 'Processing new commit %s...' % commit_node try: - commit_author = get_commit_data (zanrepo, commit_node, '{author}') + data = get_commit_data (zanrepo, commit_node, '{author}@@@@@@@@@@{bookmarks}').split ("@@@@@@@@@@") + commit_author = data[0] + commit_bookmarks = prettify_bookmarks (data[1]) commit_url = '%s/commits/%s' % (repo_url, commit_node) commit_email = '' @@ -367,8 +372,9 @@ for channel in irc_client.channels: if not usesandbox or channel.get_value ('btprivate', False): irc_client.privmsg (channel.get_value ('name'), - "\003%d%s\003: new commit\0035 %s\003 by\0032 %s\003: %s" - % (color_for_repo (repo_name), repo_name, commit_node, committer, commit_url)) + "\003%d%s\003: new commit\0035 %s%s\003 by\0032 %s\003: %s" + % (color_for_repo (repo_name), repo_name, commit_node, commit_bookmarks, + committer, commit_url)) for line in commit_message.split ('\n'): irc_client.privmsg (channel.get_value ('name'), line)