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

Re: svn diff fix for bug 2044

From: Gabriela Gibson <gabriela.gibson_at_gmail.com>
Date: Wed, 20 Mar 2013 19:58:57 +0000

Thanks for all the feedback, advice and ideas so far :)

IIRC Subversion needs to communicate the following file names to the
user's diff program:

mine, yours, base and output

It then takes the user input (--diff-cmd) from either the command line
or a script, and produces a command to run the external diff in order
to harvest that output.

All we need to do is to render the command line *exactly* as typed
within the delimiters of (say) %% at the end and start, with the
exception that %mine %yours, %base and %output will be string
substituted by subversion accordingly (a bit like printf does)

A simple case:

-diff-cmd=%%/usr/fancy_diff_cmd %mine %yours %base %output%%

or more complex:

-diff-cmd=%%/usr/fancy_diff_cmd -x "" -L ' ' %mine -Q %yours -Z %base -q
"xyzzy" %output%%

The reason for the un-unix-like "%" syntax is that we don't want to
restrict user's freedom to use any kind of switches or whatever syntax
they want to use.

Also, the %% delimiter keeps it visually simple for the user as well
and already matches the token pattern we're looking for, plus it makes
the quoting issues go away.

What do you think?
Received on 2013-03-20 20:59:20 CET

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.