RE: svn commit: r39397 - trunk/subversion/libsvn_wc

Bert Huijben <[email protected]>
Newsgroups gmane.comp.version-control.subversion.rapidsvn.devel,gmane.comp.version-control.subversion.svn
Message-ID <009001ca37a7$7b4695d0$71d3c170$__4032.60742682523$1253199624$gmane$org@nl>
> -----Original Message-----
> From: Hyrum K. Wright [mailto:[email protected]]
> Sent: donderdag 17 september 2009 16:44
> To: svn-lmwclWVctOZK/[email protected]
> Subject: svn commit: r39397 - trunk/subversion/libsvn_wc
> 
> Author: hwright
> Date: Thu Sep 17 07:44:22 2009
> New Revision: 39397
> 
> Log:
> Remove a call to svn_wc_entries_read(), along with an access baton.
> 
> * subversion/libsvn_wc/copy.c
>   (post_copy_cleanup): Fetch the children via the wc_db API, and modify
>     them without the access baton.
> 
> Modified:
>    trunk/subversion/libsvn_wc/copy.c
> 
> Modified: trunk/subversion/libsvn_wc/copy.c
> URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/copy.c?path
> rev=39397&r1=39396&r2=39397
> =======================================================================
> =======
> --- trunk/subversion/libsvn_wc/copy.c	Thu Sep 17 07:39:47 2009
> 	(r39396)
> +++ trunk/subversion/libsvn_wc/copy.c	Thu Sep 17 07:44:22 2009
> 	(r39397)
> @@ -598,49 +598,50 @@ post_copy_cleanup(svn_wc__db_t *db,
>                    const char *local_abspath,
>                    apr_pool_t *pool)
>  {
> -  apr_pool_t *subpool = svn_pool_create(pool);
> -  apr_hash_t *entries;
> -  apr_hash_index_t *hi;
> -  svn_wc_adm_access_t *adm_access;
> +  apr_pool_t *iterpool = svn_pool_create(pool);
> +  const apr_array_header_t *children;
> +  int i;
> 
>    /* Clear the DAV cache.  */
> -  SVN_ERR(svn_wc__db_base_set_dav_cache(db, local_abspath, NULL,
> subpool));
> +  SVN_ERR(svn_wc__db_base_set_dav_cache(db, local_abspath, NULL,
> pool));

You can just use iterpool here. (That is the pool with the shortest lifetime
you have around). Cleared just a few lines below :)

> 
>    /* Because svn_io_copy_dir_recursively() doesn't copy directory
>       permissions, we'll patch up our tree's .svn subdirs to be
>       hidden. */
>  #ifdef APR_FILE_ATTR_HIDDEN
>    {
> -    const char *adm_dir = svn_wc__adm_child(local_abspath, NULL,
> subpool);
> +    const char *adm_dir = svn_wc__adm_child(local_abspath, NULL,
> pool);
>      const char *path_apr;
>      apr_status_t status;
> 
> -    SVN_ERR(svn_path_cstring_from_utf8(&path_apr, adm_dir, subpool));
> +    SVN_ERR(svn_path_cstring_from_utf8(&path_apr, adm_dir, pool));

Same thing.
>      status = apr_file_attrs_set(path_apr,
>                                  APR_FILE_ATTR_HIDDEN,
>                                  APR_FILE_ATTR_HIDDEN,
> -                                subpool);
> +                                pool);

Same thing.

>      if (status)
>        return svn_error_wrap_apr(status, _("Can't hide directory
> '%s'"),
> -                                svn_dirent_local_style(adm_dir,
> subpool));
> +                                svn_dirent_local_style(adm_dir,
> pool));
>    }
>  #endif

Same thing, though in this case the result is almost identical.

	Bert

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=2396040
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.