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

Re: Why does "update" treat an obstruction differently if adding without history?

From: Stephen Butler <sbutler_at_elego.de>
Date: Wed, 29 Oct 2008 16:03:35 +0100

Quoting Paul Burba <ptburba_at_gmail.com>:

> On Wed, Oct 29, 2008 at 8:21 AM, Julian Foad
> <julianfoad_at_btopenworld.com> wrote:
>> Can anyone explain this special handling of items scheduled for addition
>> *without history*, in "svn update"'s "add file" code path?


> Julian,
> That was related to a follow-up to the "takeover" functionality, and
> was filed as issue #2593.
> See also (the threads are many and a bit broken, but these are the
> key points):
> Mark describes the problem: http://svn.haxx.se/dev/archive-2006-08/0336.shtml
> Your thoughts: http://svn.haxx.se/dev/archive-2006-08/0718.shtml

Julian: Hoist by your own petard! ;-)

> My proposed patch: http://svn.haxx.se/dev/archive-2006-09/0362.shtml
> Paul

Tree conflict fans:

I'm hacking away at the skipping problem, too. For the allow-existing-add
feature, I simply gave check_tree_conflicts() a ptr-to-bool arg. Here's
the signature for that function in my incomplete patch:

/* First, check whether a significant conflict has already been raised
  * on FULL_PATH. For any incoming change ACTION, check for a tree
  * conflict. When adding an item, text and prop conflicts may also be
  * checked. If an existing conflict is found, return NULL in
  * *PCONFLICT and set *SKIP_P to TRUE.
  * Second, check whether the incoming change ACTION on FULL_PATH would
  * conflict with FULL_PATH's scheduled change. If so, then FULL_PATH
  * is a new tree conflict victim. Raise a persistent tree conflict by
  * appending log actions to LOG_ACCUM. Return a conflict description
  * in *PCONFLICT and set *SKIP_P to TRUE.
  * If no conflicts are found, return NULL in *PCONFLICT and set
  * *SKIP_P to FALSE.
  * When adding a file or directory, the KIND is the kind of the item
  * to be added, and *ADD_EXISTED_P will be set to TRUE if the item is
  * already scheduled for add without history (which is not a
  * conflict). For other actions, KIND and ADD_EXISTED_P are ignored.
  * The edit baton EB gives information including whether the operation is
  * an update or a switch.
  * PARENT_ADM_ACCESS is the admin access baton of FULL_PATH's parent
  * directory.
static svn_error_t *
check_tree_conflict(svn_wc_conflict_description_t **pconflict,
                     svn_boolean_t *skip_p,
                     svn_boolean_t *add_existed_p,
                     struct edit_baton *eb,
                     svn_stringbuf_t *log_accum,
                     const char *full_path,
                     svn_wc_adm_access_t *parent_adm_access,
                     svn_wc_conflict_action_t action,
                     svn_node_kind_t kind,
                     apr_pool_t *pool)

To quote Alan Kay, I believe, "If you write a function with ten
parameters, you've forgotten one." Uh oh.


Stephen Butler | Software Developer
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
fon: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elegosoft.com
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-10-29 16:03:54 CET

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