You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/04/14 08:51:03 UTC

svn commit: r933863 [4/5] - in /subversion/branches/svn-patch-improvements: ./ notes/commit-access-templates/ notes/wc-ng/ subversion/bindings/javahl/native/ subversion/bindings/swig/ruby/svn/ subversion/bindings/swig/ruby/test/ subversion/include/ sub...

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc.h?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc.h Wed Apr 14 06:51:00 2010
@@ -421,8 +421,7 @@ svn_wc__internal_text_modified_p(svn_boo
    the (loggy) implementation.
 */
 svn_error_t *
-svn_wc__internal_merge(svn_stringbuf_t **log_accum,
-                       enum svn_wc_merge_outcome_t *merge_outcome,
+svn_wc__internal_merge(enum svn_wc_merge_outcome_t *merge_outcome,
                        svn_wc__db_t *db,
                        const char *left_abspath,
                        const svn_wc_conflict_version_t *left_version,
@@ -602,6 +601,13 @@ svn_wc__internal_node_get_url(const char
                               apr_pool_t *scratch_pool);
 
 
+svn_error_t *
+svn_wc__internal_is_file_external(svn_boolean_t *file_external,
+                                  svn_wc__db_t *db,
+                                  const char *local_abspath,
+                                  apr_pool_t *scratch_pool);
+
+
 /* Upgrade the wc sqlite database given in SDB for the wc located at
    WCROOT_ABSPATH. It's current/starting format is given by START_FORMAT.
    After the upgrade is complete (to as far as the automatic upgrade will
@@ -615,17 +621,17 @@ svn_wc__upgrade_sdb(int *result_format,
                     apr_pool_t *scratch_pool);
 
 
-/* Checks whether a node is a working copy root or switched.
+/* Check whether a node is a working copy root or switched.
  *
- * If LOCAL_ABSPATH is the root of a working copy set WC_ROOT to TRUE,
+ * If LOCAL_ABSPATH is the root of a working copy, set *WC_ROOT to TRUE,
  * otherwise to FALSE.
  *
+ * If KIND is not null, set *KIND to the node type of LOCAL_ABSPATH.
+ *
  * If LOCAL_ABSPATH is switched against its parent in the same working copy
- * set *SWITCHED to TRUE, otherwise to FALSE. SWITCHED can be set to NULL
+ * set *SWITCHED to TRUE, otherwise to FALSE.  SWITCHED can be NULL
  * if the result is not important.
  *
- * If KIND is not null *KIND is set to the node type of LOCAL_ABSPATH
- *
  * Use SCRATCH_POOL for temporary allocations.
  */
 svn_error_t *

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc_db.c?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc_db.c Wed Apr 14 06:51:00 2010
@@ -239,6 +239,12 @@ typedef struct {
   /* for inserting symlinks */
   const char *target;
 
+  /* may need to insert/update ACTUAL to record a conflict  */
+  const svn_skel_t *conflict;
+
+  /* may have work items to queue in this transaction  */
+  const svn_skel_t *work_items;
+
 } insert_base_baton_t;
 
 
@@ -264,6 +270,13 @@ static const svn_token_map_t presence_ma
 };
 
 
+/* Forward declarations  */
+static svn_error_t *
+add_work_items(svn_sqlite__db_t *sdb,
+               const svn_skel_t *skel,
+               apr_pool_t *scratch_pool);
+
+
 /* */
 static svn_filesize_t
 get_translated_size(svn_sqlite__stmt_t *stmt, int slot)
@@ -538,7 +551,7 @@ fetch_repos_info(const char **repos_root
   SVN_ERR(svn_sqlite__bindf(stmt, "i", repos_id));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
   if (!have_row)
-    return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
+    return svn_error_createf(SVN_ERR_WC_CORRUPT, svn_sqlite__reset(stmt),
                              _("No REPOSITORY table entry for id '%ld'"),
                              (long int)repos_id);
 
@@ -802,7 +815,7 @@ fetch_wc_id(apr_int64_t *wc_id,
   SVN_ERR(svn_sqlite__get_statement(&stmt, sdb, STMT_SELECT_WCROOT_NULL));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
   if (!have_row)
-    return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
+    return svn_error_createf(SVN_ERR_WC_CORRUPT, svn_sqlite__reset(stmt),
                              _("Missing a row in WCROOT."));
 
   SVN_ERR_ASSERT(!svn_sqlite__column_is_null(stmt, 0));
@@ -1332,6 +1345,19 @@ create_repos_id(apr_int64_t *repos_id,
 }
 
 
+/* Initialize the baton with appropriate "blank" values. This allows the
+   insertion function to leave certain columns null.  */
+static void
+blank_ibb(insert_base_baton_t *pibb)
+{
+  memset(pibb, 0, sizeof(*pibb));
+  pibb->revision = SVN_INVALID_REVNUM;
+  pibb->changed_rev = SVN_INVALID_REVNUM;
+  pibb->depth = svn_depth_infinity;
+  pibb->translated_size = SVN_INVALID_FILESIZE;
+}
+
+
 /* */
 static svn_error_t *
 insert_base_node(void *baton, svn_sqlite__db_t *sdb, apr_pool_t *scratch_pool)
@@ -1339,6 +1365,9 @@ insert_base_node(void *baton, svn_sqlite
   const insert_base_baton_t *pibb = baton;
   svn_sqlite__stmt_t *stmt;
 
+  /* ### we can't handle this right now  */
+  SVN_ERR_ASSERT(pibb->conflict == NULL);
+
   SVN_ERR(svn_sqlite__get_statement(&stmt, sdb, STMT_INSERT_BASE_NODE));
   SVN_ERR(svn_sqlite__bindf(stmt, "is", pibb->wc_id, pibb->local_relpath));
 
@@ -1409,6 +1438,8 @@ insert_base_node(void *baton, svn_sqlite
         }
     }
 
+  SVN_ERR(add_work_items(sdb, pibb->work_items, scratch_pool));
+
   return SVN_NO_ERROR;
 }
 
@@ -1703,6 +1734,8 @@ svn_wc__db_init(svn_wc__db_t *db,
   /* The PDH is complete. Stash it into DB.  */
   apr_hash_set(db->dir_data, pdh->local_abspath, APR_HASH_KEY_STRING, pdh);
 
+  blank_ibb(&ibb);
+
   if (initial_rev > 0)
     ibb.status = svn_wc__db_status_incomplete;
   else
@@ -1714,14 +1747,12 @@ svn_wc__db_init(svn_wc__db_t *db,
   ibb.repos_relpath = repos_relpath;
   ibb.revision = initial_rev;
 
-  ibb.props = NULL;
-  ibb.changed_rev = SVN_INVALID_REVNUM;
-  ibb.changed_date = 0;
-  ibb.changed_author = NULL;
-
+  /* ### what about the children?  */
   ibb.children = NULL;
   ibb.depth = depth;
 
+  /* ### no children, conflicts, or work items to install in a txn... */
+
   return svn_error_return(insert_base_node(&ibb, sdb, scratch_pool));
 }
 
@@ -1739,6 +1770,8 @@ svn_wc__db_base_add_directory(svn_wc__db
                               const char *changed_author,
                               const apr_array_header_t *children,
                               svn_depth_t depth,
+                              const svn_skel_t *conflict,
+                              const svn_skel_t *work_items,
                               apr_pool_t *scratch_pool)
 {
   svn_wc__db_pdh_t *pdh;
@@ -1753,7 +1786,9 @@ svn_wc__db_base_add_directory(svn_wc__db
   SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(revision));
   SVN_ERR_ASSERT(props != NULL);
   SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(changed_rev));
+#if 0
   SVN_ERR_ASSERT(children != NULL);
+#endif
 
   SVN_ERR(parse_local_abspath(&pdh, &local_relpath, db, local_abspath,
                               svn_sqlite__mode_readwrite,
@@ -1763,6 +1798,8 @@ svn_wc__db_base_add_directory(svn_wc__db
   SVN_ERR(create_repos_id(&repos_id, repos_root_url, repos_uuid,
                           pdh->wcroot->sdb, scratch_pool));
 
+  blank_ibb(&ibb);
+
   ibb.status = svn_wc__db_status_normal;
   ibb.kind = svn_wc__db_kind_dir;
   ibb.wc_id = pdh->wcroot->wc_id;
@@ -1779,13 +1816,20 @@ svn_wc__db_base_add_directory(svn_wc__db
   ibb.children = children;
   ibb.depth = depth;
 
+  ibb.conflict = conflict;
+  ibb.work_items = work_items;
+
   /* Insert the directory and all its children transactionally.
 
      Note: old children can stick around, even if they are no longer present
      in this directory's revision.  */
-  return svn_sqlite__with_transaction(pdh->wcroot->sdb,
-                                      insert_base_node, &ibb,
-                                      scratch_pool);
+  SVN_ERR(svn_sqlite__with_transaction(pdh->wcroot->sdb,
+                                       insert_base_node, &ibb,
+                                       scratch_pool));
+
+  /* ### worry about flushing child subdirs?  */
+  flush_entries(pdh);
+  return SVN_NO_ERROR;
 }
 
 
@@ -1802,6 +1846,8 @@ svn_wc__db_base_add_file(svn_wc__db_t *d
                          const char *changed_author,
                          const svn_checksum_t *checksum,
                          svn_filesize_t translated_size,
+                         const svn_skel_t *conflict,
+                         const svn_skel_t *work_items,
                          apr_pool_t *scratch_pool)
 {
   svn_wc__db_pdh_t *pdh;
@@ -1826,6 +1872,8 @@ svn_wc__db_base_add_file(svn_wc__db_t *d
   SVN_ERR(create_repos_id(&repos_id, repos_root_url, repos_uuid,
                           pdh->wcroot->sdb, scratch_pool));
 
+  blank_ibb(&ibb);
+
   ibb.status = svn_wc__db_status_normal;
   ibb.kind = svn_wc__db_kind_file;
   ibb.wc_id = pdh->wcroot->wc_id;
@@ -1842,11 +1890,19 @@ svn_wc__db_base_add_file(svn_wc__db_t *d
   ibb.checksum = checksum;
   ibb.translated_size = translated_size;
 
+  ibb.conflict = conflict;
+  ibb.work_items = work_items;
+
   /* ### hmm. if this used to be a directory, we should remove children.
      ### or maybe let caller deal with that, if there is a possibility
      ### of a node kind change (rather than eat an extra lookup here).  */
 
-  return insert_base_node(&ibb, pdh->wcroot->sdb, scratch_pool);
+  SVN_ERR(svn_sqlite__with_transaction(pdh->wcroot->sdb,
+                                       insert_base_node, &ibb,
+                                       scratch_pool));
+
+  flush_entries(pdh);
+  return SVN_NO_ERROR;
 }
 
 
@@ -1862,6 +1918,8 @@ svn_wc__db_base_add_symlink(svn_wc__db_t
                             apr_time_t changed_date,
                             const char *changed_author,
                             const char *target,
+                            const svn_skel_t *conflict,
+                            const svn_skel_t *work_items,
                             apr_pool_t *scratch_pool)
 {
   svn_wc__db_pdh_t *pdh;
@@ -1886,6 +1944,8 @@ svn_wc__db_base_add_symlink(svn_wc__db_t
   SVN_ERR(create_repos_id(&repos_id, repos_root_url, repos_uuid,
                           pdh->wcroot->sdb, scratch_pool));
 
+  blank_ibb(&ibb);
+
   ibb.status = svn_wc__db_status_normal;
   ibb.kind = svn_wc__db_kind_symlink;
   ibb.wc_id = pdh->wcroot->wc_id;
@@ -1901,11 +1961,19 @@ svn_wc__db_base_add_symlink(svn_wc__db_t
 
   ibb.target = target;
 
+  ibb.conflict = conflict;
+  ibb.work_items = work_items;
+
   /* ### hmm. if this used to be a directory, we should remove children.
      ### or maybe let caller deal with that, if there is a possibility
      ### of a node kind change (rather than eat an extra lookup here).  */
 
-  return insert_base_node(&ibb, pdh->wcroot->sdb, scratch_pool);
+  SVN_ERR(svn_sqlite__with_transaction(pdh->wcroot->sdb,
+                                       insert_base_node, &ibb,
+                                       scratch_pool));
+
+  flush_entries(pdh);
+  return SVN_NO_ERROR;
 }
 
 
@@ -1918,6 +1986,8 @@ svn_wc__db_base_add_absent_node(svn_wc__
                                 svn_revnum_t revision,
                                 svn_wc__db_kind_t kind,
                                 svn_wc__db_status_t status,
+                                const svn_skel_t *conflict,
+                                const svn_skel_t *work_items,
                                 apr_pool_t *scratch_pool)
 {
   svn_wc__db_pdh_t *pdh;
@@ -1942,6 +2012,8 @@ svn_wc__db_base_add_absent_node(svn_wc__
   SVN_ERR(create_repos_id(&repos_id, repos_root_url, repos_uuid,
                           pdh->wcroot->sdb, scratch_pool));
 
+  blank_ibb(&ibb);
+
   ibb.status = status;
   ibb.kind = kind;
   ibb.wc_id = pdh->wcroot->wc_id;
@@ -1950,11 +2022,6 @@ svn_wc__db_base_add_absent_node(svn_wc__
   ibb.repos_relpath = repos_relpath;
   ibb.revision = revision;
 
-  ibb.props = NULL;
-  ibb.changed_rev = SVN_INVALID_REVNUM;
-  ibb.changed_date = 0;
-  ibb.changed_author = NULL;
-
   /* Depending upon KIND, any of these might get used. */
   ibb.children = NULL;
   ibb.depth = svn_depth_unknown;
@@ -1962,13 +2029,18 @@ svn_wc__db_base_add_absent_node(svn_wc__
   ibb.translated_size = SVN_INVALID_FILESIZE;
   ibb.target = NULL;
 
+  ibb.conflict = conflict;
+  ibb.work_items = work_items;
+
   /* ### hmm. if this used to be a directory, we should remove children.
      ### or maybe let caller deal with that, if there is a possibility
      ### of a node kind change (rather than eat an extra lookup here).  */
 
-  SVN_ERR(insert_base_node(&ibb, pdh->wcroot->sdb, scratch_pool));
-  flush_entries(pdh);
+  SVN_ERR(svn_sqlite__with_transaction(pdh->wcroot->sdb,
+                                       insert_base_node, &ibb,
+                                       scratch_pool));
 
+  flush_entries(pdh);
   return SVN_NO_ERROR;
 }
 
@@ -2025,7 +2097,10 @@ svn_wc__db_temp_base_add_subdir(svn_wc__
   ibb.children = NULL;
   ibb.depth = depth;
 
-  return insert_base_node(&ibb, pdh->wcroot->sdb, scratch_pool);
+  /* ### no children, conflicts, or work items to install in a txn... */
+
+  return svn_error_return(insert_base_node(&ibb, pdh->wcroot->sdb,
+                                           scratch_pool));
 }
 
 
@@ -2414,13 +2489,10 @@ svn_wc__db_base_get_dav_cache(apr_hash_t
                                  STMT_SELECT_BASE_DAV_CACHE, scratch_pool));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
   if (!have_row)
-    {
-      SVN_ERR(svn_sqlite__reset(stmt));
-      return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-                               _("The node '%s' was not found."),
-                               svn_dirent_local_style(local_abspath,
-                                                      scratch_pool));
-    }
+    return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, svn_sqlite__reset(stmt),
+                             _("The node '%s' was not found."),
+                             svn_dirent_local_style(local_abspath,
+                                                    scratch_pool));
 
   SVN_ERR(svn_sqlite__column_properties(props, stmt, 0, result_pool,
                                         scratch_pool));
@@ -3224,21 +3296,56 @@ svn_wc__db_temp_op_remove_entry(svn_wc__
 }
 
 
+static svn_error_t *
+update_depth_values(svn_wc__db_pdh_t *pdh,
+                    const char *local_relpath,
+                    svn_depth_t depth)
+{
+  svn_boolean_t excluded = (depth == svn_depth_exclude);
+  svn_sqlite__stmt_t *stmt;
+
+  /* Flush any entries before we start monkeying the database.  */
+  flush_entries(pdh);
+
+  /* Parent stubs have only two depth options: excluded, or infinity.  */
+  if (*local_relpath != '\0' && !excluded)
+    depth = svn_depth_infinity;
+
+  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
+                                    excluded
+                                      ? STMT_UPDATE_BASE_EXCLUDED
+                                      : STMT_UPDATE_BASE_DEPTH));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, local_relpath));
+  if (!excluded)
+    SVN_ERR(svn_sqlite__bind_text(stmt, 3, svn_depth_to_word(depth)));
+  SVN_ERR(svn_sqlite__step_done(stmt));
+
+  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
+                                    excluded
+                                      ? STMT_UPDATE_WORKING_EXCLUDED
+                                      : STMT_UPDATE_WORKING_DEPTH));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, local_relpath));
+  if (!excluded)
+    SVN_ERR(svn_sqlite__bind_text(stmt, 3, svn_depth_to_word(depth)));
+  SVN_ERR(svn_sqlite__step_done(stmt));
+
+  return SVN_NO_ERROR;
+}
+
+
 svn_error_t *
 svn_wc__db_temp_op_set_dir_depth(svn_wc__db_t *db,
                                  const char *local_abspath,
                                  svn_depth_t depth,
-                                 svn_boolean_t flush_entry_cache,
-                                 apr_pool_t *scratch_pool)
+                                  apr_pool_t *scratch_pool)
 {
   svn_wc__db_pdh_t *pdh;
-  svn_sqlite__stmt_t *stmt;
-  const char *current_relpath;
+  const char *local_relpath;
 
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath) &&
-                 depth >= svn_depth_empty && depth <= svn_depth_infinity);
+  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+  SVN_ERR_ASSERT(depth >= svn_depth_empty && depth <= svn_depth_infinity);
 
-  SVN_ERR(parse_local_abspath(&pdh, &current_relpath, db, local_abspath,
+  SVN_ERR(parse_local_abspath(&pdh, &local_relpath, db, local_abspath,
                               svn_sqlite__mode_readwrite,
                               scratch_pool, scratch_pool));
   VERIFY_USABLE_PDH(pdh);
@@ -3246,38 +3353,29 @@ svn_wc__db_temp_op_set_dir_depth(svn_wc_
   /* ### We set depth on working and base to match entry behavior.
          Maybe these should be separated later? */
 
-  if (flush_entry_cache)
-    flush_entries(pdh);
-
-  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                    STMT_UPDATE_BASE_DEPTH));
-  SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, current_relpath));
-  SVN_ERR(svn_sqlite__bind_text(stmt, 3, svn_depth_to_word(depth)));
-  SVN_ERR(svn_sqlite__step_done(stmt));
+  SVN_ERR(update_depth_values(pdh, local_relpath, depth));
 
