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

Re: xxdiff support for subversion

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-02-24 20:31:35 CET

On Tue, 2004-02-24 at 12:23, Martin Blais wrote:

> i would like to know all the various ways and situations that
> subversion can invoke it,

To make svn use an external diff program, you can either pass
'--diff-cmd', or set the runtime variable 'diff-cmd' in the config file.

Looking at svn_io_run_diff() public API (and code), it seems that we're
expecting the diff program to take exactly two file arguments.

You can also pass extra arguments to the external diff program by using
the -x option, for example:

  $ svn diff foo.c bar.c --diff-cmd /usr/bin/gnudiff -x "-u -b"

When dealing with external diff3 programs, it looks like we're pretty
much assuming GNU diff3 only... our code to set up arguments looks like
this:

  /* Set up diff3 command line. */
  args[i++] = diff3_utf8;
  args[i++] = "-E"; /* We tried "-A" here, but that caused
                                   overlapping identical changes to
                                   conflict. See issue #682. */
  args[i++] = "-m";
  args[i++] = "-L";
  args[i++] = mine_label;
  args[i++] = "-L";
  args[i++] = older_label; /* note: this label is ignored if
                                   using 2-part markers, which is the
                                   case with "-E". */
  args[i++] = "-L";
  args[i++] = yours_label;
  args[i++] = mine;
  args[i++] = older;
  args[i++] = yours;

I don't think our diff3 was designed to be super flexible with various
3rd party merging tools. Originally, svn *required* an external diff3,
and our function svn_io_run_diff3() was only written for that purpose.
After Sander wrote a homegrown libsvn_diff, using external diff/diff3
became optional.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Feb 24 20:35:21 2004

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

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