Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(119)

Unified Diff: codereview/views.py

Issue 955: Allow upload with no base (Closed) SVN Base: http://rietveld.googlecode.com/svn/trunk/
Patch Set: I incorporated the changes as per your comments in previous patch. Created 6 months, 3 weeks ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
Index: codereview/views.py
===================================================================
--- codereview/views.py (revision 103)
+++ codereview/views.py (working copy)
@@ -147,14 +147,13 @@
subject = forms.CharField(max_length=100)
description = forms.CharField(max_length=10000, required=False)
- base = forms.CharField(max_length=2000)
+ base = forms.CharField(max_length=2000, required=False)
data = forms.FileField()
issue = forms.IntegerField(required=False)
def get_base(self):
return self.cleaned_data.get('base')
-
GvR 2008/05/19 02:10:58 Please don't delete double blank lines. They're t
class EditForm(IssueBaseForm):
closed = forms.BooleanField()
@@ -753,6 +752,11 @@
@issue_required
def diff(request, patchset_id, patch_id):
"""/<issue>/diff/<patchset>/<patch> - View a patch as a side-by-side diff."""
+
+ if not request.issue.base:
+ return HttpResponse('<html><body>side-by-side diff is not supported for '
+ 'this patch (yet).</body></html>')
+
patchset = models.PatchSet.get_by_id(int(patchset_id), parent=request.issue)
if patchset is None:
return HttpResponseNotFound('No patch set exists with that id (%s)' %

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r373