Author: stsp
Date: Mon May 24 17:36:26 2010
New Revision: 947726

URL: http://svn.apache.org/viewvc?rev=947726&view=rev
Log:
* subversion/libsvn_client/patch.c
  (resolve_target_path): Skip obstructions of locally deleted files.
   Fixes a crash that happened when a file was locally deleted and an
   unversioned file of the same name existed.
  (init_patch_target): Just open the file if it exists on disk, without
   also checking whether it is locally deleted. Code elsewhere assumes
   that target->kind_on_disk == svn_node_file alone implies that the
   file has been opened. Let's consistently jive with this assumption
   to keep things simple.

Modified:
    subversion/trunk/subversion/libsvn_client/patch.c

Modified: subversion/trunk/subversion/libsvn_client/patch.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=947726&r1=947725&r2=947726&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Mon May 24 17:36:26 2010
@@ -328,6 +328,10 @@ resolve_target_path(patch_target_t *targ
   /* ### We cannot yet replace a locally deleted dir with a file,
    * ### but some day we might want to allow it. */
 
+  /* ### Shouldn't libsvn_wc flag an obstruction in this case? */
+  if (target->locally_deleted && target->kind_on_disk != svn_node_none)
+    target->skipped = TRUE;
+
   return SVN_NO_ERROR;
 }
 
@@ -375,7 +379,7 @@ init_patch_target(patch_target_t **patch
       apr_size_t len;
 
 
-      if (target->kind_on_disk == svn_node_file && ! target->locally_deleted)
+      if (target->kind_on_disk == svn_node_file)
         {
           /* Open the file. */
           SVN_ERR(svn_io_file_open(&target->file, target->local_abspath,


Reply via email to