Drop unfinished support for binary & before/after diffs from VcsDiff
ClosedPublic

Authored by kossebau on Nov 23 2017, 10:42 AM.

Details

Summary

VcsDiff and IBasicVersionControl::diff(...) many years ago got initial
support for requesting and storing raw copies of files changed in a
revision.

Nothing in KDevelop though makes use of that feature, and all the VCS
plugins themselves do not support it either, even ignore explicit requests.

To ease maintainance of the used and working code for creating unified
text diffs, this patch drops the dead code for that unfinished feature.
When someone ever starts working on it again, the needed structures
in VcsDiff can be easily readded and also done matching whatever approach
is taken then.

After the initial support was introduced in 2007 by e.g. commits
5ffc3c23ce237c34669964bd61fae48922ea0816 and 7b09fc2f0abae379f370a05db0aa0d57c58e53bb
no further related work was ever commited to the codebase.

SvnDiffJob even has initial code for fetching full before-versions of
the affected files. But this seems premature test code which accidentally
got committed, as the full copies are always fetched and stored
additionally to the unified diff, and without respecting the diff type
parameter passed to the method. Also were the after-versions not stored,
and no other code also has ever been fetching those full copies
from the returned VcsDiff object.

Worse, most other VCS plugins simply ignored the diff type parameter passed
to the IBasicVersionControl::diff(...) method, and always returned a
unified diff, rendering the type parameter useless.

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Nov 23 2017, 10:42 AM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptNov 23 2017, 10:42 AM
apol accepted this revision.Nov 23 2017, 11:51 AM
This revision is now accepted and ready to land.Nov 23 2017, 11:51 AM
This revision was automatically updated to reflect the committed changes.