hi
i implemented a quick wrapper that accepts those options for the switches that
subversion's uses for diff and diff3 and it fails when i set diff3-cmd. i'm
not sure what role it uses diff3 for, and it seems to read the output to
perform some other task than display, i did not have time to look at the
subversion source yet to figure out the problem.
to provide integration with external diff programs subversion would need to
define clear "roles" for when and why it invokes the external diff. e.g. is
the program used for display? it is used to compute deltas? to extract
patches? perhaps we need to have separate configuration variables for all
these roles...
one functionality that i would implement immediately if i were to switch over
to subversion would be a repository-diff script, where i could visualize
changes that would occur on an commit (including pending merges, displayed
with 3-way diffs). in other words, go through all the elements in the
checkout area, if there is a newer revision in the repository or if the
element has been modified locally, show a visual diff of the files (3-way if
both cases present).
i was expecting a 3-way diff display upon running "svn diff" on an element
which 1) has been modified locally and 2) for which a more recent revision
exists in the repository (for that element). doesn't seem to work that way,
and the --notice-ancestry doesn't seem to do it (btw what does it do? the
book doesn't say much and the mailing-lists/man either, i assume it follows
"copy" history?).
BTW, is there a way to make disable comments on commits? in .cvsrc i used
commit -m ""
cheers,
On Tuesday 24 February 2004 14:31, Ben Collins-Sussman wrote:
> 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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Feb 25 21:29:07 2004