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

Re: [Fwd: svn commit: r33855 - in branches/tree-conflicts-notify/subversion: include libsvn_client libsvn_wc svn tests/cmdline tests/cmdline/svntest]

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 24 Oct 2008 03:12:12 +0100

On Fri, 2008-10-24 at 02:14 +0200, Stephen Butler wrote:
> 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);
> ]]]

That's lovely.

(Minor wording tweaks to the "If a conflict file exists but cannot be
found" construct would be a bonus.)

Thanks.

- 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-10-24 04:12:42 CEST

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.