[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Custom merge/diff tool feature request

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2005-07-28 00:14:10 CEST

Aaron Hillegass <info@bignerdranch.com> writes:

> We are using subversion for all our source code for our applications
> and our books. It is a great tool, and we are greatly indebted to
> all of you. I do, however, have a suggestion for an improvement:
> For most types of source code, the default line-based merge/diff
> works beautifully. There are, however, other types of file that
> might be mergeable: database files, nib files, compressed files. For
> these, I would want to write a custom merge/diff tool. My tool would
> have to take the same arguments as GNU diff.
> Then, from the command-line, I can specify:
> svn diff --diff-cmd sqlite_diff foo.sql
> svn merge --diff3-cmd sqlite_diff foo.sql
> But, what I really want is a way to configure subversion to use my
> custom diff/merge for a given file type. I want a way to say: "For
> any file with a .sql extension, use sql_diff instead of the standard
> line-based merge/diff".

We've seen requests like this before. And until a week ago, I was
even +1 on the idea. But no more.

Subversion needs only to do the following:

   - *always* call the external diff/diff3 program when those have
     been customized (via --diff[3]-cmd or the runtime configuration
     area), instead of automatically ruling out diffs on "binary"

   - ensure that the temporary files passed to the external diff tool
     have predictable, documented naming schemes.

This would allow folks to write a script used as the value of
--diff-cmd which can determine the input file's type either by its
file extension or by asking Subversion about the mimetype, and then
call the *real* program of your choosing.

A separate frustration is that Subversion always calls the external
programs with a set of parameters suitable for (only?) GNU diff and
diff3. That's stupid cruft. I'd prefer if the values of the
--diff[3]-cmd options were format strings:

   diff-cmd = /my/diff/program --left %L --right %R --mime-type %M

Sum'in like that.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 28 00:17:22 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.