You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Neels Janosch Hofmeyr <ne...@elego.de> on 2009/05/24 01:19:36 UTC

ok to fix deprecation in libsvn_repos/reporter.c (drive)?

Is this patch ok?
It doesn't appear to break anything in my `make check`. Just making sure it
wasn't left like this deliberately.

~Neels

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2353234

Re: ok to fix deprecation in libsvn_repos/reporter.c (drive)?

Posted by Stefan Sperling <st...@elego.de>.
On Sun, May 24, 2009 at 03:19:36AM +0200, Neels Janosch Hofmeyr wrote:
> Is this patch ok?

> * subversion/libsvn_repos/reporter.c (drive):
>     Use svn_dirent_dirname() instead of svn_path_dirname() (deprecated).
> 
> --This line, and those below, will be ignored--
> Index: subversion/libsvn_repos/reporter.c
> ===================================================================
> --- subversion/libsvn_repos/reporter.c	(revision 37800)
> +++ subversion/libsvn_repos/reporter.c	(working copy)
> @@ -1144,7 +1144,7 @@ drive(report_baton_t *b, svn_revnum_t s_
>  
>    /* Compute the target path corresponding to the working copy anchor,
>       and check its authorization. */
> -  t_anchor = *b->s_operand ? svn_path_dirname(b->t_path, pool) : b->t_path;
> +  t_anchor = *b->s_operand ? svn_dirent_dirname(b->t_path, pool) : b->t_path;
>    SVN_ERR(check_auth(b, &allowed, t_anchor, pool));
>    if (!allowed)
>      return svn_error_create

Yeah that's OK.

> It doesn't appear to break anything in my `make check`. Just making sure it
> wasn't left like this deliberately.

All the svn_path_* calls come from a time before the dirent/uri API
was introduced. We want to get rid of them all. In theory, we could
deprecate all svn_path_* functions right now, but that would result
in way too many warnings.

So the idea is to phase them out gradually, by deprecating some svn_path
functions, and converting all of those, deprecate some more svn_path
functions, etc.

In your case, the code does not operate on a URL (what is being computed
is a path inside the repository filesystem), so substituting
svn_dirname_dirent should be alright.

Stefan