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

Re: svn commit: r1296045 - /subversion/trunk/subversion/libsvn_client/commit.c

From: Greg Stein <gstein_at_gmail.com>
Date: Fri, 2 Mar 2012 01:37:40 -0500

Looks like this broke commit_test 26.

On Thu, Mar 1, 2012 at 23:00, <hwright_at_apache.org> wrote:
> Author: hwright
> Date: Fri Mar  2 04:00:26 2012
> New Revision: 1296045
>
> URL: http://svn.apache.org/viewvc?rev=1296045&view=rev
> Log:
> Ev2: Correct the way we calculate the anchor abspath when doing a commit.
>
> Current number of test failures over ra_svn: 483
>
> * subversion/libsvn_client/commit.c
>  (get_ra_editor): Calculate the anchor_abspath using the wcroot abspath.
>...
> +++ subversion/trunk/subversion/libsvn_client/commit.c Fri Mar  2 04:00:26 2012
> @@ -675,10 +675,14 @@ get_ra_editor(svn_ra_session_t **ra_sess
>   if (base_dir_abspath)
>     {
>       const char *relpath;
> +      const char *wcroot_abspath;
> +
> +      SVN_ERR(svn_wc__get_wc_root(&wcroot_abspath, ctx->wc_ctx,
> +                                  base_dir_abspath, pool, pool));
>
>       SVN_ERR(svn_ra_get_path_relative_to_root(*ra_session, &relpath, base_url,
>                                                pool));
> -      anchor_abspath = svn_dirent_join(base_dir_abspath, relpath, pool);
> +      anchor_abspath = svn_dirent_join(wcroot_abspath, relpath, pool);
>     }
>   else
>     anchor_abspath = NULL;

The relpath from the session is likely relative to the *session root*.
But then you use it in conjunction with the *working copy root*. Those
two roots could be different.

For example:
  session_root = http://host/some/repos/root/trunk/subdir
  wcroot = http://host/some/repos/root/trunk

So you could get a relpath from the session of "a/b", which is
supposed to be "subdir/a/b" relative to trunk (the wcroot).

Cheers,
-g
Received on 2012-03-02 07:38:15 CET

This is an archived mail posted to the Subversion Dev mailing list.