There are times where it can be useful or even necessary to use a larger number of lines of context than the usual standard 3 lines in unified diffs.
One example is the (admittedly) rare kind of patch that can be applied multiple times, repeating the programmed difference each time. That actually happens quite often to me.
Another example is uploading a so-called "raw diff" (changes not committed locally) to Phabricator, using the Purpose/Phabricator plugin or otherwise. Such patches would normally lack context beyond what is contained in the patch itself. repeatIncreasing the programmed difference each timenumber of lines makes the review process easier.
Another example is uploading a so-called "raw diff" (changes not committed locally) to Phabricator, using the Purpose/Phabricator plugin or otherwisee. Such patches would normally lack context beyond what is contained in the patch itselfThis patch introduces a subtle extension to the patchreview UI that allows to select a custom number of context lines: it adds a context menu to the Update button that offers a selection of context lines plus the special "whole file" value to include the full file as context. Increasing the number of lines could make the review process easier.Once a number has been selected it will be be used each time the Update button is clicked or the diff is updated for other reasons, (NB: integration with Phab should still be improved to include support of Phab's preferred way of submitting "locally committed patches".)for the lifetime of the current patch review process.
This patch introduces a simple spinbox to the patchreview UI that allows to select a custom number of context lines. The spinbox has a special value "max" (= 0) which is translated internally to `INT_MAX`. The initial diff of this revision was created that way, and contains thus entire copies of the changed filUploading raw diffs generated with the "whole file" option to Phabricator provides reviewers with the same reviewing convenience as uploading committed differences.