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

Re: svn commit: r37386 - trunk/subversion/libsvn_wc

From: Greg Stein <gstein_at_gmail.com>
Date: Mon, 20 Apr 2009 17:41:08 +0200

This change fixes stat_test 30 for both wc-1 and wc-ng. That *should*
be the last failure under wc-ng. I'm running the whole test suite,
now, but it looks like wc-ng NOW PASSES ALL TESTS!!!

Woot!! Happy Day!

On Mon, Apr 20, 2009 at 17:31, Greg Stein <gstein_at_gmail.com> wrote:
> Author: gstein
> Date: Mon Apr 20 08:31:19 2009
> New Revision: 37386
>
> Log:
> Fix the get_format code yet again. When running under wc-ng, a missing
> directory's wcroot might get set outside of the get_format function. So we
> need to clear it out and return failure.
>
> Also fix the crawler to recognize WC_MISSING as another acceptable error
> code for missing subdirs.
>
> * subversion/libsvn_wc/wc_db.c:
>  (svn_wc__db_temp_get_format): if the directory path of the requested dir
>    and the wcroot do not match, then we're looking at a parent dir
>    instead of self. meaning self is missing, and (thus) format 0. erase
>    the wcroot so that we'll reexamine the format later, in case the
>    subdir becomes present.
>
> * subversion/libsvn_wc/adm_crawler.c:
>  (report_revisions_and_depths): accept WC_MISSING as another acceptable
>    error code for missing subdirs. PATH_NOT_FOUND is when the directory
>    is just gone. WC_MISSING is when its admin area is toast.
>
> Modified:
>   trunk/subversion/libsvn_wc/adm_crawler.c
>   trunk/subversion/libsvn_wc/wc_db.c
>
> Modified: trunk/subversion/libsvn_wc/adm_crawler.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/adm_crawler.c?pathrev=37386&r1=37385&r2=37386
> ==============================================================================
> --- trunk/subversion/libsvn_wc/adm_crawler.c    Mon Apr 20 08:16:50 2009        (r37385)
> +++ trunk/subversion/libsvn_wc/adm_crawler.c    Mon Apr 20 08:31:19 2009        (r37386)
> @@ -486,8 +486,9 @@ report_revisions_and_depths(svn_wc_adm_a
>                                   svn_node_dir, FALSE, iterpool, iterpool);
>           if (err)
>             {
> -              if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
> -                return err;
> +              if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND
> +                  && err->apr_err != SVN_ERR_WC_MISSING)
> +                return svn_error_return(err);
>               svn_error_clear(err);
>
>               /* We found the directory in the parent, but now it is "not
>
> Modified: trunk/subversion/libsvn_wc/wc_db.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/wc_db.c?pathrev=37386&r1=37385&r2=37386
> ==============================================================================
> --- trunk/subversion/libsvn_wc/wc_db.c  Mon Apr 20 08:16:50 2009        (r37385)
> +++ trunk/subversion/libsvn_wc/wc_db.c  Mon Apr 20 08:31:19 2009        (r37386)
> @@ -3488,6 +3488,21 @@ svn_wc__db_temp_get_format(int *format,
>       SVN_ERR_ASSERT(pdh->wcroot != NULL);
>     }
>
> +  /* ### for per-dir layouts, the wcroot should be this directory. under
> +     ### wc-ng, the wcroot may have become set for this missing subdir.  */
> +  if (strcmp(local_dir_abspath, pdh->wcroot->abspath) != 0)
> +    {
> +      /* Forget the WCROOT so that this directory will be re-examined later,
> +         in case it gets constructed.  */
> +      pdh->wcroot = NULL;
> +
> +      *format = 0;
> +      return svn_error_createf(SVN_ERR_WC_MISSING, NULL,
> +                               _("'%s' is not a working copy"),
> +                               svn_dirent_local_style(local_dir_abspath,
> +                                                      scratch_pool));
> +    }
> +
>   SVN_ERR_ASSERT(pdh->wcroot->format >= 1);
>
>   *format = pdh->wcroot->format;
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1826446
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1826498
Received on 2009-04-20 17:41:28 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.