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

Unified Diff: appengine/chromium_rietveld/codereview/models.py

Issue 1114103003: Allow delta links for large files but give appropriate error message when viewing (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 5 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/chromium_rietveld/codereview/models.py
diff --git a/appengine/chromium_rietveld/codereview/models.py b/appengine/chromium_rietveld/codereview/models.py
index fdfd16fe5587bd0ebe4524b5d7ef8a2039aa7883..00cfcd2d48e3a1292828e74ee5ab3acd1172e6c2 100644
--- a/appengine/chromium_rietveld/codereview/models.py
+++ b/appengine/chromium_rietveld/codereview/models.py
@@ -470,8 +470,6 @@ def _calculate_delta(patch, patchset_id, patchsets):
A list of patchset ids.
"""
delta = []
- if patch.no_base_file:
- return delta
for other in patchsets:
if patchset_id == other.key.id():
break
@@ -1023,6 +1021,10 @@ class Patch(ndb.Model):
msg = 'Bad content. Try to upload again.'
logging.warn('Patch.get_content: %s', msg)
raise FetchError(msg)
+ if content.file_too_large:
+ msg = 'File too large.'
+ logging.warn('Patch.get_content: %s', msg)
+ raise FetchError(msg)
if content.is_uploaded and content.text == None:
msg = 'Upload in progress.'
logging.warn('Patch.get_content: %s', msg)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698