<table><tr><td style="">rjvbb created this revision.<br />rjvbb added a project: KDevelop.<br />Restricted Application added a subscriber: kdevelop-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D4981" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>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.</p>

<p>One example is the (admittedly) rare kind of patch that can be applied multiple times, repeating the programmed difference each time.</p>

<p>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 itself. Increasing the number of lines could make the review process easier. (NB: integration with Phab should still be improved to include support of Phab's preferred way of submitting "locally committed patches".)</p>

<p>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 <tt style="background: #ebebeb; font-size: 13px;">INT_MAX</tt>. The initial diff of this revision was created that way, and contains thus entire copies of the changed files.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Seems to work as intended as far as the custom context feature has been implemented in the various VCS plugins.</p>

<p>It would be nice if the patchfile window reloaded automatically whenever the file changes.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R33 KDevPlatform</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4981" rel="noreferrer">https://phabricator.kde.org/D4981</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>plugins/bazaar/bazaarplugin.cpp<br />
plugins/bazaar/bazaarplugin.h<br />
plugins/cvs/cvsplugin.cpp<br />
plugins/cvs/cvsplugin.h<br />
plugins/git/gitplugin.cpp<br />
plugins/git/gitplugin.h<br />
plugins/git/tests/test_git.cpp<br />
plugins/patchreview/patchreview.cpp<br />
plugins/patchreview/patchreview.h<br />
plugins/patchreview/patchreview.ui<br />
plugins/patchreview/patchreviewtoolview.cpp<br />
plugins/perforce/perforceplugin.cpp<br />
plugins/perforce/perforceplugin.h<br />
plugins/subversion/kdevsvnplugin.cpp<br />
plugins/subversion/kdevsvnplugin.h<br />
vcs/interfaces/ibasicversioncontrol.h<br />
vcs/interfaces/ipatchsource.h<br />
vcs/widgets/vcsdiffpatchsources.h</div></div></div><br /><div><strong>To: </strong>rjvbb, KDevelop<br /><strong>Cc: </strong>kdevelop-devel, KDevelop, Pilzschaf, akshaydeo, surgenight, arrowdodger<br /></div>