Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: scripts/master/svnpoller.py

Issue 9169097: Add a custom SVNPoller implementation that adds " (CQ)" to author name for (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/build/
Patch Set: . Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « masters/master.chromium.fyi/master.cfg ('k') | third_party/buildbot_8_4p1/README.chromium » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 """ Source file for buildbot.changes.svnpoller module modifications. """
M-A Ruel 2012/01/26 20:30:55 Not really informative. Add a class docstring """A
sadrul 2012/01/26 20:45:18 Done.
6
7 from buildbot.changes import svnpoller
8
9 class SVNPoller(svnpoller.SVNPoller):
10 def __init__(self):
11 self.old_create_changes = self.create_changes
M-A Ruel 2012/01/26 20:30:55 Remove.
sadrul 2012/01/26 20:45:18 Done.
12
13 def get_logs(self, _):
M-A Ruel 2012/01/26 20:30:55 Add a single line docstring explaining why the cha
sadrul 2012/01/26 20:45:18 Done.
14 args = []
15 args.extend(["log", "--xml", "--verbose", "--non-interactive",
16 "--with-all-revprops"])
17 if self.svnuser:
18 args.extend(["--username=%s" % self.svnuser])
M-A Ruel 2012/01/26 20:30:55 Align at +2. Yeah it's confusing...
sadrul 2012/01/26 20:45:18 Done.
19 if self.svnpasswd:
20 args.extend(["--password=%s" % self.svnpasswd])
21 args.extend(["--limit=%d" % (self.histmax), self.svnurl])
22 d = self.getProcessOutput(args)
23 return d
24
25 def create_changes(self, new_logentries):
M-A Ruel 2012/01/26 20:30:55 Add a single line docstring explaining why the cha
sadrul 2012/01/26 20:45:18 Done.
26 def commit_bot_used(logentry):
27 revprops = logentry.getElementsByTagName('revprops')
28 if revprops is not None:
29 for revprop in revprops.getElementsByTagName('property'):
30 if revprop.getAttribute("name") == "commit-bot":
31 return True
32 return False
33
34 revcq = {}
35 for el in new_logentries:
36 if commit_bot_used(el):
37 revcq[str(el.getAttribute("revision"))] = True
38
39 changes = self.old_create_changes(new_logentries)
M-A Ruel 2012/01/26 20:30:55 changes = svnpoller.SVNPoller.create_changes(self,
sadrul 2012/01/26 20:45:18 Nice! Done.
40 for change in changes:
41 if change.revision in revcq:
42 change.cq = " (CQ)"
43 else:
44 change.cq = ""
45
46 return changes
OLDNEW
« no previous file with comments | « masters/master.chromium.fyi/master.cfg ('k') | third_party/buildbot_8_4p1/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698