Quoting Julian Foad <julianfoad_at_btopenworld.com>:
>>
>> Hmm. I've just had a look. I would want the new svn_wc_conflicted_p2()
>> to be rather different from the old ..._p().
>>
>> (1) It needs to take an adm_access. It should take this INSTEAD of an
>> "entry", as it can easily get the entry for itself. There is no need to
>> make the caller do this extra step. The rules for adm_access should
>> probably be, "If there is an open adm access baton for path's parent,
>> then adm_access must be in a set that includes it; and if there is an
>> open adm access baton for path, then adm_access must be in a set that
>> includes it." or something like that.
>>
>> (2) While we're there, we should make all of the output parameters
>> optional.
>>
>> (3) The path need not be the path of a version-controlled object.
>>
>> (4) The old function's path parameter is called "dir_path". Not sure
>> why. The new one should be called just "path" as it applies to any node
>> kind.
>
> (4) OK, I see why it's called "dir_path": (name-of-a-directory,
> entry-from-the-directory) is one way of identifying an item in the WC.
> We need to change (1) and (4) together, so that the new interface is:
> (name-of-an-item, adm-access-for-the-item). This achieves (3).
>
>
>> The old function looks for files on disk as well as what the "entry"
>> says to determine whether there are text and prop conflicts. I don't
>> propose changing that now, even though we have no equivalent behaviour
>> for tree conflicts.
>>
>> - Julian
>
Hi Julian,
Sorry I missed your last email. As it turns out, my new function was
almost exactly like your plan, except I hadn't gotten rid of the entry
arg yet. Now I hope I'll get full marks:
[[[
/** Given a @a path in a dir under version control, decide if it is in
* state of conflict; return the answers in @a *text_conflicted_p, @a
* *prop_conflicted_p, and @a *tree_conflicted_p. If one or two of the
* answers are uninteresting, simply pass NULL pointers.
*
* If @path is unversioned or does not exist, @a *text_conflicted_p and
* @a *prop_conflicted_p will be @c FALSE.
*
* @a adm_access is the admin access baton of the parent directory.
*
* If the @a path has a corresponding text conflict file (with suffix
* .mine, .theirs, etc.) that cannot be found, assume that the text
* conflict has been resolved by the user and return @c FALSE in @a
* *text_conflicted_p.
*
* Similarly, if a property conflicts file (.prej suffix) exists, but
* it cannot be found, assume that the property conflicts have been
* resolved by the user and return @c FALSE in @a *prop_conflicted_p.
*
* @a *tree_conflicted_p can't be auto-resolved in this fashion. An
* explicit `resolved' is needed.
*
* @since New in 1.6.
*/
svn_error_t *
svn_wc_conflicted_p2(svn_boolean_t *text_conflicted_p,
svn_boolean_t *prop_conflicted_p,
svn_boolean_t *tree_conflicted_p,
const char *path,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
]]]
Cheers,
Steve
--
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-24 02:14:42 CEST