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

conflict callback API

From: Ben Collins-Sussman <sussman_at_red-bean.com>
Date: 2007-06-27 23:15:20 CEST

I've just committed (in r25557) a first draft of the API I'd like to
use for interactive conflict callbacks. Please take a look at the new
'conflicts' section of svn_client.h

Here's the back-of-napkin logic for how I think 'svn up', 'svn
switch', and 'svn merge' should behave:

 server is doing a merge or update.
 server hits a conflict of some kind (textual or tree-based).
   if no callback exists:
      try to mark conflict as usual.
      if it's a tree conflict we can't handle, bail out
      if thing is *already* conflicted,
          (for now): bail out
          (in the future): mark 'deep' conflict
      continue.
   if callback exists:
      describe conflict to the callback.
      callback returns one of:
         - "situation is totally resolved" --> continue
         - "situation is still horked" --> bail out

What I like about this interface is that it gives a lot of possible
behaviors, to satisfy a bunch of different working styles.

* The callback is free to present any UI it wishes to demonstrate
  textual conflicts, prop conflicts, or tree conflicts.

* The "super interactive option": callback could be configured to demand
  intervention from users on every single conflict.

* The "partially interactive option": callback could auto-resolve
  certain types of conflicts in specific ways ("always use my changes,
  ignore others"), and prompt users in all other situations.

* The "completely non-interactive option": don't define any callback,
  depend on the future 'deep' conflict feature.

This whole design assumes that we're going to get better about
handling tree-conflicts in the near future. (/me looks at cmpilato.) :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 27 23:15:24 2007

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.