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

Re: svn commit: r27222 - branches/svnpatch-diff/subversion/libsvn_client

From: Charles Acknin <charlesacknin_at_gmail.com>
Date: 2007-10-17 22:41:41 CEST

Actually it looks like so:

[[[
* subversion/libsvn_wc/copy.c
  (copy_file_administratively): when the source file is missing, use its
  text-base instead.
  (svn_wc_copy2): assume the source file can be missing from disk.
]]]

[[[
Index: subversion/libsvn_wc/copy.c
===================================================================
--- subversion/libsvn_wc/copy.c (revision 27227)
+++ subversion/libsvn_wc/copy.c (working copy)
@@ -385,7 +385,7 @@
                            void *notify_baton,
                            apr_pool_t *pool)
 {
- svn_node_kind_t dst_kind;
+ svn_node_kind_t dst_kind, src_kind;
   const svn_wc_entry_t *src_entry, *dst_entry;

   /* The 'dst_path' is simply dst_parent/dst_basename */
@@ -481,7 +481,14 @@
                                                 FALSE, special, pool));
         }
       else
- SVN_ERR(svn_io_copy_file(src_path, tmp_wc_text, TRUE, pool));
+ {
+ SVN_ERR(svn_io_check_path(src_path, &src_kind, pool));
+
+ if (src_kind == svn_node_none)
+ SVN_ERR(svn_io_copy_file(src_txtb, tmp_wc_text, FALSE, pool));
+ else
+ SVN_ERR(svn_io_copy_file(src_path, tmp_wc_text, TRUE, pool));
+ }
     }

     SVN_ERR(svn_wc_add_repos_file2(dst_path, dst_parent,
@@ -808,7 +815,7 @@

   SVN_ERR(svn_io_check_path(src_path, &src_kind, pool));

- if (src_kind == svn_node_file)
+ if (src_kind == svn_node_file || src_kind == svn_node_none)
     {
       /* Check if we are copying a file scheduled for addition,
          these require special handling. */
]]]

svn_wc.h:svn_wc_copy2()'s docstring would need a little fix accordingly.

Does that look fine? (copy_tests.py pass with success)

Charles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 17 23:19:53 2007

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.