-  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                    STMT_UPDATE_WORKING_DEPTH));
-  SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, current_relpath));
-  SVN_ERR(svn_sqlite__bind_text(stmt, 3, svn_depth_to_word(depth)));
-  SVN_ERR(svn_sqlite__step_done(stmt));
-
-  /* Check if we should also set depth in the parent db */
-  if (flush_entry_cache && strcmp(current_relpath, "") == 0)
+  /* If we're in the subdir, then navigate to the parent to set its
+     depth value.  */
+  if (*local_relpath == '\0')
     {
       svn_error_t *err;
 
       err = navigate_to_parent(&pdh, db, pdh, svn_sqlite__mode_readwrite,
                                scratch_pool);
-      if (err && err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
+      if (err)
         {
+          if (err->apr_err != SVN_ERR_WC_NOT_WORKING_COPY)
+            return svn_error_return(err);
+
           /* No parent to update */
           svn_error_clear(err);
           return SVN_NO_ERROR;
         }
-      else
-        SVN_ERR(err);
 
-      flush_entries(pdh);
+      /* Get the stub name, and update the depth.  */
+      local_relpath = svn_dirent_basename(local_abspath, scratch_pool);
+      SVN_ERR(update_depth_values(pdh, local_relpath, depth));
     }
 
   return SVN_NO_ERROR;
@@ -4698,6 +4796,7 @@ struct update_baton {
 svn_error_t *
 svn_wc__db_global_update(svn_wc__db_t *db,
                          const char *local_abspath,
+                         svn_wc__db_kind_t new_kind,
                          const char *new_repos_relpath,
                          svn_revnum_t new_revision,
                          const apr_hash_t *new_props,
@@ -4707,6 +4806,7 @@ svn_wc__db_global_update(svn_wc__db_t *d
                          const apr_array_header_t *new_children,
                          const svn_checksum_t *new_checksum,
                          const char *new_target,
+                         const apr_hash_t *new_dav_cache,
                          const svn_skel_t *conflict,
                          const svn_skel_t *work_items,
                          apr_pool_t *scratch_pool)
@@ -5030,15 +5130,12 @@ svn_wc__db_scan_addition(svn_wc__db_stat
       if (!have_row)
         {
           if (current_abspath == local_abspath)
-            {
-              svn_error_clear(svn_sqlite__reset(stmt));
-
-              /* ### maybe we should return a usage error instead?  */
-              return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-                                       _("The node '%s' was not found."),
-                                       svn_dirent_local_style(local_abspath,
-                                                              scratch_pool));
-            }
+            /* ### maybe we should return a usage error instead?  */
+            return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND,
+                                     svn_sqlite__reset(stmt),
+                                     _("The node '%s' was not found."),
+                                     svn_dirent_local_style(local_abspath,
+                                                            scratch_pool));
           SVN_ERR(svn_sqlite__reset(stmt));
 
           /* We just fell off the top of the WORKING tree. If we haven't
@@ -5067,13 +5164,11 @@ svn_wc__db_scan_addition(svn_wc__db_stat
 
           /* The starting node should exist normally.  */
           if (presence != svn_wc__db_status_normal)
-            {
-              svn_error_clear(svn_sqlite__reset(stmt));
-              return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
-                                       _("Expected node '%s' to be added."),
-                                       svn_dirent_local_style(local_abspath,
-                                                              scratch_pool));
-            }
+            return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS,
+                                     svn_sqlite__reset(stmt),
+                                     _("Expected node '%s' to be added."),
+                                     svn_dirent_local_style(local_abspath,
+                                                            scratch_pool));
 
           /* Provide the default status; we'll override as appropriate. */
           if (status)
@@ -5222,14 +5317,11 @@ svn_wc__db_scan_deletion(const char **ba
         {
           /* There better be a row for the starting node!  */
           if (current_abspath == local_abspath)
-            {
-              svn_error_clear(svn_sqlite__reset(stmt));
-
-              return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-                                       _("The node '%s' was not found."),
-                                       svn_dirent_local_style(local_abspath,
-                                                              scratch_pool));
-            }
+            return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND,
+                                     svn_sqlite__reset(stmt),
+                                     _("The node '%s' was not found."),
+                                     svn_dirent_local_style(local_abspath,
+                                                            scratch_pool));
 
           /* There are no values, so go ahead and reset the stmt now.  */
           SVN_ERR(svn_sqlite__reset(stmt));
@@ -5276,7 +5368,8 @@ svn_wc__db_scan_deletion(const char **ba
       if (current_abspath == local_abspath
           && work_presence != svn_wc__db_status_not_present
           && work_presence != svn_wc__db_status_base_deleted)
-        return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
+        return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS,
+                                 svn_sqlite__reset(stmt),
                                  _("Expected node '%s' to be deleted."),
                                  svn_dirent_local_style(local_abspath,
                                                         scratch_pool));
@@ -5431,7 +5524,7 @@ svn_wc__db_upgrade_get_repos_id(apr_int6
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
 
   if (!have_row)
-    return svn_error_createf(SVN_ERR_WC_DB_ERROR, NULL,
+    return svn_error_createf(SVN_ERR_WC_DB_ERROR, svn_sqlite__reset(stmt),
                              _("Repository '%s' not found in the database"),
                              repos_root_url);
 
@@ -6065,12 +6158,7 @@ svn_wc__db_read_conflict_victims(const a
         }
     }
 
-  {
-    apr_array_header_t *victim_array;
-    SVN_ERR(svn_hash_keys(&victim_array, found, result_pool));
-
-    *victims = victim_array;
-  }
+  SVN_ERR(svn_hash_keys((apr_array_header_t **)victims, found, result_pool));
 
   return SVN_NO_ERROR;
 }
@@ -6502,50 +6590,6 @@ svn_wc__db_temp_op_set_working_incomplet
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_wc__db_temp_op_set_base_last_change(svn_wc__db_t *db,
-                                        const char *local_abspath,
-                                        svn_revnum_t changed_rev,
-                                        apr_time_t changed_date,
-                                        const char *changed_author,
-                                        apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  svn_sqlite__stmt_t *stmt;
-  const char *local_relpath;
-  int affected;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
-
-  SVN_ERR(parse_local_abspath(&pdh, &local_relpath, db, local_abspath,
-                              svn_sqlite__mode_readwrite,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                    STMT_UPDATE_BASE_LAST_CHANGE));
-
-  SVN_ERR(svn_sqlite__bindf(stmt, "isiis",
-                            pdh->wcroot->wc_id, local_relpath,
-                            (apr_int64_t)changed_rev,
-                            (apr_int64_t)changed_date,
-                            changed_author));
-
-  SVN_ERR(svn_sqlite__update(&affected, stmt));
-
-  /* ### Theoretically this check can fail if all the values match
-         the values in the database. But we only call this function
-         if the revision changes */
-  if (affected != 1)
-    return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-                             _("'%s' has no BASE_NODE"),
-                             svn_dirent_local_style(local_abspath,
-                                                    scratch_pool));
-
-  flush_entries(pdh);
-
-  return SVN_NO_ERROR;
-}
 
 svn_error_t *
 svn_wc__db_temp_op_set_working_last_change(svn_wc__db_t *db,
@@ -6648,7 +6692,7 @@ start_directory_update_txn(void *baton,
 svn_error_t *
 svn_wc__db_temp_op_start_directory_update(svn_wc__db_t *db,
                                           const char *local_abspath,
-                                          const char* new_repos_relpath,
+                                          const char *new_repos_relpath,
                                           svn_revnum_t new_rev,
                                           apr_pool_t *scratch_pool)
 {
@@ -7094,7 +7138,10 @@ svn_wc__db_temp_elide_copyfrom(svn_wc__d
   /* Now we need to determine if the child's values are derivable from
      the parent values.  */
 
-  /* If the revision numbers are not the same, then easy exit.  */
+  /* If the revision numbers are not the same, then easy exit.
+
+     Note that we *can* have a mixed-rev copied subtree. We don't want
+     to elide the copyfrom information for these cases.  */
   if (original_revision != parent_revision)
     return SVN_NO_ERROR;
 
@@ -7131,3 +7178,113 @@ svn_wc__db_temp_elide_copyfrom(svn_wc__d
 
   return SVN_NO_ERROR;
 }
+
+
+svn_error_t *
+svn_wc__db_temp_get_file_external(const char **serialized_file_external,
+                                  svn_wc__db_t *db,
+                                  const char *local_abspath,
+                                  apr_pool_t *result_pool,
+                                  apr_pool_t *scratch_pool)
+{
+  svn_sqlite__stmt_t *stmt;
+  svn_boolean_t have_row;
+
+  SVN_ERR(get_statement_for_path(&stmt, db, local_abspath,
+                                 STMT_SELECT_FILE_EXTERNAL, scratch_pool));
+  SVN_ERR(svn_sqlite__step(&have_row, stmt));
+
+  /* ### file externals are pretty bogus right now. they have just a
+     ### WORKING_NODE for a while, eventually settling into just a BASE_NODE.
+     ### until we get all that fixed, let's just not worry about raising
+     ### an error, and just say it isn't a file external.  */
+#if 1
+  if (!have_row)
+    *serialized_file_external = NULL;
+  else
+    /* see below: *serialized_file_external = ...  */
+#else
+  if (!have_row)
+    return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND,
+                             svn_sqlite__reset(stmt),
+                             _("'%s' has no BASE_NODE"),
+                             svn_dirent_local_style(local_abspath,
+                                                    scratch_pool));
+#endif
+
+  *serialized_file_external = svn_sqlite__column_text(stmt, 0, result_pool);
+
+  return svn_error_return(svn_sqlite__reset(stmt));
+}
+
+
+svn_error_t *
+svn_wc__db_get_pristine_md5(const svn_checksum_t **md5_checksum,
+                            svn_wc__db_t *db,
+                            const char *wri_abspath,
+                            const svn_checksum_t *sha1_checksum,
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool)
+{
+  svn_wc__db_pdh_t *pdh;
+  const char *local_relpath;
+  svn_sqlite__stmt_t *stmt;
+  svn_boolean_t have_row;
+
+  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
+  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
+  VERIFY_CHECKSUM_KIND(sha1_checksum);
+
+  SVN_ERR(parse_local_abspath(&pdh, &local_relpath, db, wri_abspath,
+                              svn_sqlite__mode_readonly,
+                              scratch_pool, scratch_pool));
+  VERIFY_USABLE_PDH(pdh);
+
+  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
+                                    STMT_SELECT_PRISTINE_MD5_CHECKSUM));
+  SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, sha1_checksum, scratch_pool));
+  SVN_ERR(svn_sqlite__step(&have_row, stmt));
+  if (!have_row)
+    return svn_error_createf(SVN_ERR_WC_DB_ERROR, svn_sqlite__reset(stmt),
+                             _("The pristine text with checksum '%s' was "
+                               "not found"),
+                             svn_checksum_to_cstring_display(sha1_checksum,
+                                                             scratch_pool));
+
+  SVN_ERR(svn_sqlite__column_checksum(md5_checksum, stmt, 0, scratch_pool));
+
+  SVN_ERR_ASSERT((*md5_checksum)->kind == svn_checksum_md5);
+  return svn_error_return(svn_sqlite__reset(stmt));
+}
+
+
+svn_error_t *
+svn_wc__db_temp_remove_subdir_record(svn_wc__db_t *db,
+                                     const char *local_abspath,
+                                     apr_pool_t *scratch_pool)
+{
+  const char *parent_abspath;
+  const char *name;
+  svn_wc__db_pdh_t *pdh;
+  const char *local_relpath;
+  svn_sqlite__stmt_t *stmt;
+
+  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+
+  svn_dirent_split(local_abspath, &parent_abspath, &name, scratch_pool);
+
+  SVN_ERR(parse_local_abspath(&pdh, &local_relpath, db, local_abspath,
+                              svn_sqlite__mode_readwrite,
+                              scratch_pool, scratch_pool));
+  VERIFY_USABLE_PDH(pdh);
+  
+  SVN_ERR_ASSERT(*local_relpath == '\0');
+
+  /* Delete the NAME row from BASE_NODE.  */
+  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
+                                    STMT_DELETE_BASE_NODE));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, name));
+  SVN_ERR(svn_sqlite__step_done(stmt));
+
+  return SVN_NO_ERROR;
+}

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc_db.h?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc_db.h Wed Apr 14 06:51:00 2010
@@ -411,6 +411,12 @@ svn_wc__db_init(svn_wc__db_t *db,
    This subsystem does not use DEPTH, but it can be recorded here in
    the BASE tree for higher-level code to use.
 
+   If CONFLICT is not NULL, then it describes a conflict for this node. The
+   node will be record as conflicted (in ACTUAL).
+
+   Any work items that are necessary as part of this node construction may
+   be passed in WORK_ITEMS.
+
    All temporary allocations will be made in SCRATCH_POOL.
 */
 svn_error_t *
@@ -426,6 +432,8 @@ svn_wc__db_base_add_directory(svn_wc__db
                               const char *changed_author,
                               const apr_array_header_t *children,
                               svn_depth_t depth,
+                              const svn_skel_t *conflict,
+                              const svn_skel_t *work_items,
                               apr_pool_t *scratch_pool);
 
 
@@ -448,6 +456,12 @@ svn_wc__db_base_add_directory(svn_wc__db
    by its properties) is known, then pass it as TRANSLATED_SIZE. Otherwise,
    pass SVN_INVALID_FILESIZE.
 
+   If CONFLICT is not NULL, then it describes a conflict for this node. The
+   node will be record as conflicted (in ACTUAL).
+
+   Any work items that are necessary as part of this node construction may
+   be passed in WORK_ITEMS.
+
    All temporary allocations will be made in SCRATCH_POOL.
 */
 svn_error_t *
@@ -463,6 +477,8 @@ svn_wc__db_base_add_file(svn_wc__db_t *d
                          const char *changed_author,
                          const svn_checksum_t *checksum,
                          svn_filesize_t translated_size,
+                         const svn_skel_t *conflict,
+                         const svn_skel_t *work_items,
                          apr_pool_t *scratch_pool);
 
 
@@ -480,6 +496,12 @@ svn_wc__db_base_add_file(svn_wc__db_t *d
 
    The target of the symlink is specified by TARGET.
 
+   If CONFLICT is not NULL, then it describes a conflict for this node. The
+   node will be record as conflicted (in ACTUAL).
+
+   Any work items that are necessary as part of this node construction may
+   be passed in WORK_ITEMS.
+
    All temporary allocations will be made in SCRATCH_POOL.
 */
 /* ### KFF: This is an interesting question, because currently
@@ -522,6 +544,8 @@ svn_wc__db_base_add_symlink(svn_wc__db_t
                             apr_time_t changed_date,
                             const char *changed_author,
                             const char *target,
+                            const svn_skel_t *conflict,
+                            const svn_skel_t *work_items,
                             apr_pool_t *scratch_pool);
 
 
@@ -538,6 +562,12 @@ svn_wc__db_base_add_symlink(svn_wc__db_t
      svn_wc__db_status_excluded
      svn_wc__db_status_not_present
 
+   If CONFLICT is not NULL, then it describes a conflict for this node. The
+   node will be record as conflicted (in ACTUAL).
+
+   Any work items that are necessary as part of this node construction may
+   be passed in WORK_ITEMS.
+
    All temporary allocations will be made in SCRATCH_POOL.
 */
 svn_error_t *
@@ -549,6 +579,8 @@ svn_wc__db_base_add_absent_node(svn_wc__
                                 svn_revnum_t revision,
                                 svn_wc__db_kind_t kind,
                                 svn_wc__db_status_t status,
+                                const svn_skel_t *conflict,
+                                const svn_skel_t *work_items,
                                 apr_pool_t *scratch_pool);
 
 
@@ -1336,6 +1368,7 @@ svn_wc__db_read_children(const apr_array
 
    Allocate *VICTIMS in RESULT_POOL and do temporary allocations in
    SCRATCH_POOL */
+/* ### This function will probably be removed. */
 svn_error_t *
 svn_wc__db_read_conflict_victims(const apr_array_header_t **victims,
                                  svn_wc__db_t *db,
@@ -1352,6 +1385,7 @@ svn_wc__db_read_conflict_victims(const a
    SCRATCH_POOL */
 /* ### Currently there can be just one property conflict recorded
        per victim */
+/*  ### This function will probably be removed. */
 svn_error_t *
 svn_wc__db_read_conflicts(const apr_array_header_t **conflicts,
                           svn_wc__db_t *db,
@@ -1491,6 +1525,7 @@ svn_wc__db_global_commit(svn_wc__db_t *d
 svn_error_t *
 svn_wc__db_global_update(svn_wc__db_t *db,
                          const char *local_abspath,
+                         svn_wc__db_kind_t new_kind,
                          const char *new_repos_relpath,
                          svn_revnum_t new_revision,
                          const apr_hash_t *new_props,
@@ -1500,6 +1535,7 @@ svn_wc__db_global_update(svn_wc__db_t *d
                          const apr_array_header_t *new_children,
                          const svn_checksum_t *new_checksum,
                          const char *new_target,
+                         const apr_hash_t *new_dav_cache,
                          const svn_skel_t *conflict,
                          const svn_skel_t *work_items,
                          apr_pool_t *scratch_pool);
@@ -1861,11 +1897,11 @@ svn_wc__db_wq_completed(svn_wc__db_t *db
 
 
 /* Note: LEVELS_TO_LOCK is here strictly for backward compat.  The access
- * batons still have the notion of 'levels to lock' and we need to ensure
- * that they still function correctly, even in the new world.  'levels to
- * lock' should not be exposed through the wc-ng APIs at all: users either
- * get to lock the entire tree (rooted at some subdir, of course), or none.
- */
+   batons still have the notion of 'levels to lock' and we need to ensure
+   that they still function correctly, even in the new world.  'levels to
+   lock' should not be exposed through the wc-ng APIs at all: users either
+   get to lock the entire tree (rooted at some subdir, of course), or none.
+*/
 svn_error_t *
 svn_wc__db_wclock_set(svn_wc__db_t *db,
                       const char *local_abspath,
@@ -1970,7 +2006,6 @@ svn_error_t *
 svn_wc__db_temp_op_set_dir_depth(svn_wc__db_t *db,
                                  const char *local_abspath,
                                  svn_depth_t depth,
-                                 svn_boolean_t flush_entry_cache,
                                  apr_pool_t *scratch_pool);
 
 /* Performs a non-recursive delete on local_abspath, just like a
@@ -2075,15 +2110,6 @@ svn_wc__db_temp_op_set_working_incomplet
                                           apr_pool_t *scratch_pool);
 
 
-/* Update changed information in BASE_NODE with the supplied values */
-svn_error_t *
-svn_wc__db_temp_op_set_base_last_change(svn_wc__db_t *db,
-                                        const char *local_abspath,
-                                        svn_revnum_t changed_rev,
-                                        apr_time_t changed_date,
-                                        const char *changed_author,
-                                        apr_pool_t *scratch_pool);
-
 /* Update changed information in WORKING_NODE with the supplied values */
 svn_error_t *
 svn_wc__db_temp_op_set_working_last_change(svn_wc__db_t *db,
@@ -2098,7 +2124,7 @@ svn_wc__db_temp_op_set_working_last_chan
 svn_error_t *
 svn_wc__db_temp_op_start_directory_update(svn_wc__db_t *db,
                                           const char *local_abspath,
-                                          const char* new_repos_relpath,
+                                          const char *new_repos_relpath,
                                           svn_revnum_t new_rev,
                                           apr_pool_t *scratch_pool);
 
@@ -2122,6 +2148,35 @@ svn_wc__db_temp_elide_copyfrom(svn_wc__d
                                apr_pool_t *scratch_pool);
 
 
+/* Return the serialized file external info (from BASE) for LOCAL_ABSPATH.
+   Stores NULL into SERIALIZED_FILE_EXTERNAL if this node is NOT a file
+   external. If a BASE node does not exist: SVN_ERR_WC_PATH_NOT_FOUND.  */
+svn_error_t *
+svn_wc__db_temp_get_file_external(const char **serialized_file_external,
+                                  svn_wc__db_t *db,
+                                  const char *local_abspath,
+                                  apr_pool_t *result_pool,
+                                  apr_pool_t *scratch_pool);
+
+
+/* Remove a stray "subdir" record in the BASE_NODE table.  */
+svn_error_t *
+svn_wc__db_temp_remove_subdir_record(svn_wc__db_t *db,
+                                     const char *local_abspath,
+                                     apr_pool_t *scratch_pool);
+
+
+/* Set *PRISTINE_MD5_CHECKSUM to the MD-5 checksum of a pristine text
+   identified by its SHA-1 checksum PRISTINE_SHA1_CHECKSUM. Return an error
+   if the pristine text does not exist or its MD5 checksum is not found. */
+svn_error_t *
+svn_wc__db_get_pristine_md5(const svn_checksum_t **pristine_md5_checksum,
+                            svn_wc__db_t *db,
+                            const char *wri_abspath,
+                            const svn_checksum_t *pristine_sha1_checksum,
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool);
+
 /* @} */
 
 

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/workqueue.c?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/workqueue.c Wed Apr 14 06:51:00 2010
@@ -28,6 +28,7 @@
 #include "svn_dirent_uri.h"
 #include "svn_subst.h"
 #include "svn_hash.h"
+#include "svn_io.h"
 
 #include "wc.h"
 #include "wc_db.h"
@@ -61,6 +62,7 @@
 #define OP_DELETE "delete"
 #define OP_FILE_INSTALL "file-install"
 #define OP_FILE_REMOVE "file-remove"
+#define OP_SYNC_FILE_FLAGS "sync-file-flags"
 
 
 /* For work queue debugging. Generates output about its operation.  */
@@ -77,6 +79,24 @@ struct work_item_dispatch {
 };
 
 
+static svn_error_t *
+sync_file_flags(svn_wc__db_t *db,
+                const char *local_abspath,
+                apr_pool_t *scratch_pool)
+{
+  /* ### right now, the maybe_set_* functions will only positively set those
+     ### values. we need to clear them first.  */
+  SVN_ERR(svn_io_set_file_read_write(local_abspath, FALSE, scratch_pool));
+  SVN_ERR(svn_io_set_file_executable(local_abspath, FALSE, FALSE,
+                                     scratch_pool));
+
+  SVN_ERR(svn_wc__maybe_set_read_only(NULL, db, local_abspath, scratch_pool));
+  SVN_ERR(svn_wc__maybe_set_executable(NULL, db, local_abspath, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
+
 /* Ripped from the old loggy cp_and_translate operation.
 
    SOURCE_ABSPATH specifies the source which is translated for
@@ -116,10 +136,8 @@ copy_and_translate(svn_wc__db_t *db,
             scratch_pool));
 
   /* ### this is a problem. DEST_ABSPATH is not necessarily versioned.  */
-  SVN_ERR(svn_wc__maybe_set_read_only(NULL, db, dest_abspath,
-                                      scratch_pool));
-  SVN_ERR(svn_wc__maybe_set_executable(NULL, db, dest_abspath,
-                                       scratch_pool));
+  /* ### actually, for the single caller: it *is* versioned.  */
+  SVN_ERR(sync_file_flags(db, dest_abspath, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -881,6 +899,7 @@ run_killme(svn_wc__db_t *db,
                 repos_relpath, repos_root_url, repos_uuid,
                 original_revision, svn_wc__db_kind_dir,
                 svn_wc__db_status_not_present,
+                NULL, NULL,
                 scratch_pool));
     }
 
@@ -1061,6 +1080,7 @@ run_deletion_postcommit(svn_wc__db_t *db
                     repos_relpath, repos_root_url, repos_uuid,
                     new_revision, svn_wc__db_kind_file,
                     svn_wc__db_status_not_present,
+                    NULL, NULL,
                     scratch_pool));
         }
     }
@@ -1198,6 +1218,9 @@ install_committed_file(svn_boolean_t *ov
       *overwrote_working = TRUE;
     }
 
+  /* ### should be using OP_SYNC_FILE_FLAGS, or an internal version of
+     ### that here. do we need to set *OVERWROTE_WORKING?  */
+
   if (remove_executable)
     {
       /* No need to chmod -x on a new file: new files don't have it. */
@@ -2025,8 +2048,7 @@ run_file_install(svn_wc__db_t *db,
   SVN_ERR(svn_io_file_rename(dst_abspath, local_abspath, scratch_pool));
 
   /* Tweak the on-disk file according to its properties.  */
-  SVN_ERR(svn_wc__maybe_set_read_only(NULL, db, local_abspath, scratch_pool));
-  SVN_ERR(svn_wc__maybe_set_executable(NULL, db, local_abspath, scratch_pool));
+  SVN_ERR(sync_file_flags(db, local_abspath, scratch_pool));
 
   if (use_commit_times)
     {
@@ -2156,6 +2178,49 @@ svn_wc__wq_build_file_remove(const svn_s
 
 /* ------------------------------------------------------------------------ */
 
+/* OP_SYNC_FILE_FLAGS  */
+
+/* Process the OP_SYNC_FILE_FLAGS work item WORK_ITEM.
+ * See svn_wc__wq_build_file_remove() which generates this work item.
+ * Implements (struct work_item_dispatch).func. */
+static svn_error_t *
+run_sync_file_flags(svn_wc__db_t *db,
+                    const svn_skel_t *work_item,
+                    svn_cancel_func_t cancel_func,
+                    void *cancel_baton,
+                    apr_pool_t *scratch_pool)
+{
+  const svn_skel_t *arg1 = work_item->children->next;
+  const char *local_abspath;
+
+  local_abspath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len);
+
+  return svn_error_return(sync_file_flags(db, local_abspath, scratch_pool));
+}
+
+
+svn_error_t *
+svn_wc__wq_build_sync_file_flags(const svn_skel_t **work_item,
+                                 svn_wc__db_t *db,
+                                 const char *local_abspath,
+                                 apr_pool_t *result_pool,
+                                 apr_pool_t *scratch_pool)
+{
+  svn_skel_t *build_item = svn_skel__make_empty_list(result_pool);
+
+  svn_skel__prepend_str(apr_pstrdup(result_pool, local_abspath),
+                        build_item, result_pool);
+  svn_skel__prepend_str(OP_SYNC_FILE_FLAGS, build_item, result_pool);
+
+  /* Done. Assign to the const-ful WORK_ITEM.  */
+  *work_item = build_item;
+
+  return SVN_NO_ERROR;
+}
+
+
+/* ------------------------------------------------------------------------ */
+
 static const struct work_item_dispatch dispatch_table[] = {
   { OP_REVERT, run_revert },
   { OP_PREPARE_REVERT_FILES, run_prepare_revert_files },
@@ -2168,6 +2233,7 @@ static const struct work_item_dispatch d
   { OP_DELETE, run_delete },
   { OP_FILE_INSTALL, run_file_install },
   { OP_FILE_REMOVE, run_file_remove },
+  { OP_SYNC_FILE_FLAGS, run_sync_file_flags },
 
   /* Sentinel.  */
   { NULL }

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/workqueue.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/workqueue.h?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/workqueue.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/workqueue.h Wed Apr 14 06:51:00 2010
@@ -95,6 +95,17 @@ svn_wc__wq_build_file_remove(const svn_s
                              apr_pool_t *scratch_pool);
 
 
+/* Build a work item (returned in *WORK_ITEM) that will synchronize the
+   target node's readonly and executable flags with the values defined
+   by its properties and lock status.  */
+svn_error_t *
+svn_wc__wq_build_sync_file_flags(const svn_skel_t **work_item,
+                                 svn_wc__db_t *db,
+                                 const char *local_abspath,
+                                 apr_pool_t *result_pool,
+                                 apr_pool_t *scratch_pool);
+
+
 /* Record a work item to revert LOCAL_ABSPATH.  */
 svn_error_t *
 svn_wc__wq_add_revert(svn_boolean_t *will_revert,

Modified: subversion/branches/svn-patch-improvements/subversion/mod_authz_svn/mod_authz_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/mod_authz_svn/mod_authz_svn.c?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/mod_authz_svn/mod_authz_svn.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/mod_authz_svn/mod_authz_svn.c Wed Apr 14 06:51:00 2010
@@ -66,6 +66,9 @@ create_authz_svn_dir_config(apr_pool_t *
   authz_svn_config_rec *conf = apr_pcalloc(p, sizeof(*conf));
   conf->base_path = d;
 
+  if (d)
+    conf->base_path = svn_uri_canonicalize(d, p);
+
   /* By default keep the fortress secure */
   conf->authoritative = 1;
   conf->anonymous = 1;
@@ -210,6 +213,7 @@ req_check_access(request_rec *r,
   svn_authz_t *access_conf = NULL;
   svn_error_t *svn_err;
   char errbuf[256];
+  const char *canonicalized_uri;
   const char *username_to_authorize = get_username_to_authorize(r, conf);
 
   switch (r->method_number)
@@ -249,6 +253,22 @@ req_check_access(request_rec *r,
         break;
     }
 
+  canonicalized_uri = svn_uri_canonicalize(r->uri, r->pool);
+  if (strcmp(canonicalized_uri, conf->base_path) == 0)
+    {
+      /* Do no access control when conf->base_path(as configured in <Location>)
+       * and given uri are same. The reason for such relaxation of access
+       * control is "This module is meant to control access inside the
+       * repository path, in this case inside PATH is empty and hence
+       * dav_svn_split_uri fails saying no repository name present".
+       * One may ask it will allow access to '/' inside the repository if
+       * repository is served via SVNPath instead of SVNParentPath.
+       * It does not, The other methods(PROPFIND, MKACTIVITY) for
+       * accomplishing the operation takes care of making a request to
+       * proper URL */
+      return OK;
+    }
+
   dav_err = dav_svn_split_uri(r,
                               r->uri,
                               conf->base_path,
@@ -554,7 +574,7 @@ access_checker(request_rec *r)
 {
   authz_svn_config_rec *conf = ap_get_module_config(r->per_dir_config,
                                                     &authz_svn_module);
-  const char *repos_path;
+  const char *repos_path = NULL;
   const char *dest_repos_path = NULL;
   int status;
 
@@ -611,7 +631,7 @@ check_user_id(request_rec *r)
 {
   authz_svn_config_rec *conf = ap_get_module_config(r->per_dir_config,
                                                     &authz_svn_module);
-  const char *repos_path;
+  const char *repos_path = NULL;
   const char *dest_repos_path = NULL;
   int status;
 
@@ -639,7 +659,7 @@ auth_checker(request_rec *r)
 {
   authz_svn_config_rec *conf = ap_get_module_config(r->per_dir_config,
                                                     &authz_svn_module);
-  const char *repos_path;
+  const char *repos_path = NULL;
   const char *dest_repos_path = NULL;
   int status;
 

Modified: subversion/branches/svn-patch-improvements/subversion/po/zh_CN.po
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/po/zh_CN.po?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/po/zh_CN.po [UTF-8] (original)
+++ subversion/branches/svn-patch-improvements/subversion/po/zh_CN.po [UTF-8] Wed Apr 14 06:51:00 2010
@@ -36,6 +36,7 @@
 # checkout          检出
 # default           默认
 # HEAD revision     最新版本
+# Obliteration      灭迹
 # overlay           重载
 # remove            删除
 # rename            改名
@@ -52,11 +53,11 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: subversion 1.7\n"
-"Report-Msgid-Bugs-To: dev@subversion.tigris.org\n"
-"POT-Creation-Date: 2009-12-07 10:09+0800\n"
-"PO-Revision-Date: 2009-12-07 11:22+0800\n"
-"Last-Translator: Subversion Developers <de...@subversion.tigris.org>\n"
-"Language-Team: Simplified Chinese <de...@subversion.tigris.org>\n"
+"Report-Msgid-Bugs-To: dev@subversion.apache.org\n"
+"POT-Creation-Date: 2010-04-13 23:07+0800\n"
+"PO-Revision-Date: 2010-04-13 23:07+0800\n"
+"Last-Translator: Subversion Developers <de...@subversion.apache.org>\n"
+"Language-Team: Simplified Chinese <de...@subversion.apache.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -221,6 +222,9 @@ msgstr "无法识别的流数据"
 msgid "Stream doesn't support resetting"
 msgstr "流不支持重置操作"
 
+msgid "Stream doesn't support seeking"
+msgstr "流不支持定位操作"
+
 msgid "Unknown svn_node_kind"
 msgstr "未知的 svn_node_kind"
 
@@ -933,6 +937,10 @@ msgstr "“%s” 尚未纳入版本控� msgid "'%s' refers to a directory"
 msgstr "“%s” 引用一个目录"
 
+#, c-format
+msgid "'%s' has no base revision until it is committed"
+msgstr "在提交之前,“%s”没有基础版本"
+
 msgid "(local)"
 msgstr "(本地)"
 
@@ -1004,7 +1012,7 @@ msgstr "执行 post-commit 出错 (细� msgid "Error in post-commit clean-up (details follow):"
 msgstr "清理 post-commit 出错 (细节如下): "
 
-msgid "Are all the targets part of the same working copy?"
+msgid "Are all targets part of the same working copy?"
 msgstr "是否所有目标都属于同一工作副本?"
 
 msgid ""
@@ -1095,10 +1103,9 @@ msgstr "路径 “%s” 不是目录"
 msgid "Path '%s' already exists, but is not a directory"
 msgstr "路径 “%s” 已经存在,但不是目录"
 
-#, c-format
 msgid ""
-"Source and dest appear not to be in the same repository (src: '%s'; dst: '%s')"
-msgstr "来源与目标似乎不在同一版本库 (来源: “%s”;目的: “%s”)"
+"Source and destination URLs appear not to all point to the same repository."
+msgstr "来源与目标似乎不在同一版本库。"
 
 #, c-format
 msgid "Cannot move URL '%s' into itself"
@@ -1113,14 +1120,6 @@ msgid "Source URL '%s' is from foreign r
 msgstr "源 URL “%s” 来自其它版本库;把它当作脱离的工作副本"
 
 #, c-format
-msgid "Path '%s' not found in revision %ld"
-msgstr "路径 “%s” 不在版本 %ld 中"
-
-#, c-format
-msgid "Path '%s' not found in head revision"
-msgstr "HEAD 版本中找不到路径 “%s”"
-
-#, c-format
 msgid "'%s' is already under version control"
 msgstr "“%s”已纳入版本控制"
 
@@ -1128,6 +1127,14 @@ msgstr "“%s”已纳入版本控制"
 msgid "Entry for '%s' exists (though the working file is missing)"
 msgstr "“%s” 的入口存在(尽管丢失了工作文件)"
 
+#, c-format
+msgid "Path '%s' not found in revision %ld"
+msgstr "路径 “%s” 不在版本 %ld 中"
+
+#, c-format
+msgid "Path '%s' not found in head revision"
+msgstr "HEAD 版本中找不到路径 “%s”"
+
 msgid "Cannot mix repository and working copy sources"
 msgstr "不能在源中混合版本库和工作副本"
 
@@ -1425,10 +1432,6 @@ msgid "Cannot reintegrate into mixed-rev
 msgstr "不能复兴到有混合版本的工作副本;请先更新"
 
 #, c-format
-msgid "At least one revision (r%ld) not yet merged from '%s'"
-msgstr "至少有一个版本(r%ld)没有自“%s”合并"
-
-#, c-format
 msgid "'%s@%ld' must be ancestrally related to '%s@%ld'"
 msgstr "“%s@%ld”必须与“%s@%ld”有祖先关系"
 
@@ -1721,10 +1724,13 @@ msgid "Missing required node revision ID
 msgstr "缺少必须的节点版本 ID"
 
 msgid "Invalid change ordering: new node revision ID without delete"
-msgstr "无效的改变顺序: 有新的节点版本 ID 而没删除"
+msgstr "无效的改变顺序: 没有删除新节点版本 ID"
 
 msgid "Invalid change ordering: non-add change on deleted path"
-msgstr "无效的改变顺序: 对删除路径进行非增加的改变"
+msgstr "无效的改变顺序: 在已经删除的路径执行非增加修改"
+
+msgid "Invalid change ordering: add change on preexisting path"
+msgstr "无效的改变顺序: 在已有路径增加修改"
 
 msgid "creating cursor for reading changes"
 msgstr "正在为读取修改创建指针"
@@ -1750,10 +1756,10 @@ msgid "storing checksum-reps record"
 msgstr "正在存储校验和展现记录"
 
 msgid "allocating new representation reuse ID (getting 'next-key')"
-msgstr "正在分配新展现的复用 ID(正在获取 “next-key”)"
+msgstr "正在分配新展现的复用 ID (正在获取 “next-key”)"
 
-msgid "bumping next copy key"
-msgstr "正在提取下一个副本键"
+msgid "bumping next representation reuse ID"
+msgstr "跳到下个展现复用 ID"
 
 msgid "storing copy record"
 msgstr "正在存储副本记录"
@@ -1761,6 +1767,9 @@ msgstr "正在存储副本记录"
 msgid "allocating new copy ID (getting 'next-key')"
 msgstr "正在分配新副本 ID(正在获取 “next-key”)"
 
+msgid "bumping next copy key"
+msgstr "正在提取下一个副本键"
+
 msgid "deleting entry from 'copies' table"
 msgstr "正在从 “copies” 表中删除条目"
 
@@ -1845,13 +1854,16 @@ msgstr "损坏的数据库: 初始的副
 msgid "Corrupt DB: initial revision number is not '0' in filesystem '%s'"
 msgstr "损坏的数据库: 初始的版本号在文件系统“%s”中不是“0”"
 
-msgid "Attempted to create entry in non-directory parent"
-msgstr "试图在非目录的父节点创建条目"
+msgid "Attempted to get entries of a non-directory node"
+msgstr "试图从非目录节点中获取条目"
 
 #, c-format
 msgid "Attempted to create a node with an illegal name '%s'"
 msgstr "试图用非法的名字“%s”创建节点"
 
+msgid "Attempted to create entry in non-directory parent"
+msgstr "试图在非目录的父节点创建条目"
+
 #, c-format
 msgid "Attempted to clone child of non-mutable node"
 msgstr "试图克隆非可变节点的子节点"
@@ -2130,6 +2142,10 @@ msgid "Failed to calculate MD5 digest fo
 msgstr "计算“%s”的MD5摘要失败"
 
 #, c-format
+msgid "Attempt to obliterate '%s' using itself "
+msgstr "试图用自己灭迹“%s”"
+
+#, c-format
 msgid "Transaction is not dead: '%s'"
 msgstr "事务未结束: “%s”"
 
@@ -2173,6 +2189,10 @@ msgstr "事务 “%s” 过时,对于� msgid "Cannot deltify revisions prior to r%ld"
 msgstr "不能在 r%ld 之前计算增量变化"
 
+#, c-format
+msgid "Cannot obliterate '%s' as it is not a file"
+msgstr "“%s”不是文件,所以不能灭迹"
+
 msgid "The root directory cannot be deleted"
 msgstr "不能删除根目录"
 
@@ -2465,6 +2485,9 @@ msgstr "无法修改“%s”的存取权
 msgid "Transaction out of date"
 msgstr "事务过时"
 
+msgid "Obliteration of already-packed revision is not supported"
+msgstr "不支持对已经打包的版本执行灭迹"
+
 msgid "Recovery encountered a non-directory node"
 msgstr "修复时遇到非目录节点"
 
@@ -2586,6 +2609,9 @@ msgstr "“%s” 不是会话 URL “%s� msgid "'%s' isn't a child of repository root URL '%s'"
 msgstr "“%s” 不是版本库根 URL “%s” 的子节点"
 
+msgid "Obliterate is not supported by this Repository Access method"
+msgstr "此版本库存取方法不支持灭迹"
+
 #, c-format
 msgid "  - handles '%s' scheme\n"
 msgstr "  - 处理“%s”方案\n"
@@ -2670,6 +2696,9 @@ msgstr "无法保存文件"
 msgid "Server response missing the expected deadprop-count property"
 msgstr "服务器响应丢失了期望的 deadprop-count 属性"
 
+msgid "The OPTIONS response did not include the youngest revision"
+msgstr "OPTIONS 响应中没有包含最新的版本"
+
 msgid ""
 "DAV request failed; it's possible that the repository's pre-revprop-change "
 "hook either failed or is non-existent"
@@ -3064,9 +3093,6 @@ msgid ""
 "value"
 msgstr "OPTIONS 响应中没有包含请求的 activity-collection-set 值。"
 
-msgid "The OPTIONS response did not include the requested checked-in value"
-msgstr "OPTIONS 响应中没有包含请求的 checked-in 值。"
-
 #, c-format
 msgid "Adding a directory failed: %s on %s (%d %s)"
 msgstr "增加目录失败: “%s” 于 “%s”(%d %s)"
@@ -3082,8 +3108,8 @@ msgstr "版本库的 URL 非法"
 msgid "Unlock request failed: %d %s"
 msgstr "解锁请求失败: %d %s"
 
-msgid "The OPTIONS response did not include the youngest revision"
-msgstr "OPTIONS 响应中没有包含最新的版本"
+msgid "The OPTIONS response did not include the requested checked-in value"
+msgstr "OPTIONS 响应中没有包含请求的 checked-in 值。"
 
 msgid ""
 "The OPTIONS response did not include the requested baseline-collection value"
@@ -3192,6 +3218,13 @@ msgstr "子进程错误: %s"
 msgid "Can't create tunnel"
 msgstr "无法创建隧道"
 
+msgid ""
+"To better debug SSH connection problems, remove the -q option from 'ssh' in "
+"the [tunnels] section of your Subversion configuration file."
+msgstr ""
+"为了更好的诊断 SSH 连接问题,请在你的 Subversion 配置文件中的 [tunnels] 段,"
+"从 'ssh' 行删除选项 '-q'。"
+
 #, c-format
 msgid "Illegal svn repository URL '%s'"
 msgstr "非法的svn版本库URL“%s”"
@@ -3427,6 +3460,14 @@ msgid ""
 msgstr "无效编辑器定位;至少一个输入路径不是目录,并且没有源入口"
 
 #, c-format
+msgid "* Dumped revision %ld.\n"
+msgstr "* 已转存版本 %ld。\n"
+
+#, c-format
+msgid "* Verified revision %ld.\n"
+msgstr "* 已校验版本 %ld。\n"
+
+#, c-format
 msgid ""
 "WARNING: Referencing data in revision %ld, which is older than the oldest\n"
 "WARNING: dumped revision (%ld).  Loading this dump into an empty repository\n"
@@ -3445,14 +3486,6 @@ msgid "End revision %ld is invalid (youn
 msgstr "结束版本 %ld 无效 (最新版本是 %ld)"
 
 #, c-format
-msgid "* Dumped revision %ld.\n"
-msgstr "* 已转存版本 %ld。\n"
-
-#, c-format
-msgid "* Verified revision %ld.\n"
-msgstr "* 已校验版本 %ld。\n"
-
-#, c-format
 msgid "Unexpected node kind %d for '%s'"
 msgstr "意外发现节点种类 %d 于“%s”"
 
@@ -4080,18 +4113,10 @@ msgid "Can't remove file '%s'"
 msgstr "不能移动文件“%s”"
 
 #, c-format
-msgid "Can't open directory '%s'"
-msgstr "无法打开目录“%s”"
-
-#, c-format
 msgid "Can't remove '%s'"
 msgstr "无法删除“%s”"
 
 #, c-format
-msgid "Can't rewind directory '%s'"
-msgstr "无法重绕目录“%s”"
-
-#, c-format
 msgid "Can't create process '%s' attributes"
 msgstr "无法创建进程“%s”的属性"
 
@@ -4233,6 +4258,10 @@ msgid "Can't hide directory '%s'"
 msgstr "无法隐藏目录 “%s”"
 
 #, c-format
+msgid "Can't open directory '%s'"
+msgstr "无法打开目录“%s”"
+
+#, c-format
 msgid "Can't remove directory '%s'"
 msgstr "无法删除目录 “%s”"
 
@@ -4283,6 +4312,10 @@ msgid "Invalid character '%c' found in r
 msgstr "在版本列表中发现无效字符 “%c”"
 
 #, c-format
+msgid "Invalid revision number '0' found in range list"
+msgstr "在范围列表中发现无效的版本号 “0”"
+
+#, c-format
 msgid "Unable to parse reversed revision range '%ld-%ld'"
 msgstr "不能解析反向的版本范围 “%ld - %ld”"
 
@@ -4383,13 +4416,13 @@ msgstr ""
 "\n"
 
 msgid ""
-"Copyright (C) 2009 The Apache Software Foundation.\n"
+"Copyright (C) 2010 The Apache Software Foundation.\n"
 "This software consists of contributions made by many people;\n"
 "see the NOTICE file for more information.\n"
 "Subversion is open source software, see http://subversion.apache.org/\n"
 "\n"
 msgstr ""
-"版权所有 (C) 2009 Apache 软件基金会。\n"
+"版权所有 (C) 2010 Apache 软件基金会。\n"
 "此软件包含了许多人的贡献;请查看文件 NOTICE 以获得更多信息。\n"
 "Subversion 是开放源代码软件,请参阅 http://subversion.apache.org/ 站点。\n"
 "\n"
@@ -4678,11 +4711,6 @@ msgstr "当为提交操作准备“%s”
 msgid "'%s' is not a valid administrative directory name"
 msgstr "“%s”不是一个有效的管理目录名"
 
-msgid ""
-"Your .svn/tmp directory may be missing or corrupt; run 'svn cleanup' and try "
-"again"
-msgstr "你的 .svn/tmp 目录可能丢失或损坏;请执行“svn cleanup”,然后重试"
-
 #, c-format
 msgid "Revision %ld doesn't match existing revision %ld in '%s'"
 msgstr "版本 %ld 不匹配现有版本 %ld 于 “%s”"
@@ -4752,6 +4780,21 @@ msgid "Cannot revert '%s': unsupported n
 msgstr "无法恢复“%s”: 工作副本中有不支持的节点种类"
 
 #, c-format
+msgid "Can only get the pristine contents of files; '%s' is not a file"
+msgstr "只能取得文件的原始内容;“%s”不是文件"
+
+#, c-format
+msgid ""
+"Cannot get the pristine contents of '%s' because its delete is already "
+"committed"
+msgstr "不能取得“%s”的原始内容,因为其删除操作已经提交"
+
+#, c-format
+msgid ""
+"Cannot get the pristine contents of '%s' because it has an unexpected status"
+msgstr "不能取得“%s”的原始内容,因为其状态未知"
+
+#, c-format
 msgid "File '%s' has local modifications"
 msgstr "文件“%s”有本地修改"
 
@@ -4819,13 +4862,13 @@ msgstr "不能排除 '%s': 它将要从� msgid "Can only crop a working copy with a restrictive depth"
 msgstr "只能修剪工作副本到有限深度"
 
+msgid "Can only crop directories"
+msgstr "只能修剪目录"
+
 #, c-format
 msgid "The node '%s' was not found."
 msgstr "找不到节点 '%s'。"
 
-msgid "Can only crop directories"
-msgstr "只能修剪目录"
-
 #, c-format
 msgid ""
 "Cannot crop '%s': it is going to be removed from repository. Try commit "
@@ -4923,9 +4966,8 @@ msgstr "工作副本“%s”未被锁定
 msgid "No write-lock in '%s'"
 msgstr "“%s”没有写入锁定"
 
-msgid "Can't move source to dest"
-msgstr "无法移动源至目的"
-
+#. For log debugging. Generates output about its operation.
+#. #define DEBUG_LOG
 #. Helper macro for erroring out while running a logfile.
 #.
 #. This is implemented as a macro so that the error created has a useful
@@ -4934,9 +4976,8 @@ msgstr "无法移动源至目的"
 msgid "In directory '%s'"
 msgstr "在目录“%s”中"
 
-#, c-format
-msgid "Missing 'dest' attribute in '%s'"
-msgstr "“%s”丢失了“dest”属性"
+msgid "Can't move source to dest"
+msgstr "无法移动源至目的"
 
 #, c-format
 msgid "Missing 'timestamp' attribute in '%s'"
@@ -4963,10 +5004,6 @@ msgid "Error recording tree conflict on 
 msgstr "在 '%s' 中记录树冲突出错"
 
 #, c-format
-msgid "Log entry missing 'name' attribute (entry '%s' for directory '%s')"
-msgstr "日志项丢失 “name” 属性 (入口 “%s” 对应目录 “%s”)"
-
-#, c-format
 msgid "Unrecognized logfile element '%s' in '%s'"
 msgstr "有无法识别的日志文件元素 “%s” 在 “%s” 中"
 
@@ -5163,6 +5200,10 @@ msgid "Unrecognized line ending style fo
 msgstr "“%s” 含有无法识别的行结束样式"
 
 #, c-format
+msgid "Cannot set non-inheritable mergeinfo on a non-directory ('%s')"
+msgstr "无法在非目录对象(“%s”)设定不可继承的合并信息"
+
+#, c-format
 msgid "Error parsing %s property on '%s': '%s'"
 msgstr "解析 %s 属性于“%s”出错: “%s”"
 
@@ -5192,11 +5233,11 @@ msgstr "无效属性 %s 位于 “%s”:
 
 #, c-format
 msgid ""
-"Checksum mismatch indicates corrupt text base: '%s':\n"
+"Checksum mismatch indicates corrupt text base for file: '%s':\n"
 "   expected:  %s\n"
 "     actual:  %s\n"
 msgstr ""
-"校验和不一致,指示文件参考基础损坏: '%s':\n"
+"校验和不一致,指示文件“%s”的参考基础损坏:\n"
 "       期望:  %s\n"
 "       实际:  %s\n"
 
@@ -5247,6 +5288,10 @@ msgid "Path '%s' is not in the working c
 msgstr "路径 “%s” 不在工作副本中"
 
 #, c-format
+msgid "Failed to add directory '%s': copyfrom arguments not yet supported"
+msgstr "无法增加目录“%s”:尚不支持 copyfrom 参数"
+
+#, c-format
 msgid ""
 "Failed to add directory '%s': object of the same name as the administrative "
 "directory"
@@ -5274,10 +5319,6 @@ msgstr "增加目录 '%s' 失败: 同名
 msgid "Switched directory '%s' does not match expected URL '%s'"
 msgstr "已经切换的目录 '%s' 与期望的 URL '%s' 不匹配"
 
-#, c-format
-msgid "Failed to add directory '%s': copyfrom arguments not yet supported"
-msgstr "无法增加目录“%s”:尚不支持 copyfrom 参数"
-
 msgid "Couldn't do property merge"
 msgstr "无法进行属性合并"
 
@@ -5332,7 +5373,23 @@ msgstr "Copyfrom-url“%s”与“%s”� 
 #, c-format
 msgid "Missing end of line in wcprops file for '%s'"
-msgstr "wcprops文件“%s”丢失了行结束符"
+msgstr "“%s”的 wcprops 文件丢失了行结束符"
+
+#, c-format
+msgid ""
+"Working copy '%s' can't be upgraded because the repository root is not "
+"available and can't be retrieved"
+msgstr "由于版本库的根不可用,并且不能找回,所以工作副本“%s”不能被升级"
+
+#, c-format
+msgid ""
+"Working copy '%s' can't be upgraded because the repository uuid is not "
+"available and can't be retrieved"
+msgstr "由于版本库的 UUID 不可用,并且不能找回,所以工作副本“%s”不能被升级"
+
+#, c-format
+msgid "Working copy '%s' can't be upgraded because it doesn't have a url"
+msgstr "由于没有 URL,所以工作副本“%s”不能被升级"
 
 msgid ""
 "Cannot upgrade with existing logs; please run 'svn cleanup' with Subversion "
@@ -5349,10 +5406,6 @@ msgstr "“%s”不是目录"
 msgid "Unable to make any directories"
 msgstr "无法创建任何目录"
 
-#, c-format
-msgid "Cannot find a URL for '%s'"
-msgstr "不能为“%s”找到 URL"
-
 #. Verify the checksum kind for pristine storage.
 msgid "Only SHA1 checksums can be used as keys in the pristine file storage.\n"
 msgstr "在原始的文件存储中,只有 SHA1 校验和才能用作键。\n"
@@ -5408,6 +5461,10 @@ msgid "Corrupt data for '%s'"
 msgstr "'%s' 的数据损坏"
 
 #, c-format
+msgid "Could not find node '%s' for recording file information."
+msgstr "不能为记录文件信息找到节点“%s”"
+
+#, c-format
 msgid "Expected node '%s' to be added."
 msgstr "期望节点“%s”被增加。"
 
@@ -5424,6 +5481,18 @@ msgid "There is no work queue for '%s'."
 msgstr "没有 '%s' 的工作队列。"
 
 #, c-format
+msgid "'%s' has no WORKING_NODE"
+msgstr "“%s” 没有 WORKING_NODE"
+
+#, c-format
+msgid "'%s' has no BASE_NODE"
+msgstr "“%s” 没有 BASE_NODE"
+
+#, c-format
+msgid "The pristine text with checksum '%s' was not found"
+msgstr "找不到校验和为“%s”的原始内容"
+
+#, c-format
 msgid "Error restoring text for '%s'"
 msgstr "还原 “%s” 文本出错"
 
@@ -5739,10 +5808,10 @@ msgstr ""
 
 msgid ""
 "Subversion is a tool for version control.\n"
-"For additional information, see http://subversion.tigris.org/\n"
+"For additional information, see http://subversion.apache.org/\n"
 msgstr ""
 "Subversion 是版本控制工具。\n"
-"欲取得详细资料,请参阅 http://subversion.tigris.org/\n"
+"欲取得详细资料,请参阅 http://subversion.apache.org/\n"
 
 msgid ""
 "The following repository access (RA) modules are available:\n"
@@ -6038,8 +6107,12 @@ msgstr "从文件ARG读取日志信息"
 msgid "give output suitable for concatenation"
 msgstr "给予适合串联的输出"
 
-msgid "treat value as being in charset encoding ARG"
-msgstr "将ARG的值视为字符编码"
+msgid ""
+"treat value as being in charset encoding ARG\n"
+"                             [alias: --enc]"
+msgstr ""
+"认为取值使用字符集编码 ARG\n"
+"                             [alias: --enc]"
 
 msgid "show program version information"
 msgstr "显示程序版本信息"
@@ -6101,10 +6174,12 @@ msgstr "受深度参数 ARG(“empty”� 
 msgid ""
 "set new working copy depth to ARG ('exclude',\n"
-"                            'empty', 'files', 'immediates', or 'infinity')"
+"                            'empty', 'files', 'immediates', or 'infinity')\n"
+"                            [alias: --sd]"
 msgstr ""
-"设置工作副本的新深度为 ARG(“exclude”,“empty”,“files”,“immediates”,\n"
-"                            或“infinity”)"
+"设置工作副本的新深度为 ARG(“exclude”,\n"
+"                            “empty”,“files”,“immediates” 或“infinity”)\n"
+"                            [alias: --sd]"
 
 msgid "output in XML"
 msgstr "输出为 XML"
@@ -6112,14 +6187,22 @@ msgstr "输出为 XML"
 msgid "use strict semantics"
 msgstr "使用严格的语法"
 
-msgid "do not cross copies while traversing history"
-msgstr "查看历史不要跨越不同的副本"
+msgid ""
+"do not cross copies while traversing history\n"
+"                             [alias: --soc]"
+msgstr ""
+"在复制时停止遍历历史\n"
+"                             [alias: --soc]"
 
 msgid "disregard default and svn:ignore property ignores"
 msgstr "忽略默认值和 svn:ignore 属性"
 
-msgid "do not cache authentication tokens"
-msgstr "不要缓存用户认证令牌"
+msgid ""
+"do not cache authentication tokens\n"
+"                             [alias: --nac]"
+msgstr ""
+"不要缓存认证令牌\n"
+"                             [alias: --nac]"
 
 msgid ""
 "accept unknown SSL server certificates without\n"
@@ -6129,24 +6212,40 @@ msgstr "不提示的接受未知的 SSL 
 msgid "do no interactive prompting"
 msgstr "不要交互提示"
 
-msgid "try operation but make no changes"
-msgstr "尝试操作但没有修改"
+msgid ""
+"try operation but make no changes\n"
+"                             [alias: --dry]"
+msgstr ""
+"尝试操作,但是不要执行改变\n"
+"                             [alias: --dry]"
 
-msgid "do not print differences for deleted files"
-msgstr "不要输出删除文件造成的差异"
+msgid ""
+"do not print differences for deleted files\n"
+"                             [alias: --ndd]"
+msgstr ""
+"对于已经删除的文件,不要显示差异\n"
+"                             [alias: --ndd]"
 
-msgid "notice ancestry when calculating differences"
-msgstr "比较差异时提示原始信息"
+msgid ""
+"notice ancestry when calculating differences\n"
+"                             [alias: --na]"
+msgstr ""
+"计算差异时关注祖先\n"
+"                             [alias: --na]"
 
-msgid "ignore ancestry when calculating merges"
-msgstr "合并时忽略原始信息"
+msgid ""
+"ignore ancestry when calculating merges\n"
+"                             [alias: --ia]"
+msgstr ""
+"计算合并时忽略祖先\n"
+"                             [alias: --ia]"
 
 msgid ""
 "ignore externals definitions\n"
-"                             [aliases: --ie]"
+"                             [alias: --ie]"
 msgstr ""
 "忽略外部定义\n"
-"                             [aliases: --ie]"
+"                             [alias: --ie]"
 
 msgid "use ARG as diff command"
 msgstr "使用 ARG 作为比较命令"
@@ -6157,8 +6256,12 @@ msgstr "使用 ARG 作为合并命令"
 msgid "use ARG as external editor"
 msgstr "使用 ARG 作为外部编辑器"
 
-msgid "merge only mergeinfo differences"
-msgstr "只合并 mergeinfo 的差异"
+msgid ""
+"merge only mergeinfo differences\n"
+"                             [alias: --ro]"
+msgstr ""
+"只合并修改信息的差异\n"
+"                             [alias: --ro]"
 
 msgid "use ARG as the older target"
 msgstr "使用 ARG 作为旧目标"
@@ -6172,8 +6275,12 @@ msgstr "在版本属性上操作(使用-
 msgid "relocate via URL-rewriting"
 msgstr "通过URL改写重新定位"
 
-msgid "read user configuration files from directory ARG"
-msgstr "从目录 ARG 读取用户配置文件"
+msgid ""
+"read user configuration files from directory ARG\n"
+"                             [alias: --cd]"
+msgstr ""
+"从目录 ARG 读取用户配置文件\n"
+"                             [alias: --cd]"
 
 msgid ""
 "set user configuration option in the format:\n"
@@ -6214,9 +6321,10 @@ msgstr "显示结果的概要"
 msgid "remove changelist association"
 msgstr "删除修改列表耦合"
 
+#, fuzzy
 msgid ""
 "operate only on members of changelist ARG\n"
-"                             [aliases: --cl]"
+"                             [alias: --cl]"
 msgstr ""
 "只能对修改列表 ARG 成员操作\n"
 "                             [aliases: --cl]"
@@ -6224,8 +6332,13 @@ msgstr ""
 msgid "don't delete changelists after commit"
 msgstr "不要在提交后删除修改列表"
 
-msgid "keep path in working copy"
-msgstr "在工作副本中保留路径"
+#, fuzzy
+msgid ""
+"keep path in working copy\n"
+"                             [alias: --kl]"
+msgstr ""
+"忽略外部定义\n"
+"                             [aliases: --ie]"
 
 msgid "retrieve all revision properties"
 msgstr "获取所有版本属性"
@@ -6259,15 +6372,22 @@ msgstr ""
 "                             'theirs-conflict', 'mine-full', 'theirs-full',\n"
 "                             'edit', 'launch')"
 
+#, fuzzy
 msgid ""
 "specify which collection of revisions to display\n"
-"                             ('merged', 'eligible')"
+"                             ('merged', 'eligible')\n"
+"                             [alias: --sr]"
 msgstr ""
 "指定显示哪个版本集合\n"
 "                             ('merged', 'eligible')"
 
-msgid "lump-merge all of source URL's unmerged changes"
-msgstr "批量合并所有源 URL 中未合并的修改"
+#, fuzzy
+msgid ""
+"lump-merge all of source URL's unmerged changes\n"
+"                             [alias: --ri]"
+msgstr ""
+"只能对修改列表 ARG 成员操作\n"
+"                             [aliases: --cl]"
 
 msgid ""
 "number of leading path components to strip\n"
@@ -6283,9 +6403,50 @@ msgstr ""
 "html\n"
 "                被转换为 fudge/crunchy.html。指定 -p2 会得到 crunchy.html 。"
 
-msgid "don't diff copied or moved files with their source"
+#, fuzzy
+msgid ""
+"don't diff copied or moved files with their source\n"
+"                             [alias: --sca]"
 msgstr "请不要将复制或移动的文件与其源文件比较"
 
+#, fuzzy
+msgid ""
+"don't expand keywords\n"
+"                             [alias: --ik]"
+msgstr ""
+"忽略外部定义\n"
+"                             [aliases: --ie]"
+
+#, fuzzy
+msgid ""
+"apply the unidiff in reverse\n"
+"                             [alias: --rd]"
+msgstr ""
+"忽略外部定义\n"
+"                             [aliases: --ie]"
+
+msgid ""
+"operate only on targets matching ARG,\n"
+"                             which may be a glob pattern such as '*.txt'.\n"
+"                             If this option is specified multiple times,\n"
+"                             all patterns are matched in turn.\n"
+"                             If both --include-pattern and --exclude-pattern\n"
+"                             options are specified include patterns are "
+"applied\n"
+"                             first, i.e. exclude patterns are applied to all\n"
+"                             targets which match an include pattern.\n"
+"                             [alias: --ip]"
+msgstr ""
+
+msgid ""
+"do not operate on targets matching ARG,\n"
+"                             which may be a glob pattern such as '*.txt'.\n"
+"                             If this option is specified multiple times,\n"
+"                             all patterns are matched in turn.\n"
+"                             See also the --include-pattern option.\n"
+"                             [alias: --ep]"
+msgstr ""
+
 msgid ""
 "Put files and directories under version control, scheduling\n"
 "them for addition to repository.  They will be added in next commit.\n"
@@ -6885,17 +7046,21 @@ msgid ""
 "Apply a patch to a working copy.\n"
 "usage: patch PATCHFILE [WCPATH]\n"
 "\n"
-"  Apply unidiff content in PATCHFILE to the working copy WCPATH.\n"
+"  Apply a unidiff patch in PATCHFILE to the working copy WCPATH.\n"
 "  If WCPATH is omitted, '.' is assumed.\n"
-"  A unidiff file suitable for application to a working copy can be\n"
+"\n"
+"  A unidiff patch suitable for application to a working copy can be\n"
 "  produced with the 'svn diff' command or third-party diffing tools.\n"
 "  Any non-unidiff content of PATCHFILE is ignored.\n"
 "\n"
+"  Changes listed in the patch will either be applied or rejected.\n"
 "  If a change does not match at its exact line offset, it may be applied\n"
 "  earlier or later in the file if a match is found elsewhere for the\n"
-"  surrounding lines of context provided in the unidiff.\n"
-"  If no matching context can be found for a change, the change will\n"
-"  produce a text conflict at its exact line offset.\n"
+"  surrounding lines of context provided by the patch.\n"
+"  A change may also be applied with fuzz, which means that one\n"
+"  or more lines of context are ignored when matching the change.\n"
+"  If no matching context can be found for a change, the change conflicts\n"
+"  and will be written to a reject file with the extension .svnpatch.rej.\n"
 "\n"
 "  For each patched file a line will be printed with characters reporting\n"
 "  the action taken. These characters have the following meaning:\n"
@@ -6904,10 +7069,13 @@ msgid ""
 "    D  Deleted\n"
 "    U  Updated\n"
 "    C  Conflict\n"
-"    G  Merged\n"
+"    G  Merged (with local uncommitted changes)\n"
+"\n"
+"  Changes applied with an offset or fuzz are reported on lines starting\n"
+"  with the '>' symbol. You should review such changes carefully.\n"
 "\n"
-"  If a unidiff removes all content from a file, that file is scheduled\n"
-"  for deletion. If a unidiff creates a new file, that file is scheduled\n"
+"  If the patch removes all content from a file, that file is scheduled\n"
+"  for deletion. If the patch creates a new file, that file is scheduled\n"
 "  for addition. Use 'svn revert' to undo deletions and additions you\n"
 "  do not agree with.\n"
 msgstr ""
@@ -7575,9 +7743,6 @@ msgid ""
 "and -r"
 msgstr "遇到了多个版本参数;不能指定 -c 两次或者同时使用 -c 和 -r"
 
-msgid "-r and -c can't be used with --reintegrate"
-msgstr "-r 和 -c 不能与 --reintegrate 共存"
-
 msgid "--depth and --set-depth are mutually exclusive"
 msgstr "--depth 与 --set-depth 是互斥的"
 
@@ -7633,6 +7798,9 @@ msgid ""
 "svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)\n"
 msgstr "svn: 运行“svn cleanup”删除锁定 (输入“svn help cleanup”得到用法)\n"
 
+msgid "-r and -c can't be used with --reintegrate"
+msgstr "-r 和 -c 不能与 --reintegrate 共存"
+
 msgid "Merge source required"
 msgstr "需要合并源"
 
@@ -7663,9 +7831,6 @@ msgstr "尝试用 “svn add”或 “sv
 msgid "Try 'svn mkdir --parents' instead?"
 msgstr "尝试 “svn mkdir --parents”?"
 
-msgid "Summary of conflicts in external item:\n"
-msgstr "外部条目冲突概要:\n"
-
 msgid "Summary of conflicts:\n"
 msgstr "冲突概要:\n"
 
@@ -7714,6 +7879,18 @@ msgid "Resolved conflicted state of '%s'
 msgstr "“%s”的冲突状态已解决\n"
 
 #, c-format
+msgid ">         applied hunk @@ -%lu,%lu +%lu,%lu @@ with offset %s"
+msgstr ">         应用的块 @@ -%lu,%lu +%lu,%lu @@ 偏移 %s"
+
+#, c-format
+msgid ">         applied hunk @@ -%lu,%lu +%lu,%lu @@ with fuzz %d\n"
+msgstr ">         应用的块 @@ -%lu,%lu +%lu,%lu @@ 模糊 %d\n"
+
+#, c-format
+msgid ">         rejected hunk @@ -%lu,%lu +%lu,%lu @@\n"
+msgstr ">         拒绝的块 @@ -%lu,%lu +%lu,%lu @@\n"
+
+#, c-format
 msgid ""
 "\n"
 "Fetching external item into '%s'\n"
@@ -7853,6 +8030,31 @@ msgstr "--- 正在合并 r%ld,经由 r
 msgid "--- Reverse-merging r%ld through r%ld into '%s':\n"
 msgstr "--- 正在反向合并 r%ld,经由 r%ld,到 “%s”:\n"
 
+#, fuzzy, c-format
+msgid "--- Recording mergeinfo for merge between repository URLs into '%s':\n"
+msgstr "--- 正在合并版本库 URL 之间的差异到 “%s”:\n"
+
+#, fuzzy, c-format
+msgid "--- Recording mergeinfo for merge of r%ld into '%s':\n"
+msgstr "--- 正在反向合并 r%ld 到 “%s”:\n"
+
+#, fuzzy, c-format
+msgid "--- Recording mergeinfo for reverse merge of r%ld into '%s':\n"
+msgstr "--- 正在反向合并(从外部版本库) r%ld 到 “%s”:\n"
+
+#, fuzzy, c-format
+msgid "--- Recording mergeinfo for merge of r%ld through r%ld into '%s':\n"
+msgstr "--- 正在反向合并 r%ld,经由 r%ld,到 “%s”:\n"
+
+#, fuzzy, c-format
+msgid ""
+"--- Recording mergeinfo for reverse merge of r%ld through r%ld into '%s':\n"
+msgstr "--- 正在反向合并 r%ld,经由 r%ld,到 “%s”:\n"
+
+#, fuzzy, c-format
+msgid "--- Eliding mergeinfo from '%s':\n"
+msgstr "--- 正在合并 r%ld 到 “%s”:\n"
+
 #, c-format
 msgid "--- Merging differences between foreign repository URLs into '%s':\n"
 msgstr "--- 正在合并外部版本库 URL 之间的差异到 “%s”:\n"
@@ -7894,6 +8096,10 @@ msgstr "删除属性 “%s” 于版本� msgid "Upgraded '%s'.\n"
 msgstr "已升级的“%s”。\n"
 
+#, c-format
+msgid "Obliterate %8ld %s\n"
+msgstr "灭迹 %8ld %s\n"
+
 msgid "Wrong number of arguments"
 msgstr "参数数目错误"
 
@@ -8205,6 +8411,9 @@ msgstr "在提交事务时禁用fsync [B
 msgid "disable automatic log file removal [Berkeley DB]"
 msgstr "禁用自动删除日志文件 [BDB]"
 
+msgid "read user configuration files from directory ARG"
+msgstr "从目录 ARG 读取用户配置文件"
+
 msgid ""
 "remove redundant Berkeley DB log files\n"
 "                             from source repository [Berkeley DB]"
@@ -8242,6 +8451,12 @@ msgid ""
 "                             earlier than 1.6"
 msgstr "使用与 1.6 之前版本兼容的格式"
 
+#, fuzzy
+msgid ""
+"use format compatible with Subversion versions\n"
+"                             earlier than 1.7"
+msgstr "使用与1.4之前版本兼容的格式"
+
 msgid ""
 "usage: svnadmin crashtest REPOS_PATH\n"
 "\n"
@@ -8779,7 +8994,7 @@ msgstr "排除前缀: \n"
 
 #, c-format
 msgid "Including (and dropping empty revisions for) prefixes:\n"
-msgstr "包含(以及丢弃空版本)的前缀: \n"
+msgstr "包含 (以及丢弃空版本) 的前缀: \n"
 
 #, c-format
 msgid "Including prefixes:\n"
@@ -8858,6 +9073,9 @@ msgstr "历史项最大数量"
 msgid "do not print differences for added files"
 msgstr "不要输出增加文件造成的差异"
 
+msgid "do not print differences for deleted files"
+msgstr "不要输出删除文件造成的差异"
+
 msgid "operate on single directory only"
 msgstr "只在单个目录操作"
 
@@ -9278,6 +9496,15 @@ msgstr ""
 "监听主机名称或IP地址\n"
 "                             [方式: daemon, listen-once]"
 
+msgid ""
+"prefer IPv6 when resolving the listen hostname\n"
+"                             [IPv4 is preferred by default. Using IPv4 and "
+"IPv6\n"
+"                             at the same time is not supported in daemon "
+"mode.\n"
+"                             Use inetd mode or tunnel mode if you need this.]"
+msgstr ""
+
 #. ### Making the assumption here that WIN32 never has fork and so
 #. * ### this option never exists when --service exists.
 msgid "use threads instead of fork [mode: daemon]"
@@ -9524,6 +9751,9 @@ msgstr "尽可能少打印"
 msgid "allow a non-empty destination repository"
 msgstr "允许非空目标版本库"
 
+msgid "do not cache authentication tokens"
+msgstr "不要缓存用户认证令牌"
+
 msgid ""
 "specify a username ARG (deprecated;\n"
 "                             see --source-username and --sync-username)"
@@ -9550,6 +9780,13 @@ msgstr "使用用户名称 ARG 连接目
 msgid "connect to sync repository with password ARG"
 msgstr "使用密码 ARG 连接目的版本库"
 
+msgid ""
+"Disable built-in locking. Use of this option can\n"
+"                             corrupt the mirror unless you ensure that no "
+"other\n"
+"                             instance of svnsync is running concurrently."
+msgstr ""
+
 #, c-format
 msgid "Can't get local hostname"
 msgstr "无法获取本地主机名"

Modified: subversion/branches/svn-patch-improvements/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/svn/cl.h?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/svn/cl.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/svn/cl.h Wed Apr 14 06:51:00 2010
@@ -388,7 +388,7 @@ svn_cl__time_cstring_to_human_cstring(co
    */
 svn_error_t *
 svn_cl__print_status(const char *path,
-                     const svn_wc_status2_t *status,
+                     const svn_wc_status3_t *status,
                      svn_boolean_t detailed,
                      svn_boolean_t show_last_committed,
                      svn_boolean_t skip_unrecognized,
@@ -403,7 +403,7 @@ svn_cl__print_status(const char *path,
    allocations. */
 svn_error_t *
 svn_cl__print_status_xml(const char *path,
-                         const svn_wc_status2_t *status,
+                         const svn_wc_status3_t *status,
                          apr_pool_t *pool);