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

Re: svn commit: r36049 - trunk/subversion/libsvn_client

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 25 Feb 2009 13:49:28 +0100

On Sun, Feb 22, 2009 at 16:51, Bert Huijben <rhuijben_at_sharpsvn.net> wrote:
>...
> +++ trunk/subversion/libsvn_client/commit.c     Sun Feb 22 07:51:39 2009        (r36049)
>...
> @@ -1502,18 +1501,20 @@ svn_client_commit4(svn_commit_info_t **c
>              Do nothing if target is already the base_dir. */
>           if (strcmp(target, base_dir) != 0)
>             {
> -              svn_path_split(target, &parent_dir, &name, subpool);
> -
> +              const char *parent_dir = svn_dirent_dirname(target, subpool);
>               target = parent_dir;

Just assign target to the function result. Move parent_dir declaration
to the tighter block.

>               while (strcmp(target, base_dir) != 0)
>                 {
> -                  SVN_ERR_ASSERT((target[0] != '\0') &&
> -                                 !svn_dirent_is_root(target, strlen(target)));
> -
>                   APR_ARRAY_PUSH(dirs_to_lock,
>                                  const char *) = apr_pstrdup(pool, target);
> -                  target = svn_path_dirname(target, subpool);
> +
> +                  parent_dir = svn_dirent_dirname(target, subpool);
> +
> +                  if (strmcp(parent_dir, target) == 0)
> +                    break; /* Reached root directory */
> +                  else
> +                    target = parent_dir;

No need for the else.

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1226598
Received on 2009-02-25 13:49:42 CET

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.