D4981: patchreview : allow choice of the number of context lines

René J.V. Bertin noreply at phabricator.kde.org
Wed Mar 8 22:30:19 UTC 2017


rjvbb created this revision.
rjvbb added a project: KDevelop.
Restricted Application added a subscriber: kdevelop-devel.

REVISION SUMMARY
  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.
  
  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".)
  
  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 files.

TEST PLAN
  Seems to work as intended as far as the custom context feature has been implemented in the various VCS plugins.
  
  It would be nice if the patchfile window reloaded automatically whenever the file changes.

REPOSITORY
  R33 KDevPlatform

REVISION DETAIL
  https://phabricator.kde.org/D4981

AFFECTED FILES
  plugins/bazaar/bazaarplugin.cpp
  plugins/bazaar/bazaarplugin.h
  plugins/cvs/cvsplugin.cpp
  plugins/cvs/cvsplugin.h
  plugins/git/gitplugin.cpp
  plugins/git/gitplugin.h
  plugins/git/tests/test_git.cpp
  plugins/patchreview/patchreview.cpp
  plugins/patchreview/patchreview.h
  plugins/patchreview/patchreview.ui
  plugins/patchreview/patchreviewtoolview.cpp
  plugins/perforce/perforceplugin.cpp
  plugins/perforce/perforceplugin.h
  plugins/subversion/kdevsvnplugin.cpp
  plugins/subversion/kdevsvnplugin.h
  vcs/interfaces/ibasicversioncontrol.h
  vcs/interfaces/ipatchsource.h
  vcs/widgets/vcsdiffpatchsources.h

To: rjvbb, #kdevelop
Cc: kdevelop-devel, #kdevelop, Pilzschaf, akshaydeo, surgenight, arrowdodger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170308/06805afb/attachment-0001.html>


More information about the KDevelop-devel mailing list