[zorg] r300013 - Added support for requesting a clean build from a commit comment.
Galina Kistanova via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 11 17:30:54 PDT 2017
Author: gkistanova
Date: Tue Apr 11 19:30:54 2017
New Revision: 300013
URL: http://llvm.org/viewvc/llvm-project?rev=300013&view=rev
Log:
Added support for requesting a clean build from a commit comment.
Modified:
zorg/trunk/zorg/buildbot/changes/llvmpoller.py
Modified: zorg/trunk/zorg/buildbot/changes/llvmpoller.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/changes/llvmpoller.py?rev=300013&r1=300012&r2=300013&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/changes/llvmpoller.py (original)
+++ zorg/trunk/zorg/buildbot/changes/llvmpoller.py Tue Apr 11 19:30:54 2017
@@ -10,6 +10,7 @@ from buildbot.changes import base
import xml.dom.minidom
import os, urllib, collections
+import re
class LLVMPoller(base.PollingChangeSource, util.ComparableMixin):
"""
@@ -36,6 +37,8 @@ class LLVMPoller(base.PollingChangeSourc
svnbin='svn', revlinktmpl=_revlinktmpl, category=None,
projects=None, cachepath=None):
+ self.cleanRe = re.compile(r"Require(?:s?)\s*.*\s*clean build", re.IGNORECASE + re.MULTILINE)
+
# projects is a list of projects to watch or None to watch all.
if projects:
if isinstance(projects, str) or isinstance(projects, tuple):
@@ -298,6 +301,10 @@ class LLVMPoller(base.PollingChangeSourc
if action == u'D' and number_of_files_changed == 1 and files[0] == '':
log.msg("LLVMPoller(%s): Ignoring deletion of branch '%s'" % (self.svnurl, branch))
else:
+ properties = dict()
+ if self.cleanRe.search(comments):
+ log.msg(">>>>> Create a change with the 'clean' property for r%s" % revision)
+ properties['clean'] = (True, "change")
chdict = dict(author=author,
files=files,
comments=comments,
@@ -306,7 +313,8 @@ class LLVMPoller(base.PollingChangeSourc
revlink=revlink,
category=categories.get(project, None),
repository=self.svnurl,
- project=project)
+ project=project,
+ properties=properties)
changes.append(chdict)
return changes
More information about the llvm-commits
mailing list