Chromium Code Reviews

Unified Diff: pending_manager.py

Issue 6813044: Add relative path support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/commit-queue
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | tests/pending_manager_test.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 41e5afe0d30df1c573d0c55752d2e9675ac2d257..5dd586d6f71172242bbf423e325dd349dba30776 100644
--- a/pending_manager.py
+++ b/pending_manager.py
@@ -29,10 +29,6 @@ import model
from verification import base
-def TODO(string):
- logging.warning(string)
-
-
def send_stack(e):
breakpad.SendStack(e,
''.join(traceback.format_tb(sys.exc_info()[2])),
@@ -47,7 +43,7 @@ class PendingCommit(base.Verified):
'issue', 'patchset', 'rietveld_server', 'description',
'files',
# Only a cache, these values can be regenerated.
- 'owner', 'reviewers', 'base_url', 'messages',
+ 'owner', 'reviewers', 'base_url', 'messages', 'relpath',
# Only used after a patch was committed. Keeping here for completeness.
'revision',
]
@@ -64,6 +60,7 @@ class PendingCommit(base.Verified):
self.description = description
self.messages = messages
self.revision = None
+ self.relpath = ''
self.files = []
def patch_url(self):
@@ -282,9 +279,15 @@ class PendingManager(object):
"""
try:
patches = self.rietveld.get_patch(pending.issue, pending.patchset)
+ if not patches:
+ raise base.DiscardPending(
+ pending, 'No diff was found for this patchset.')
+ if pending.relpath:
+ patches.set_relpath(pending.relpath)
pending.files = [p.filename for p in patches]
if not pending.files:
- raise base.DiscardPending(pending, 'No diff found.')
+ raise base.DiscardPending(
+ pending, 'No file was found in this patchset.')
self.checkout.apply_patch(patches)
except checkout.PatchApplicationFailed, e:
out = 'Can\'t apply patch for file %s.' % e.filename
« no previous file with comments | « no previous file | tests/pending_manager_test.py » ('j') | no next file with comments »

Powered by Google App Engine