heh

Mon, 04 May 2015 00:50:18 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Mon, 04 May 2015 00:50:18 +0300
changeset 133
06808909d694
parent 132
a22c50f52a23
child 134
7316dc5f61ef

heh

hgpoll.py file | annotate | diff | comparison | revisions
--- a/hgpoll.py	Fri May 01 19:08:12 2015 +0300
+++ b/hgpoll.py	Mon May 04 00:50:18 2015 +0300
@@ -36,8 +36,10 @@
 from configfile import Config
 import utility
 import subprocess
+import random
+import math
+
 g_CommitsDb = None
-
 ZDoomRevNumber = 0
 
 def all_repo_names():
@@ -445,8 +447,10 @@
 			commit_trackeruser = Config.find_developer_by_email (commit_email)
 			committer = commit_trackeruser if commit_trackeruser != '' else commit_author
 
-			commitMessage = "\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,
+			commitDescriptor = """commit""" if int (math.ceil (random.random() * 100)) != 1 else """KERMIT"""
+
+			commitMessage = """\003%d%s\003: new %s\0035 %s%s\003 by\0032 %s\003: %s""" % \
+				(color_for_repo (repo_name), repo_name, commitDescriptor, commit_node, commit_bookmarks,
 				committer, utility.shorten_link (commit_url))
 
 			messages[0].append (commitMessage)

mercurial