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

Re: Tree conflicts raised by third-party software

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 28 Nov 2008 19:40:18 +0000

Julian Foad wrote:
> On Tue, 2008-11-25 at 17:07 +0100, Stephen Butler wrote:
> > I was talking yesterday with Nico Schellingerhout, creator of the
> > trumerge tool for tree conflict handling in Subversion 1.4, and BTW a
> > customer of ours (elego's). He suggests that a new version of
> > trumerge for svn 1.6 could look for cases that we don't yet catch
> > (such as use case 5) and use the working copy library to set new
> > tree conflicts.
> >
> > Is it possible for a third-party tool to create a new tree conflict?
> Yes, if built against our source code. Such a tool can use any of the
> project-scope APIs including those in
> "subversion/include/private/svn_wc_private.h", which is where
> svn_wc__add_tree_conflict() is. I think that is the only API necessary
> to raise a tree conflict.
> To make the API accessible at link time, we could make it public.

After talking with several people, we have found a good solution. Anyone
can build a program against Subversion source code that exposes the
functionality in any desired way, e.g. through a command-line UI. This
can be done with the API remaining in the "Subversion-private" name
space and header file, as it is now.

I knocked up a quick example of such a tool. It builds within a
Subversion source tree, just because this was the easiest way for me to
get started. It is called "svnraisetreeconflict". It parses its 13
command-line parameters into an svn_wc_conflict_description_t structure,
and it stores this conflict in the WC for the specified path.

After raising a conflict with this tool, "svn status", "svn info", "svn
resolved" etc. work as expected.

A patch to create this tool is attached. To build it in Unix land,
simply re-run the Subversion build from the "autogen" stage. (I'm not
sure about Windows land.)

I am CC'ing the TruMerge authors who have told me they are interested in
pursuing this approach in order to improve the TruMerge user experience.

(This little program has rough edges, or course. The UI is pretty
primitive. I also noticed if you try to raise another tree conflict on a
victim that already has one, it gives a sensible error message but the
WC becomes locked and cleanup doesn't work.)

- Julian

To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-11-28 23:49:40 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.