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

Re: [PATCH] Clarify svn_path_is_child() result when child==parent

From: David James <james82_at_gmail.com>
Date: 2005-09-05 18:53:26 CEST

On 9/5/05, Julian Foad <julianfoad@btopenworld.com> wrote:
> I'm posting this for review because this function says that "child == parent"
> is not a child whereas I would have expected the opposite behaviour: saying it
> IS a child, of length zero. I think it's too late to change it, and we might
> not want to anyway, so we should just document it, as this patch does.
>
> Agreements or other thoughts?
Looks good! +0

Cheers,

David

>
> - Julian
>
>
> Clarify a doc string.
>
> * subversion/include/svn_path.h
> (svn_path_is_child): Explicitly document the result when the path being
> tested is identical to the parent path.
>
> Index: subversion/include/svn_path.h
> ===================================================================
> --- subversion/include/svn_path.h (revision 16034)
> +++ subversion/include/svn_path.h (working copy)
> @@ -351,6 +351,9 @@ svn_boolean_t svn_path_is_backpath_prese
> * Both paths must be in canonical form, and must either be absolute,
> * or contain no ".." components.
> *
> + * If @a path2 is the same as @a path1, it is not considered a child, so the
> + * result is @c NULL; an empty string is never returned.
> + *
> * ### todo: the ".." restriction is unfortunate, and would ideally
> * be lifted by making the implementation smarter. But this is not
> * trivial: if the path is "../foo", how do you know whether or not
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

-- 
David James -- http://www.cs.toronto.edu/~james
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Sep 5 18:54:18 2005

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.