diff -r e24793fae424 -r 1b734faab67a hgpoll.py --- a/hgpoll.py Tue Aug 11 19:12:30 2015 +0300 +++ b/hgpoll.py Sun Aug 16 10:59:22 2015 +0300 @@ -76,7 +76,7 @@ try: repo.clone() - # We need to un-alias a few things, they may be aliased on the host machine (e.g. mine) + # We need to un-alias a few things in case they're aliased comms=['log', 'incoming', 'pull', 'commit', 'push', 'outgoing', 'strip', 'transplant'] try: with open (os.path.join (repo.name, '.hg', 'hgrc'), 'a') as fp: @@ -85,7 +85,7 @@ print ('Warning: unable to alter hgrc of %s: %s' % repo.name, e) print ('Cloning done.') except Exception as e: - raise HgProcessError ('Unable to clone %s from %s: %s' % (repo.name, repo.url, e)) + raise HgProcessError ('Unable to clone %s from %s: %s' % (repo.name, repo.clone_url, e)) quit (1) if not repo.is_valid(): @@ -281,7 +281,7 @@ username = Config.find_developer_by_email (commit['email']) committer = username if username else commit['author'] - descriptor = """commit""" if int (random.random() * 100) != 0 else """KERMIT""" + descriptor = """commit""" if random.randrange (100) != 0 else """KERMIT""" if not isMergeFromSandbox: commitMessage = """\003%d%s\003: new %s\0035 %s%s\003 by\0032 %s\003: %s""" % \ @@ -313,11 +313,6 @@ announce_ticket_resolved (match.group (2), commit['node'], db) break - # Encode messages - for messagelist in messages: - for i in range (0, len (messagelist)): - messagelist[i] = messagelist[i].decode ("utf-8", "ignore").encode("ascii", "ignore") - fullMessageLength = len (''.join (messages[2])) if fullMessageLength > 3000: