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

Re: [PATCH] Pass the name of the conflicted file to the merge tool

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 13 Jan 2009 11:20:52 +0000

On Mon, 2009-01-12 at 16:41 -0800, John Gardiner Myers wrote:
> Julian Foad wrote:
> > * There are separate "merge-cmd" and "diff3-cmd" config settings,
> > which both run a merge tool, perhaps in different ways, in different
> > situations. I think "diff3-cmd" is run before deciding whether there is
> > a conflict, and then "merge-cmd" is run if the user selects "Launch
> > external merge tool".
> >
> I cannot find any reference to a "merge-tool" config setting in the
> Subversion source code.

I meant "merge-tool-cmd", not "merge-cmd", sorry.

> I believe we have a terminology problem here. By "merge tool" I mean
> the thing that is specified by the "merge-tool-cmd" config setting (or
> the "SVN_MERGE" environment variable).
>
> The thing specified by the "diff3-cmd" setting should not be referred to
> as a "merge tool." It has different semantics and constraints than the
> thing specified by the "merge-cmd" config setting and referring to it
> (or the thing specified by the "diff-cmd") as a "merge tool" will lead
> to ambiguity and confusion.

Hmm. It has a different command-line interface. It may have different
high-level semantics (in terms of what it's supposed to achieve) but it
seems pretty similar to me.

I have "merge-tool-cmd" set to invoke a GUI merge tool. I like this
because it just pops up for each conflict without me having to use the
command-line interactive resolution menu before and after it.

I do think this is a confusing and poorly organised state of affairs,
having two different merge tool interfaces and settings. (Excuse me, one
"merge tool" and one tool that performs a merge and is called
"diff3" :-)

> > * The external diff tool has the same problem.
> >
> The external diff3 and external diff tools have different constraints
> than the external merge tool. I believe one of the additional
> constraints is that the arguments must be usable by GNU diff3 and GNU
> diff, respectively. My proposed patch does not change anything with
> respect to the external diff3 or external diff tools.

We do need to keep the command-line syntax of these compatible with the
GNU tools by default, but we could come up with some sort of extension
mechanism, an alternative non-compatible invocation that could be used
if so configured.

> > * The "diff" options in interactive conflict resolution print things
> > like "+++ tmp/tmpfile.tmp" in their headers. They could benefit from
> > knowing the real name of the text that it's diffing.
> >
> The existing code currently uses "-L" switches to pass labels into the
> external diff3 and external diff tools. I don't think those labels have
> relative path information, but I doubt we really want them to.

I see C-Mike Pilato made an improvement yesterday to put make the
temporary file names reflect the real file name, so hopefully that's
made the situation better. I haven't looked at it yet.

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1021652
Received on 2009-01-13 12:21:36 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.