Using External Differencing and Merge Tools
The interface between Subversion and external two- and three-way
differencing tools hearkens back to a time when Subversion’s only
contextual differencing capabilities were built around invocations of the
GNU diffutils toolchain, specifically the diff and diff3 utilities. To get the kind of behavior Subversion needed, it called
these utilities with more than a handful of options and parameters, most
of which were quite specific to the utilities. Some time later, Subversion
grew its own internal differencing library, and as a failover mechanism,
the --diff-cmd
and --diff3-cmd
options were added to the
Subversion command-line client so that users could more easily indicate
that they preferred to use the GNU diff and diff3 utilities instead of the
newfangled internal diff library. If those options were used, Subversion
would simply ignore the internal diff library and would fall back to
running those external programs, lengthy argument lists and all. And
that’s where things remain today.
It didn’t take long for folks to realize that having such easy configuration mechanisms for specifying that Subversion should use the external GNU diff and diff3 utilities located at a particular place on the system could be applied toward the use of other differencing tools, too. After all, Subversion didn’t actually verify that the things it was being told to run were members of the GNU diffutils toolchain. But the only configurable aspect of using those ...
Get Version Control with Subversion, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.