You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/02/20 16:31:53 UTC

svn commit: r1448234 - /subversion/trunk/subversion/libsvn_wc/copy.c

Author: stsp
Date: Wed Feb 20 15:31:52 2013
New Revision: 1448234

URL: http://svn.apache.org/r1448234
Log:
* subversion/libsvn_wc/copy.c
  (svn_wc__move2): Move some local variable declarations up to the beginning
   of the function. It is small enough to make do without a nested scope.
   No functional change.

Modified:
    subversion/trunk/subversion/libsvn_wc/copy.c

Modified: subversion/trunk/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/copy.c?rev=1448234&r1=1448233&r2=1448234&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/copy.c (original)
+++ subversion/trunk/subversion/libsvn_wc/copy.c Wed Feb 20 15:31:52 2013
@@ -947,6 +947,8 @@ svn_wc__move2(svn_wc_context_t *wc_ctx,
 {
   svn_wc__db_t *db = wc_ctx->db;
   svn_boolean_t move_degraded_to_copy = FALSE;
+  svn_kind_t kind;
+  svn_boolean_t conflicted;
 
   /* Verify that we have the required write locks. */
   SVN_ERR(svn_wc__write_check(wc_ctx->db,
@@ -982,26 +984,21 @@ svn_wc__move2(svn_wc_context_t *wc_ctx,
   if (!metadata_only)
     SVN_ERR(svn_io_file_rename(src_abspath, dst_abspath, scratch_pool));
 
-  {
-    svn_kind_t kind;
-    svn_boolean_t conflicted;
-
-    SVN_ERR(svn_wc__db_read_info(NULL, &kind, NULL, NULL, NULL, NULL, NULL,
-                                 NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                                 NULL, NULL, NULL, NULL, NULL, NULL,
-                                 &conflicted, NULL, NULL, NULL,
-                                 NULL, NULL, NULL,
-                                 db, src_abspath,
-                                 scratch_pool, scratch_pool));
-
-    if (kind == svn_kind_dir)
-      SVN_ERR(remove_all_conflict_markers(db, src_abspath, dst_abspath,
-                                          scratch_pool));
-
-    if (conflicted)
-      SVN_ERR(remove_node_conflict_markers(db, src_abspath, dst_abspath,
-                                           scratch_pool));
-  }
+  SVN_ERR(svn_wc__db_read_info(NULL, &kind, NULL, NULL, NULL, NULL, NULL,
+                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                               NULL, NULL, NULL, NULL, NULL, NULL,
+                               &conflicted, NULL, NULL, NULL,
+                               NULL, NULL, NULL,
+                               db, src_abspath,
+                               scratch_pool, scratch_pool));
+
+  if (kind == svn_kind_dir)
+    SVN_ERR(remove_all_conflict_markers(db, src_abspath, dst_abspath,
+                                        scratch_pool));
+
+  if (conflicted)
+    SVN_ERR(remove_node_conflict_markers(db, src_abspath, dst_abspath,
+                                         scratch_pool));
 
   SVN_ERR(svn_wc__delete_internal(wc_ctx, src_abspath, TRUE, FALSE,
                                   move_degraded_to_copy ? NULL : dst_abspath,