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

Side by Side Diff: commit-queue/verification/project_base.py

Issue 135363007: Delete public commit queue to avoid confusion after move to internal repo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 6 years, 10 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 | « commit-queue/verification/presubmit_shim.py ('k') | commit-queue/verification/reviewer_lgtm.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # coding=utf8
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5 """Ignores issues not using the right project base url regex."""
6
7 import logging
8 import os
9 import re
10
11 import find_depot_tools # pylint: disable=W0611
12 import breakpad
13
14 from verification import base
15
16
17 class ProjectBaseUrlVerifier(base.Verifier):
18 """Needs the project base url to match at least one regexp in self.regex."""
19 name = 'project_bases'
20
21 def __init__(self, project_bases):
22 super(ProjectBaseUrlVerifier, self).__init__()
23 self.project_bases = project_bases
24
25 def verify(self, pending):
26 matches = filter(
27 None, (re.match(r, pending.base_url) for r in self.project_bases))
28 if not matches:
29 logging.info('%s not in whitelist' % pending.base_url)
30 state = base.IGNORED
31 else:
32 if len(matches) != 1:
33 breakpad.SendStack(
34 Exception('pending.base_url triggered multiple matches'), '')
35 match = matches[0]
36 if match.lastindex:
37 pending.relpath = match.group(match.lastindex).lstrip('/').replace(
38 '/', os.sep)
39 state = base.SUCCEEDED
40 pending.verifications[self.name] = base.SimpleStatus(state)
41
42 def update_status(self, queue):
43 pass
OLDNEW
« no previous file with comments | « commit-queue/verification/presubmit_shim.py ('k') | commit-queue/verification/reviewer_lgtm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698