subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r919405 - /subversion/trunk/subversion/libsvn_client/patch.c
Date Fri, 05 Mar 2010 13:34:10 GMT
Author: stsp
Date: Fri Mar  5 13:34:09 2010
New Revision: 919405

URL: http://svn.apache.org/viewvc?rev=919405&view=rev
Log:
* subversion/libsvn_client/patch.c
  (check_local_mods): Remove. This helper isn't needed anymore since
   we don't check unversioned files for local modifications anymore.
  (init_patch_target): Call svn_wc_text_modified_p2() directly.

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=919405&r1=919404&r2=919405&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Fri Mar  5 13:34:09 2010
@@ -315,34 +315,6 @@
   return SVN_NO_ERROR;
 }
 
-/* Indicate in *LOCAL_MODS whether the file at LOCAL_ABSPATH, has local
-   modifications. */
-static svn_error_t *
-check_local_mods(svn_boolean_t *local_mods,
-                 svn_wc_context_t *wc_ctx,
-                 const char *local_abspath,
-                 apr_pool_t *pool)
-{
-  svn_error_t *err;
-
-  err = svn_wc_text_modified_p2(local_mods, wc_ctx, local_abspath, FALSE,
-                                pool);
-  if (err)
-    {
-      if (err->apr_err == SVN_ERR_ENTRY_NOT_FOUND)
-        {
-          /* The target file is not versioned, that's OK.
-           * We can treat it as unmodified. */
-          svn_error_clear(err);
-          *local_mods = FALSE;
-        }
-      else
-        return svn_error_return(err);
-    }
-
-  return SVN_NO_ERROR;
-}
-
 /* Attempt to initialize a *PATCH_TARGET structure for a target file
  * described by PATCH. Use working copy context WC_CTX.
  * STRIP_COUNT specifies the number of leading path components
@@ -432,8 +404,9 @@
                                                     FALSE, result_pool);
 
           /* Also check the file for local mods and the Xbit. */
-          SVN_ERR(check_local_mods(&target->local_mods, wc_ctx,
-                                   target->abs_path, scratch_pool));
+          SVN_ERR(svn_wc_text_modified_p2(&target->local_mods, wc_ctx,
+                                          target->abs_path, FALSE,
+                                          scratch_pool));
           SVN_ERR(svn_io_is_file_executable(&target->executable,
                                             target->abs_path,
                                             scratch_pool));



Mime
View raw message