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

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

From: Stefan Sperling <stsp_at_elego.de>
Date: Sun, 24 May 2009 12:37:14 +0100

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
Received on 2009-05-24 13:38:03 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.