Move diff change description handling into a new DiffField.
Review Request #5487 — Created Feb. 17, 2014 and submitted — Latest diff uploaded
DiffFieldis now responsible for recording change entries for new diffs,
and for showing those entries. This logic is no longer hard-coded into
the template,review_detailview, orReviewRequestDraft.publish.Since this (and other similar upcoming fields) require access to state
generated during thereview_detailview, I've added an internal
BuiltinLocalsFieldMixinthat takes in alocals()and extracts necessary
data from it. This is only meant for internal usage.The rendered output from
DiffFieldlooks the same as it did in the
template. An upcoming change for better change entry rendering will
improve this output a bit.
Uploaded a few diffs, publishing after each one. Saw that they were recorded
and displayed properly, all with valid links.Published changes without diff uploads and saw that the diff wasn't recorded or
rendered.Unit tests pass.