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

Unified Diff: pending_manager.py

Issue 6049007: Create IVerifierStatus and add IVerifierStatus.ignored(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/commit-queue
Patch Set: fix diff Created 9 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | verification/base.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pending_manager.py
diff --git a/pending_manager.py b/pending_manager.py
index 846ff03f3e27f4cd29a412e88e8772f57632a96c..b8c51a09a8ef1deb28404a94ab5aea45fea34c1f 100644
--- a/pending_manager.py
+++ b/pending_manager.py
@@ -44,7 +44,7 @@ class PendingCommit(base.Verified):
persistent = base.Verified.persistent + [
# Important since they tell if we need to revalidate and send try jobs
# again or not if any of these value changes.
- 'issue', 'patchset', 'rietveld_server', 'processed', 'description',
+ 'issue', 'patchset', 'rietveld_server', 'description',
'files',
# Only a cache, these values can be regenerated.
'owner', 'reviewers', 'base_url',
@@ -64,7 +64,6 @@ class PendingCommit(base.Verified):
self.description = description
self.messages = messages
self.revision = None
- self.processed = False
self.files = []
def patch_url(self):
@@ -140,10 +139,9 @@ class PendingManager(object):
"""Starts verification on newly found pending commits."""
for pending in self.queue.pending_commits[:]:
try:
- if pending.verifications or pending.processed:
+ if len(pending.verifications) == len(self.verifiers) or pending.done():
Dirk Pranke 2011/01/04 22:10:42 Should this check maybe be part of pending.done()
M-A Ruel 2011/01/11 21:07:40 That's a good question. Since pending doesn't kno
continue
logging.info('Processing issue %s' % pending.issue)
- pending.processed = True
if not self._validity_checks(pending):
# Silently ignore.
@@ -157,6 +155,8 @@ class PendingManager(object):
os.chdir(self.checkout.project_path)
for verifier in self.verifiers:
verifier.verify(pending, revision)
+ if pending.done():
+ break
finally:
os.chdir(previous_cwd)
except base.DiscardPending, e:
@@ -183,7 +183,9 @@ class PendingManager(object):
def scan_results(self):
"""Scans pending commits that can be committed or discarded."""
for pending in self.queue.pending_commits[:]:
- if pending.failed():
+ if pending.ignored():
+ self._discard_pending(pending, None)
+ elif pending.failed():
self._discard_pending(pending, 'Patch verification failed')
elif pending.succeeded():
# The item is removed right away.
« no previous file with comments | « no previous file | verification/base.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698