You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Rall <dl...@collab.net> on 2006/01/10 23:58:23 UTC

[WC review request] svn commit: r18060 - branches/1.3.x-r17333/subversion/libsvn_wc

I had to rather heavily modify r17333 to get it to apply to the 1.3.x
branch.  I'd appreciate it if those familiar with libsvn_wc would take
a look.

Thanks, Dan


On Tue, 10 Jan 2006, dlr@tigris.org wrote:

> Author: dlr
> Date: Tue Jan 10 18:34:44 2006
> New Revision: 18060
> 
> Modified:
>    branches/1.3.x-r17333/subversion/libsvn_wc/log.c
> 
> Log:
> Merge r17333 for issue #2306 with _heavy_ modification, assuring that
> the file system read-only attribute is updated correctly.
> 
> * subversion/libsvn_wc/log.c
>   (file_xfer_under_path): Handle the case where the "from" and "to"
>    paths are the same by using an intermediate temp file for the
>    "svn_wc__xfer_cp_and_translate" case.
> 
> 
> Modified: branches/1.3.x-r17333/subversion/libsvn_wc/log.c
> Url: http://svn.collab.net/viewcvs/svn/branches/1.3.x-r17333/subversion/libsvn_wc/log.c?rev=18060&p1=branches/1.3.x-r17333/subversion/libsvn_wc/log.c&p2=branches/1.3.x-r17333/subversion/libsvn_wc/log.c&r1=18059&r2=18060
> ==============================================================================
> --- branches/1.3.x-r17333/subversion/libsvn_wc/log.c	(original)
> +++ branches/1.3.x-r17333/subversion/libsvn_wc/log.c	Tue Jan 10 18:34:44 2006
> @@ -116,6 +116,8 @@
>          apr_hash_t *keywords;
>          const char *eol_str;
>          svn_boolean_t special;
> +        apr_file_t *tmp_file;
> +        const char *translate_tgt;
>  
>          /* Note that this action takes properties from dest, not source. */
>          SVN_ERR (svn_wc__get_keywords (&keywords, full_dest_path, adm_access,
> @@ -125,14 +127,32 @@
>          SVN_ERR (svn_wc__get_special (&special, full_dest_path, adm_access,
>                                        pool));
>  
> +        if (strcmp (full_from_path, full_dest_path) == 0)
> +          SVN_ERR (svn_io_open_unique_file (&tmp_file, &translate_tgt,
> +                                            full_from_path,
> +                                            ".tmp",
> +                                            FALSE,
> +                                            pool));
> +        else
> +          translate_tgt = full_dest_path;
> +
>          SVN_ERR (svn_subst_copy_and_translate3 (full_from_path,
> -                                                full_dest_path,
> +                                                translate_tgt,
>                                                  eol_str,
>                                                  TRUE,
>                                                  keywords,
>                                                  TRUE,
>                                                  special,
>                                                  pool));
> +
> +        if (translate_tgt != full_dest_path)
> +          {
> +            SVN_ERR (svn_wc__prep_file_for_replacement (full_dest_path, FALSE,
> +                                                        pool));
> +            SVN_ERR (svn_io_file_rename (translate_tgt, full_dest_path, pool));
> +            SVN_ERR (svn_io_file_close (tmp_file, pool));
> +            SVN_ERR (svn_io_remove_file (translate_tgt, pool));
> +          }
>  
>          SVN_ERR (svn_wc__maybe_set_read_only (NULL, full_dest_path,
>                                                adm_access, pool));
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org

-- 

Daniel Rall