@check_login_required
@check_local_site_access
def raw_diff(request, review_request_id, revision=None, local_site=None):
 (review_request, response) = _find_review_request(request, review_request_id, local_site)
 if (not review_request):
  return response
 draft = review_request.get_draft(request.user)
 diffset = _query_for_diff(review_request, request.user, revision, draft)
 tool = review_request.repository.get_scmtool()
 data = tool.get_parser(u'').raw_diff(diffset)
 resp = HttpResponse(data, content_type=u'text/x-patch')
 if (diffset.name == u'diff'):
  filename = (u'rb%d.patch' % review_request.display_id)
 else:
  filename = six.text_type(diffset.name).encode(u'ascii', u'ignore')
  filename = filename.replace(u',', u'_')
 resp[u'Content-Disposition'] = (u'attachment; filename=%s' % filename)
 set_last_modified(resp, diffset.timestamp)
 return resp

@ check_login_required @ check_local_site_access def raw_diff ( request , review_request_id , revision = None , local_site = None ) : ( review_request , response ) = _find_review_request ( request , review_request_id , local_site ) if ( not review_request ) : return response draft = review_request . get_draft ( request . user ) diffset = _query_for_diff ( review_request , request . user , revision , draft ) tool = review_request . repository . get_scmtool ( ) data = tool . get_parser ( u'' ) . raw_diff ( diffset ) resp = HttpResponse ( data , content_type = u'text/x-patch' ) if ( diffset . name == u'diff' ) : filename = ( u'rb%d.patch' % review_request . display_id ) else : filename = six . text_type ( diffset . name ) . encode ( u'ascii' , u'ignore' ) filename = filename . replace ( u',' , u'_' ) resp [ u'Content-Disposition' ] = ( u'attachment; filename=%s' % filename ) set_last_modified ( resp , diffset . timestamp ) return resp
displays a raw diff of all the filediffs in a diffset for the given review request .