You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/01/25 18:24:04 UTC

svn commit: r1063367 [2/3] - in /subversion/branches/ignore-mergeinfo-log: ./ build/ build/ac-macros/ build/generator/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_delta/ subversion/libsvn_fs_base/ subvers...

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/sqlite.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/sqlite.c Tue Jan 25 17:24:01 2011
@@ -932,7 +932,11 @@ svn_sqlite__open(svn_sqlite__db_t **db, 
 
                  ### Maybe switch to NORMAL(1) when we use larger transaction
                      scopes */
-              "PRAGMA synchronous=OFF;"));
+              "PRAGMA synchronous=OFF;"
+              /* Enable recursive triggers so that a user trigger will fire
+               * in the deletion phase of an INSERT OR REPLACE statement.
+               * Requires SQLite >= 3.6.18 */
+              "PRAGMA recursive_triggers=ON;"));
 
 #if SQLITE_VERSION_AT_LEAST(3,6,19) && defined(SVN_DEBUG)
   /* When running in debug mode, enable the checking of foreign key

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/subst.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/subst.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/subst.c Tue Jan 25 17:24:01 2011
@@ -1863,6 +1863,7 @@ svn_subst_translate_string2(svn_string_t
                             svn_boolean_t *translated_line_endings,
                             const svn_string_t *value,
                             const char *encoding,
+                            svn_boolean_t repair,
                             apr_pool_t *result_pool,
                             apr_pool_t *scratch_pool)
 {
@@ -1892,7 +1893,7 @@ svn_subst_translate_string2(svn_string_t
                             translated_line_endings,
                             val_utf8,
                             "\n",  /* translate to LF */
-                            FALSE, /* no repair */
+                            repair,
                             NULL,  /* no keywords */
                             FALSE, /* no expansion */
                             scratch_pool));

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/relocate.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/relocate.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/relocate.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/relocate.c Tue Jan 25 17:24:01 2011
@@ -35,31 +35,36 @@
 #include "svn_private_config.h"
 
 
-/* */
+/* If the components of RELPATH exactly match (after being
+   URI-encoded) the final components of URL, return a copy of URL
+   minus those components allocated in RESULT_POOL; otherwise, return
+   NULL. */
 static const char *
-uri_remove_components(const char *uri,
-                      const char *component,
-                      apr_pool_t *result_pool)
+url_remove_final_relpath(const char *url,
+                         const char *relpath,
+                         apr_pool_t *scratch_pool,
+                         apr_pool_t *result_pool)
 {
-  char *result = apr_pstrdup(result_pool, uri);
+  char *result = apr_pstrdup(result_pool, url);
   char *result_end;
-  const char *component_end;
+  const char *relpath_end;
 
-  SVN_ERR_ASSERT_NO_RETURN(svn_uri_is_absolute(uri));
-  SVN_ERR_ASSERT_NO_RETURN(!svn_uri_is_absolute(component));
+  SVN_ERR_ASSERT_NO_RETURN(svn_path_is_url(url));
+  SVN_ERR_ASSERT_NO_RETURN(svn_relpath_is_canonical(relpath, scratch_pool));
 
-  if (component[0] == 0)
+  if (relpath[0] == 0)
     return result;
 
+  relpath = svn_path_uri_encode(relpath, scratch_pool);
   result_end = result + strlen(result) - 1;
-  component_end = component + strlen(component) - 1;
+  relpath_end = relpath + strlen(relpath) - 1;
 
-  while (component_end >= component)
+  while (relpath_end >= relpath)
     {
-      if (*result_end != *component_end)
+      if (*result_end != *relpath_end)
         return NULL;
 
-      component_end--;
+      relpath_end--;
       result_end--;
     }
 
@@ -128,7 +133,8 @@ svn_wc_relocate4(svn_wc_context_t *wc_ct
     return svn_error_create(SVN_ERR_CLIENT_INVALID_RELOCATION, NULL,
                             _("Cannot relocate a single file"));
 
-  old_url = svn_uri_join(old_repos_root, repos_relpath, scratch_pool);
+  old_url = svn_path_url_add_component2(old_repos_root, repos_relpath,
+                                        scratch_pool);
   old_url_len = strlen(old_url);
   from_len = strlen(from);
   if ((from_len > old_url_len) || (strncmp(old_url, from, strlen(from)) != 0))
@@ -143,14 +149,18 @@ svn_wc_relocate4(svn_wc_context_t *wc_ct
     new_url = apr_pstrcat(scratch_pool, to, old_url + from_len, NULL);
   if (! svn_path_is_url(new_url))
     return svn_error_createf(SVN_ERR_WC_INVALID_RELOCATION, NULL,
-                             _("Invalid destination URL: '%s'"), new_url);
+                             _("Invalid relocation destination: '%s' "
+                               "(not a URL)"), new_url);
 
-  new_repos_root = uri_remove_components(new_url, repos_relpath, scratch_pool);
+  new_repos_root = url_remove_final_relpath(new_url, repos_relpath,
+                                            scratch_pool, scratch_pool);
   if (!new_repos_root)
     return svn_error_createf(SVN_ERR_WC_INVALID_RELOCATION, NULL,
-                             _("Invalid destination URL: '%s'"), new_url);
+                             _("Invalid relocation destination: '%s' "
+                               "(does not point to target)" ), new_url);
 
-  SVN_ERR(validator(validator_baton, uuid, new_url, new_repos_root, scratch_pool));
+  SVN_ERR(validator(validator_baton, uuid, new_url, new_repos_root,
+                    scratch_pool));
 
   return svn_error_return(svn_wc__db_global_relocate(wc_ctx->db, local_abspath,
                                                      new_repos_root,

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/status.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/status.c Tue Jan 25 17:24:01 2011
@@ -51,6 +51,7 @@
 #include "tree_conflicts.h"
 
 #include "private/svn_wc_private.h"
+#include "private/svn_fspath.h"
 
 
 

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/upgrade.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/upgrade.c Tue Jan 25 17:24:01 2011
@@ -942,8 +942,8 @@ migrate_props(const char *dir_abspath,
 static char *
 remove_suffix(const char *str, const char *suffix, apr_pool_t *result_pool)
 {
-  int str_len = strlen(str);
-  int suffix_len = strlen(suffix);
+  size_t str_len = strlen(str);
+  size_t suffix_len = strlen(suffix);
 
   if (str_len > suffix_len
       && strcmp(str + str_len - suffix_len, suffix) == 0)
@@ -1129,6 +1129,14 @@ bump_to_23(void *baton, svn_sqlite__db_t
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+bump_to_24(void *baton, svn_sqlite__db_t *sdb, apr_pool_t *scratch_pool)
+{
+  SVN_ERR(svn_sqlite__exec_statements(sdb, STMT_UPGRADE_TO_24));
+  SVN_ERR(svn_sqlite__exec_statements(sdb, STMT_CREATE_NODES_TRIGGERS));
+  return SVN_NO_ERROR;
+}
+
 
 struct upgrade_data_t {
   svn_sqlite__db_t *sdb;
@@ -1390,6 +1398,12 @@ svn_wc__upgrade_sdb(int *result_format,
         *result_format = 23;
         /* FALLTHROUGH  */
 
+      case 23:
+        SVN_ERR(svn_sqlite__with_transaction(sdb, bump_to_24, &bb,
+                                             scratch_pool));
+        *result_format = 24;
+        /* FALLTHROUGH  */
+
       /* ### future bumps go here.  */
 #if 0
       case XXX-1:

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc-metadata.sql?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc-metadata.sql Tue Jan 25 17:24:01 2011
@@ -76,9 +76,12 @@ CREATE UNIQUE INDEX I_LOCAL_ABSPATH ON W
 
 /* ------------------------------------------------------------------------- */
 
-/* The PRISTINE table keeps track of pristine texts. Each pristine text is
-   stored in a file which may be compressed. Each pristine text is
-   referenced by any number of rows in the NODES and ACTUAL_NODE tables.
+/* The PRISTINE table keeps track of pristine texts.  Each row describes a
+   single pristine text.  The text itself is stored in a file whose name is
+   derived from the 'checksum' column.  Each pristine text is referenced by
+   any number of rows in the NODES and ACTUAL_NODE tables.
+
+   In future, the pristine text file may be compressed.
  */
 CREATE TABLE PRISTINE (
   /* The SHA-1 checksum of the pristine text. This is a unique key. The
@@ -95,8 +98,9 @@ CREATE TABLE PRISTINE (
      Used to verify the pristine file is "proper". */
   size  INTEGER NOT NULL,
 
-  /* ### this will probably go away, in favor of counting references
-     ### that exist in NODES. Not yet used; always set to 1. */
+  /* The number of rows in the NODES table that have a 'checksum' column
+     value that refers to this row.  (References in other places, such as
+     in the ACTUAL_NODE table, are not counted.) */
   refcount  INTEGER NOT NULL,
 
   /* Alternative MD5 checksum used for communicating with older
@@ -480,6 +484,35 @@ CREATE TABLE NODES (
 CREATE INDEX I_NODES_PARENT ON NODES (wc_id, parent_relpath, op_depth);
 
 
+-- STMT_CREATE_NODES_TRIGGERS
+
+CREATE TRIGGER nodes_insert_trigger
+AFTER INSERT ON nodes
+/* WHEN NEW.checksum IS NOT NULL */
+BEGIN
+  UPDATE pristine SET refcount = refcount + 1
+  WHERE checksum = NEW.checksum;
+END;
+
+CREATE TRIGGER nodes_delete_trigger
+AFTER DELETE ON nodes
+/* WHEN OLD.checksum IS NOT NULL */
+BEGIN
+  UPDATE pristine SET refcount = refcount - 1
+  WHERE checksum = OLD.checksum;
+END;
+
+CREATE TRIGGER nodes_update_checksum_trigger
+AFTER UPDATE OF checksum ON nodes
+/* WHEN NEW.checksum IS NOT NULL OR OLD.checksum IS NOT NULL */
+BEGIN
+  UPDATE pristine SET refcount = refcount + 1
+  WHERE checksum = NEW.checksum;
+  UPDATE pristine SET refcount = refcount - 1
+  WHERE checksum = OLD.checksum;
+END;
+
+
 
 /* Format 20 introduces NODES and removes BASE_NODE and WORKING_NODE */
 
@@ -552,6 +585,19 @@ PRAGMA user_version = 23;
 
 /* ------------------------------------------------------------------------- */
 
+/* Format 24 involves no schema changes; it starts using the pristine
+   table's refcount column correctly. */
+
+-- STMT_UPGRADE_TO_24
+UPDATE pristine SET refcount =
+  (SELECT COUNT(*) FROM nodes
+   WHERE checksum = pristine.checksum /*OR checksum = pristine.md5_checksum*/);
+
+PRAGMA user_version = 24;
+
+
+/* ------------------------------------------------------------------------- */
+
 /* Format YYY introduces new handling for conflict information.  */
 -- format: YYY
 

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc-queries.sql?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc-queries.sql Tue Jan 25 17:24:01 2011
@@ -411,7 +411,7 @@ DELETE FROM work_queue WHERE id = ?1;
 
 -- STMT_INSERT_PRISTINE
 INSERT OR IGNORE INTO pristine (checksum, md5_checksum, size, refcount)
-VALUES (?1, ?2, ?3, 1);
+VALUES (?1, ?2, ?3, 0);
 
 -- STMT_SELECT_PRISTINE_MD5_CHECKSUM
 SELECT md5_checksum
@@ -423,21 +423,14 @@ SELECT checksum
 FROM pristine
 WHERE md5_checksum = ?1
 
--- STMT_SELECT_ANY_PRISTINE_REFERENCE
-SELECT 1 FROM nodes
-  WHERE checksum = ?1 OR checksum = ?2
-LIMIT 1
-
 -- STMT_SELECT_UNREFERENCED_PRISTINES
 SELECT checksum
 FROM pristine
-EXCEPT
-SELECT checksum FROM nodes
-  WHERE checksum IS NOT NULL
+WHERE refcount = 0
 
--- STMT_DELETE_PRISTINE
+-- STMT_DELETE_PRISTINE_IF_UNREFERENCED
 DELETE FROM pristine
-WHERE checksum = ?1
+WHERE checksum = ?1 AND refcount = 0
 
 -- STMT_SELECT_ACTUAL_CONFLICT_VICTIMS
 SELECT local_relpath

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc.h?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc.h Tue Jan 25 17:24:01 2011
@@ -133,12 +133,15 @@ extern "C" {
  * The change from 22 to 23 introduced multi-layer op_depth processing for
  * NODES.
  *
+ * The change from 23 to 24 started using the 'refcount' column of the
+ * 'pristine' table correctly, instead of always setting it to '1'.
+ *
  * == 1.7.x shipped with format ???
  *
  * Please document any further format changes here.
  */
 
-#define SVN_WC__VERSION 23
+#define SVN_WC__VERSION 24
 
 
 /* Formats <= this have no concept of "revert text-base/props".  */

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc_db.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc_db.c Tue Jan 25 17:24:01 2011
@@ -61,8 +61,6 @@
 #define SDB_FILE  "wc.db"
 #define SDB_FILE_UPGRADE "wc.db.upgrade"
 
-#define PRISTINE_STORAGE_RELPATH "pristine"
-#define PRISTINE_TEMPDIR_RELPATH ""
 #define WCROOT_TEMPDIR_RELPATH   "tmp"
 
 
@@ -421,77 +419,6 @@ static const char *construct_like_arg(co
 
 
 
-/* Returns in PRISTINE_ABSPATH a new string allocated from RESULT_POOL,
-   holding the local absolute path to the file location that is dedicated
-   to hold CHECKSUM's pristine file, relating to the pristine store
-   configured for the working copy indicated by PDH. The returned path
-   does not necessarily currently exist.
-
-   Iff CREATE_SUBDIR is TRUE, then this function will make sure that the
-   parent directory of PRISTINE_ABSPATH exists. This is only useful when
-   about to create a new pristine.
-
-   Any other allocations are made in SCRATCH_POOL. */
-static svn_error_t *
-get_pristine_fname(const char **pristine_abspath,
-                   const char *wcroot_abspath,
-                   const svn_checksum_t *sha1_checksum,
-                   svn_boolean_t create_subdir,
-                   apr_pool_t *result_pool,
-                   apr_pool_t *scratch_pool)
-{
-  const char *base_dir_abspath;
-  const char *hexdigest = svn_checksum_to_cstring(sha1_checksum, scratch_pool);
-  char subdir[3];
-
-  /* ### code is in transition. make sure we have the proper data.  */
-  SVN_ERR_ASSERT(pristine_abspath != NULL);
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wcroot_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
-  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
-
-  /* ### need to fix this to use a symbol for ".svn". we don't need
-     ### to use join_many since we know "/" is the separator for
-     ### internal canonical paths */
-  base_dir_abspath = svn_dirent_join_many(scratch_pool,
-                                          wcroot_abspath,
-                                          svn_wc_get_adm_dir(scratch_pool),
-                                          PRISTINE_STORAGE_RELPATH,
-                                          NULL);
-
-  /* We should have a valid checksum and (thus) a valid digest. */
-  SVN_ERR_ASSERT(hexdigest != NULL);
-
-  /* Get the first two characters of the digest, for the subdir. */
-  subdir[0] = hexdigest[0];
-  subdir[1] = hexdigest[1];
-  subdir[2] = '\0';
-
-  if (create_subdir)
-    {
-      const char *subdir_abspath = svn_dirent_join(base_dir_abspath, subdir,
-                                                   scratch_pool);
-      svn_error_t *err;
-
-      err = svn_io_dir_make(subdir_abspath, APR_OS_DEFAULT, scratch_pool);
-
-      /* Whatever error may have occurred... ignore it. Typically, this
-         will be "directory already exists", but if it is something
-         *different*, then presumably another error will follow when we
-         try to access the file within this (missing?) pristine subdir. */
-      svn_error_clear(err);
-    }
-
-  /* The file is located at DIR/.svn/pristine/XX/XXYYZZ... */
-  *pristine_abspath = svn_dirent_join_many(result_pool,
-                                           base_dir_abspath,
-                                           subdir,
-                                           hexdigest,
-                                           NULL);
-  return SVN_NO_ERROR;
-}
-
-
 /* Look up REPOS_ID in SDB and set *REPOS_ROOT_URL and/or *REPOS_UUID to
  * its root URL and UUID respectively.  If REPOS_ID is INVALID_REPOS_ID,
  * use NULL for both URL and UUID.  Either or both output parameters may be
@@ -1273,9 +1200,8 @@ create_db(svn_sqlite__db_t **sdb,
 
   /* Create the database's schema.  */
   SVN_ERR(svn_sqlite__exec_statements(*sdb, STMT_CREATE_SCHEMA));
-
-  /* Create the NODES table for the experimental schema */
   SVN_ERR(svn_sqlite__exec_statements(*sdb, STMT_CREATE_NODES));
+  SVN_ERR(svn_sqlite__exec_statements(*sdb, STMT_CREATE_NODES_TRIGGERS));
 
   /* Insert the repository. */
   SVN_ERR(create_repos_id(repos_id, repos_root_url, repos_uuid, *sdb,
@@ -2218,478 +2144,6 @@ svn_wc__db_base_clear_dav_cache_recursiv
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_wc__db_pristine_get_path(const char **pristine_abspath,
-                             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_boolean_t present;
-
-  SVN_ERR_ASSERT(pristine_abspath != NULL);
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
-  /* ### Transitional: accept MD-5 and look up the SHA-1.  Return an error
-   * if the pristine text is not in the store. */
-  if (sha1_checksum->kind != svn_checksum_sha1)
-    SVN_ERR(svn_wc__db_pristine_get_sha1(&sha1_checksum, db, wri_abspath,
-                                         sha1_checksum,
-                                         scratch_pool, scratch_pool));
-  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath,
-                                             db, wri_abspath,
-                                             svn_sqlite__mode_readonly,
-                                             scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  SVN_ERR(svn_wc__db_pristine_check(&present, db, wri_abspath, sha1_checksum,
-                                    scratch_pool));
-  if (! present)
-    return svn_error_createf(SVN_ERR_WC_DB_ERROR, NULL,
-                             _("Pristine text not found"));
-
-  SVN_ERR(get_pristine_fname(pristine_abspath, pdh->wcroot->abspath,
-                             sha1_checksum,
-                             FALSE /* create_subdir */,
-                             result_pool, scratch_pool));
-
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_wc__db_pristine_get_future_path(const char **pristine_abspath,
-                                    const char *wcroot_abspath,
-                                    svn_checksum_t *sha1_checksum,
-                                    apr_pool_t *result_pool,
-                                    apr_pool_t *scratch_pool)
-{
-  SVN_ERR(get_pristine_fname(pristine_abspath, wcroot_abspath,
-                             sha1_checksum,
-                             FALSE /* create_subdir */,
-                             result_pool, scratch_pool));
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_wc__db_pristine_read(svn_stream_t **contents,
-                         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;
-  const char *pristine_abspath;
-
-  SVN_ERR_ASSERT(contents != NULL);
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
-  /* ### Transitional: accept MD-5 and look up the SHA-1.  Return an error
-   * if the pristine text is not in the store. */
-  if (sha1_checksum->kind != svn_checksum_sha1)
-    SVN_ERR(svn_wc__db_pristine_get_sha1(&sha1_checksum, db, wri_abspath,
-                                         sha1_checksum,
-                                         scratch_pool, scratch_pool));
-  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              wri_abspath, svn_sqlite__mode_readonly,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  /* ### should we look in the PRISTINE table for anything?  */
-
-  SVN_ERR(get_pristine_fname(&pristine_abspath, pdh->wcroot->abspath,
-                             sha1_checksum,
-                             FALSE /* create_subdir */,
-                             scratch_pool, scratch_pool));
-  return svn_error_return(svn_stream_open_readonly(
-                            contents, pristine_abspath,
-                            result_pool, scratch_pool));
-}
-
-
-svn_error_t *
-svn_wc__db_pristine_get_tempdir(const char **temp_dir_abspath,
-                                svn_wc__db_t *db,
-                                const char *wri_abspath,
-                                apr_pool_t *result_pool,
-                                apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-
-  SVN_ERR_ASSERT(temp_dir_abspath != NULL);
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              wri_abspath, svn_sqlite__mode_readonly,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  *temp_dir_abspath = svn_dirent_join_many(result_pool,
-                                           pdh->wcroot->abspath,
-                                           svn_wc_get_adm_dir(scratch_pool),
-                                           PRISTINE_TEMPDIR_RELPATH,
-                                           NULL);
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_wc__db_pristine_install(svn_wc__db_t *db,
-                            const char *tempfile_abspath,
-                            const svn_checksum_t *sha1_checksum,
-                            const svn_checksum_t *md5_checksum,
-                            apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-  const char *wri_abspath;
-  const char *pristine_abspath;
-  apr_finfo_t finfo;
-  svn_sqlite__stmt_t *stmt;
-  svn_node_kind_t kind;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(tempfile_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
-  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
-  SVN_ERR_ASSERT(md5_checksum != NULL);
-  SVN_ERR_ASSERT(md5_checksum->kind == svn_checksum_md5);
-
-  /* ### this logic assumes that TEMPFILE_ABSPATH follows this pattern:
-     ###   WCROOT_ABSPATH/COMPONENT/TEMPFNAME
-     ### if we change this (see PRISTINE_TEMPDIR_RELPATH), then this
-     ### logic should change.  */
-  wri_abspath = svn_dirent_dirname(svn_dirent_dirname(tempfile_abspath,
-                                                      scratch_pool),
-                                   scratch_pool);
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              wri_abspath, svn_sqlite__mode_readonly,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  SVN_ERR(get_pristine_fname(&pristine_abspath, pdh->wcroot->abspath,
-                             sha1_checksum,
-                             TRUE /* create_subdir */,
-                             scratch_pool, scratch_pool));
-
-
-  SVN_ERR(svn_io_check_path(pristine_abspath, &kind, scratch_pool));
-
-  if (kind == svn_node_file)
-    {
-      /* Remove the tempfile, it's already there */
-      return svn_error_return(
-                  svn_io_remove_file2(tempfile_abspath,
-                                      FALSE, scratch_pool));
-    }
-
-  /* Put the file into its target location.  */
-    SVN_ERR(svn_io_file_rename(tempfile_abspath, pristine_abspath,
-                               scratch_pool));
-
-  SVN_ERR(svn_io_stat(&finfo, pristine_abspath, APR_FINFO_SIZE,
-                      scratch_pool));
-
-  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                    STMT_INSERT_PRISTINE));
-  SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, sha1_checksum, scratch_pool));
-  SVN_ERR(svn_sqlite__bind_checksum(stmt, 2, md5_checksum, scratch_pool));
-  SVN_ERR(svn_sqlite__bind_int64(stmt, 3, finfo.size));
-  SVN_ERR(svn_sqlite__insert(NULL, stmt));
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_wc__db_pristine_get_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 != NULL);
-  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
-
-  SVN_ERR(svn_wc__db_pdh_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, result_pool));
-  SVN_ERR_ASSERT((*md5_checksum)->kind == svn_checksum_md5);
-
-  return svn_error_return(svn_sqlite__reset(stmt));
-}
-
-
-svn_error_t *
-svn_wc__db_pristine_get_sha1(const svn_checksum_t **sha1_checksum,
-                             svn_wc__db_t *db,
-                             const char *wri_abspath,
-                             const svn_checksum_t *md5_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 != NULL);
-  SVN_ERR_ASSERT(md5_checksum->kind == svn_checksum_md5);
-
-  SVN_ERR(svn_wc__db_pdh_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_SHA1_CHECKSUM));
-  SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, md5_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 MD5 checksum '%s' was "
-                               "not found"),
-                             svn_checksum_to_cstring_display(md5_checksum,
-                                                             scratch_pool));
-
-  SVN_ERR(svn_sqlite__column_checksum(sha1_checksum, stmt, 0, result_pool));
-  SVN_ERR_ASSERT((*sha1_checksum)->kind == svn_checksum_sha1);
-
-  return svn_error_return(svn_sqlite__reset(stmt));
-}
-
-
-/* Delete the pristine text referenced by SHA1_CHECKSUM from the pristine
- * store of WCROOT.  Delete both the database row and the file on disk. */
-static svn_error_t *
-pristine_remove(svn_wc__db_wcroot_t *wcroot,
-                const svn_checksum_t *sha1_checksum,
-                apr_pool_t *scratch_pool)
-{
-  svn_sqlite__stmt_t *stmt;
-  const char *pristine_abspath;
-
-  /* Remove the DB row. */
-  SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                    STMT_DELETE_PRISTINE));
-  SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, sha1_checksum, scratch_pool));
-  SVN_ERR(svn_sqlite__update(NULL, stmt));
-
-  /* Remove the file */
-  SVN_ERR(get_pristine_fname(&pristine_abspath, wcroot->abspath,
-                             sha1_checksum, TRUE /* create_subdir */,
-                             scratch_pool, scratch_pool));
-  SVN_ERR(svn_io_remove_file2(pristine_abspath, TRUE /* ignore_enoent */,
-                              scratch_pool));
-
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_wc__db_pristine_remove(svn_wc__db_t *db,
-                           const char *wri_abspath,
-                           const svn_checksum_t *sha1_checksum,
-                           apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-  svn_boolean_t is_referenced;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
-  /* ### Transitional: accept MD-5 and look up the SHA-1.  Return an error
-   * if the pristine text is not in the store. */
-  if (sha1_checksum->kind != svn_checksum_sha1)
-    SVN_ERR(svn_wc__db_pristine_get_sha1(&sha1_checksum, db, wri_abspath,
-                                         sha1_checksum,
-                                         scratch_pool, scratch_pool));
-  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              wri_abspath, svn_sqlite__mode_readwrite,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  /* If the work queue is not empty, don't delete any pristine text because
-   * the work queue may contain a reference to it. */
-  {
-    svn_sqlite__stmt_t *stmt;
-    svn_boolean_t have_row;
-
-    SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                      STMT_LOOK_FOR_WORK));
-    SVN_ERR(svn_sqlite__step(&have_row, stmt));
-    SVN_ERR(svn_sqlite__reset(stmt));
-
-    if (have_row)
-      return SVN_NO_ERROR;
-  }
-
-  /* Find whether the SHA-1 (or the MD-5) is referenced; set IS_REFERENCED. */
-  {
-    const svn_checksum_t *md5_checksum;
-    svn_sqlite__stmt_t *stmt;
-
-    /* ### Transitional: look for references to its MD-5 as well. */
-    SVN_ERR(svn_wc__db_pristine_get_md5(&md5_checksum, db, wri_abspath,
-                                        sha1_checksum, scratch_pool,
-                                        scratch_pool));
-
-    SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                      STMT_SELECT_ANY_PRISTINE_REFERENCE));
-    SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, sha1_checksum, scratch_pool));
-    SVN_ERR(svn_sqlite__bind_checksum(stmt, 2, md5_checksum, scratch_pool));
-    SVN_ERR(svn_sqlite__step(&is_referenced, stmt));
-
-    SVN_ERR(svn_sqlite__reset(stmt));
-  }
-
-  /* If not referenced, remove the PRISTINE table row and the file. */
-  if (! is_referenced)
-    {
-      SVN_ERR(pristine_remove(pdh->wcroot, sha1_checksum, scratch_pool));
-    }
-
-  return SVN_NO_ERROR;
-}
-
-
-static svn_error_t *
-pristine_cleanup_wcroot(svn_wc__db_wcroot_t *wcroot,
-                        apr_pool_t *scratch_pool)
-{
-  svn_sqlite__stmt_t *stmt;
-
-  /* Find each unreferenced pristine in the DB and remove it. */
-  SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                    STMT_SELECT_UNREFERENCED_PRISTINES));
-  while (1)
-    {
-      svn_boolean_t have_row;
-      const svn_checksum_t *sha1_checksum;
-
-      SVN_ERR(svn_sqlite__step(&have_row, stmt));
-      if (! have_row)
-        break;
-
-      SVN_ERR(svn_sqlite__column_checksum(&sha1_checksum, stmt, 0,
-                                          scratch_pool));
-      SVN_ERR(pristine_remove(wcroot, sha1_checksum, scratch_pool));
-    }
-  SVN_ERR(svn_sqlite__reset(stmt));
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_wc__db_pristine_cleanup(svn_wc__db_t *db,
-                            const char *wri_abspath,
-                            apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              wri_abspath, svn_sqlite__mode_readonly,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  SVN_ERR(pristine_cleanup_wcroot(pdh->wcroot, scratch_pool));
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_wc__db_pristine_check(svn_boolean_t *present,
-                          svn_wc__db_t *db,
-                          const char *wri_abspath,
-                          const svn_checksum_t *sha1_checksum,
-                          apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-  const char *pristine_abspath;
-  svn_sqlite__stmt_t *stmt;
-  svn_boolean_t have_row;
-  svn_node_kind_t kind_on_disk;
-
-  SVN_ERR_ASSERT(present != NULL);
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
-  /* ### Transitional: accept MD-5 and look up the SHA-1.  Return an error
-   * if the pristine text is not in the store. */
-  if (sha1_checksum->kind != svn_checksum_sha1)
-    SVN_ERR(svn_wc__db_pristine_get_sha1(&sha1_checksum, db, wri_abspath,
-                                         sha1_checksum,
-                                         scratch_pool, scratch_pool));
-  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              wri_abspath, svn_sqlite__mode_readonly,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  /* Check that there is an entry in the PRISTINE table. */
-  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));
-  SVN_ERR(svn_sqlite__reset(stmt));
-
-  /* Check that the pristine text file exists. */
-  SVN_ERR(get_pristine_fname(&pristine_abspath, pdh->wcroot->abspath,
-                             sha1_checksum,
-                             FALSE /* create_subdir */,
-                             scratch_pool, scratch_pool));
-  SVN_ERR(svn_io_check_path(pristine_abspath, &kind_on_disk, scratch_pool));
-
-  if (kind_on_disk != (have_row ? svn_node_file : svn_node_none))
-    return svn_error_createf(SVN_ERR_WC_DB_ERROR, svn_sqlite__reset(stmt),
-                             _("The pristine text with checksum '%s' was "
-                               "found in the DB or on disk but not both"),
-                             svn_checksum_to_cstring_display(sha1_checksum,
-                                                             scratch_pool));
-
-  *present = have_row;
-  return SVN_NO_ERROR;
-}
-
-
 /* Helper for svn_wc__db_op_copy to handle copying from one db to
    another */
 static svn_error_t *

Modified: subversion/branches/ignore-mergeinfo-log/subversion/mod_authz_svn/mod_authz_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/mod_authz_svn/mod_authz_svn.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/mod_authz_svn/mod_authz_svn.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/mod_authz_svn/mod_authz_svn.c Tue Jan 25 17:24:01 2011
@@ -42,6 +42,7 @@
 #include "svn_config.h"
 #include "svn_string.h"
 #include "svn_repos.h"
+#include "svn_dirent_uri.h"
 
 
 extern module AP_MODULE_DECLARE_DATA authz_svn_module;

Modified: subversion/branches/ignore-mergeinfo-log/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/mod_dav_svn/reports/update.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/mod_dav_svn/reports/update.c Tue Jan 25 17:24:01 2011
@@ -98,14 +98,8 @@ typedef struct item_baton_t {
   svn_boolean_t text_changed;        /* Did the file's contents change? */
   svn_boolean_t added;               /* File added? (Implies text_changed.) */
   svn_boolean_t copyfrom;            /* File copied? */
-  apr_array_header_t *changed_props; /* array of const char * prop names */
   apr_array_header_t *removed_props; /* array of const char * prop names */
 
-  /* "entry props" */
-  const char *committed_rev;
-  const char *committed_date;
-  const char *last_author;
-
 } item_baton_t;
 
 
@@ -414,7 +408,7 @@ close_helper(svn_boolean_t is_dir, item_
 
   /* ### ack!  binary names won't float here! */
   /* If this is a copied file/dir, we can have removed props. */
-  if (baton->removed_props && (! baton->added || baton->copyfrom))
+  if (baton->removed_props && baton->copyfrom)
     {
       const char *qname;
       int i;
@@ -429,61 +423,15 @@ close_helper(svn_boolean_t is_dir, item_
         }
     }
 
-  if ((! baton->uc->send_all) && baton->changed_props && (! baton->added))
-    {
-      /* Tell the client to fetch all the props */
-      SVN_ERR(dav_svn__brigade_puts(baton->uc->bb, baton->uc->output,
-                                    "<S:fetch-props/>" DEBUG_CR));
-    }
-
-  SVN_ERR(dav_svn__brigade_puts(baton->uc->bb, baton->uc->output, "<S:prop>"));
-
-  /* Both modern and non-modern clients need the checksum... */
   if (baton->text_checksum)
     {
       SVN_ERR(dav_svn__brigade_printf(baton->uc->bb, baton->uc->output,
-                                      "<V:md5-checksum>%s</V:md5-checksum>",
+                                      "<S:prop>"
+                                      "<V:md5-checksum>%s</V:md5-checksum>"
+                                      "</S:prop>",
                                       baton->text_checksum));
     }
 
-  /* ...but only non-modern clients want the 3 CR-related properties
-     sent like here, because they can't handle receiving these special
-     props inline like any other prop.
-     ### later on, compress via the 'scattered table' solution as
-     discussed with gstein.  -bmcs */
-  if (! baton->uc->send_all)
-    {
-      /* ### grrr, these DAV: property names are already #defined in
-         ra_dav.h, and statically defined in liveprops.c.  And now
-         they're hardcoded here.  Isn't there some header file that both
-         sides of the network can share?? */
-
-      /* ### special knowledge: svn_repos_dir_delta2 will never send
-       *removals* of the commit-info "entry props". */
-      if (baton->committed_rev)
-        SVN_ERR(dav_svn__brigade_printf(baton->uc->bb, baton->uc->output,
-                                        "<D:version-name>%s</D:version-name>",
-                                        baton->committed_rev));
-
-      if (baton->committed_date)
-        SVN_ERR(dav_svn__brigade_printf(baton->uc->bb, baton->uc->output,
-                                        "<D:creationdate>%s</D:creationdate>",
-                                        baton->committed_date));
-
-      if (baton->last_author)
-        SVN_ERR(dav_svn__brigade_printf(baton->uc->bb, baton->uc->output,
-                                        "<D:creator-displayname>%s"
-                                        "</D:creator-displayname>",
-                                        apr_xml_quote_string(baton->pool,
-                                                             baton->last_author,
-                                                             1)));
-
-    }
-
-  /* Close unconditionally, because we sent checksum unconditionally. */
-  SVN_ERR(dav_svn__brigade_puts(baton->uc->bb, baton->uc->output,
-                                "</S:prop>" DEBUG_CR));
-
   if (baton->added)
     SVN_ERR(dav_svn__brigade_printf(baton->uc->bb, baton->uc->output,
                                     "</S:add-%s>" DEBUG_CR,
@@ -646,8 +594,10 @@ upd_change_xxx_prop(void *baton,
   if (qname == name)
     qname = apr_pstrdup(b->pool, name);
 
-
-  if (b->uc->send_all)
+  /* Even if we are not in send-all mode we have the prop changes already,
+     so send them to the client now instead of telling the client to fetch
+     them later. */
+  if (b->uc->send_all || !b->added)
     {
       if (value)
         {
@@ -683,56 +633,16 @@ upd_change_xxx_prop(void *baton,
                                           qname));
         }
     }
-  else  /* don't do inline response, just cache prop names for close_helper */
+  else if (!value) /* This is an addition in 'skelta' mode so there is no
+                      need for an inline response since property fetching
+                      is implied in addition.  We still need to cache
+                      property removals because a copied path might
+                      have removed properties. */
     {
-      /* For now, store certain entry props, because we'll need to send
-         them later as standard DAV ("D:") props.  ### this should go
-         away and we should just tunnel those props on through for the
-         client to deal with. */
-#define NSLEN (sizeof(SVN_PROP_ENTRY_PREFIX) - 1)
-      if (! strncmp(name, SVN_PROP_ENTRY_PREFIX, NSLEN))
-        {
-          if (strcmp(name, SVN_PROP_ENTRY_COMMITTED_REV) == 0)
-            {
-              b->committed_rev = value ?
-                apr_pstrdup(b->pool, value->data) : NULL;
-            }
-          else if (strcmp(name, SVN_PROP_ENTRY_COMMITTED_DATE) == 0)
-            {
-              b->committed_date = value ?
-                apr_pstrdup(b->pool, value->data) : NULL;
-            }
-          else if (strcmp(name, SVN_PROP_ENTRY_LAST_AUTHOR) == 0)
-            {
-              b->last_author = value ?
-                apr_pstrdup(b->pool, value->data) : NULL;
-            }
-          else if ((strcmp(name, SVN_PROP_ENTRY_LOCK_TOKEN) == 0)
-                   && (! value))
-            {
-              /* We only support delete of lock tokens, not add/modify. */
-              if (! b->removed_props)
-                b->removed_props = apr_array_make(b->pool, 1, sizeof(name));
-              APR_ARRAY_PUSH(b->removed_props, const char *) = qname;
-            }
-          return SVN_NO_ERROR;
-        }
-#undef NSLEN
-
-      if (value)
-        {
-          if (! b->changed_props)
-            b->changed_props = apr_array_make(b->pool, 1, sizeof(name));
+      if (! b->removed_props)
+        b->removed_props = apr_array_make(b->pool, 1, sizeof(name));
 
-          APR_ARRAY_PUSH(b->changed_props, const char *) = qname;
-        }
-      else
-        {
-          if (! b->removed_props)
-            b->removed_props = apr_array_make(b->pool, 1, sizeof(name));
-
-          APR_ARRAY_PUSH(b->removed_props, const char *) = qname;
-        }
+      APR_ARRAY_PUSH(b->removed_props, const char *) = qname;
     }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/ignore-mergeinfo-log/subversion/svn/lock-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/svn/lock-cmd.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/svn/lock-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/svn/lock-cmd.c Tue Jan 25 17:24:01 2011
@@ -74,7 +74,7 @@ get_comment(const char **comment, svn_cl
   /* Translate to UTF8/LF. */
   SVN_ERR(svn_subst_translate_string2(&comment_string, NULL, NULL,
                                       comment_string, opt_state->encoding,
-                                      pool, pool));
+                                      FALSE, pool, pool));
   *comment = comment_string->data;
 
   return SVN_NO_ERROR;

Modified: subversion/branches/ignore-mergeinfo-log/subversion/svn/propset-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/svn/propset-cmd.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/svn/propset-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/svn/propset-cmd.c Tue Jan 25 17:24:01 2011
@@ -86,8 +86,8 @@ svn_cl__propset(apr_getopt_t *os,
      and LF line endings.  All other propvals are taken literally. */
   if (svn_prop_needs_translation(pname_utf8))
     SVN_ERR(svn_subst_translate_string2(&propval, NULL, NULL, propval,
-                                        opt_state->encoding, scratch_pool,
-                                        scratch_pool));
+                                        opt_state->encoding, FALSE,
+                                        scratch_pool, scratch_pool));
   else if (opt_state->encoding)
     return svn_error_create
       (SVN_ERR_UNSUPPORTED_FEATURE, NULL,

Modified: subversion/branches/ignore-mergeinfo-log/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/svn/util.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/svn/util.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/svn/util.c Tue Jan 25 17:24:01 2011
@@ -485,8 +485,8 @@ svn_cl__edit_string_externally(svn_strin
       if (as_text)
         {
           err = svn_subst_translate_string2(edited_contents, FALSE, FALSE,
-                                            *edited_contents, encoding, pool,
-                                            pool);
+                                            *edited_contents, encoding, FALSE,
+                                            pool, pool);
           if (err)
             {
               err = svn_error_quick_wrap
@@ -713,7 +713,7 @@ svn_cl__get_log_message(const char **log
       log_msg_str->len = log_msg_buf->len;
       SVN_ERR_W(svn_subst_translate_string2(&log_msg_str, FALSE, FALSE,
                                             log_msg_str, lmb->message_encoding,
-                                            pool, pool),
+                                            FALSE, pool, pool),
                 _("Error normalizing log message to internal format"));
 
       *log_msg = log_msg_str->data;

Modified: subversion/branches/ignore-mergeinfo-log/subversion/svnadmin/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/svnadmin/main.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/svnadmin/main.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/svnadmin/main.c Tue Jan 25 17:24:01 2011
@@ -1184,7 +1184,7 @@ set_revprop(const char *prop_name, const
   prop_value->len = file_contents->len;
 
   SVN_ERR(svn_subst_translate_string2(&prop_value, NULL, NULL, prop_value,
-                                      NULL, pool, pool));
+                                      NULL, FALSE, pool, pool));
 
   /* Open the filesystem  */
   SVN_ERR(open_repos(&repos, opt_state->repository_path, pool));

Modified: subversion/branches/ignore-mergeinfo-log/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/svnlook/main.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/svnlook/main.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/svnlook/main.c Tue Jan 25 17:24:01 2011
@@ -52,6 +52,7 @@
 #include "svn_xml.h"
 
 #include "private/svn_cmdline_private.h"
+#include "private/svn_fspath.h"
 
 #include "svn_private_config.h"
 

Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/davautocheck.sh?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/davautocheck.sh Tue Jan 25 17:24:01 2011
@@ -190,7 +190,7 @@ $LDD "$CLIENT_CMD" | grep -q 'not found'
   || fail "Subversion client couldn't find and/or load ra_dav library"
 
 httpd="$($APXS -q PROGNAME)"
-HTTPD=$(get_prog_name $httpd) || fail "HTTPD not found"
+HTTPD=$(get_prog_name $httpd) || fail "HTTPD '$HTTPD' not found"
 [ -x $HTTPD ] || fail "HTTPD '$HTTPD' not executable"
 
 "$HTTPD" -v 1>/dev/null 2>&1 \

Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/merge_tests.py?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/merge_tests.py Tue Jan 25 17:24:01 2011
@@ -11103,7 +11103,7 @@ def set_up_renamed_subtree(sbox):
   expected_status.remove('A/D/H/psi')
 
   # Replicate old WC-to-WC move behavior where empty mergeinfo was set on
-  # the move desination.  Pre 1.6 repositories might have mergeinfo like
+  # the move destination.  Pre 1.6 repositories might have mergeinfo like
   # this so we still want to test that the issue #3067 fixes tested by
   # merge_chokes_on_renamed_subtrees and subtrees_with_empty_mergeinfo
   # still work.
@@ -16316,6 +16316,92 @@ def subtree_merges_inherit_invalid_worki
     "Subtree merge under working merge produced the wrong mergeinfo",
     '/A/C/nu:9', [], 'pg', SVN_PROP_MERGEINFO, nu_COPY_path)
 
+
+#----------------------------------------------------------------------
+# Test for issue #3686 'executable flag not correctly set on merge'
+# See http://subversion.tigris.org/issues/show_bug.cgi?id=3686
+def merge_change_to_file_with_executable(sbox):
+  "executable flag is maintained during binary merge"
+
+  # Scenario: When merging a change to a binary file with the 'svn:executable'
+  # property set, the file is not marked as 'executable'. After commit, the 
+  # executable bit is set correctly.
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  trunk_url = sbox.repo_url + '/A/B/E'
+
+  alpha_path = os.path.join(wc_dir, "A", "B", "E", "alpha")
+  beta_path = os.path.join(wc_dir, "A", "B", "E", "beta")
+
+  # Force one of the files to be a binary type
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'propset', 'svn:mime-type',
+                                     'application/octet-stream',
+                                     alpha_path)
+
+  # Set the 'svn:executable' property on both files
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'propset', 'svn:executable', 'ON',
+                                     beta_path)
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'propset', 'svn:executable', 'ON',
+                                     alpha_path)
+
+  # Verify the executable bit has been set before committing
+  if not os.access(alpha_path, os.X_OK):
+    raise svntest.Failure("alpha not marked as executable before commit")
+  if not os.access(beta_path, os.X_OK):
+    raise svntest.Failure("beta is not marked as executable before commit")
+
+  # Commit change (r2)
+  sbox.simple_commit()
+
+  # Verify the executable bit has remained after committing
+  if not os.access(alpha_path, os.X_OK):
+    raise svntest.Failure("alpha not marked as executable before commit")
+  if not os.access(beta_path, os.X_OK):
+    raise svntest.Failure("beta is not marked as executable before commit")
+
+  # Create the branch
+  svntest.actions.run_and_verify_svn(None, None, [], 'cp',
+                                     trunk_url,
+                                     sbox.repo_url + '/branch',
+                                     '-m', "Creating the Branch")   
+
+  # Modify the files + commit (r3)
+  svntest.main.file_append(alpha_path, 'appended alpha text')
+  svntest.main.file_append(beta_path, 'appended beta text')
+  sbox.simple_commit()
+
+  # Switch the WC to the branch
+  svntest.actions.run_and_verify_svn(None, None, [], 'switch',
+                                     sbox.repo_url + '/branch',
+                                     wc_dir)
+  
+  # Recalculate the paths
+  alpha_path = os.path.join(wc_dir, "alpha")
+  beta_path = os.path.join(wc_dir, "beta")
+
+  # Merge the changes across
+  svntest.actions.run_and_verify_svn(None, None, [], 'merge',
+                                     trunk_url, wc_dir)
+
+  # Verify the executable bit has been set
+  if not os.access(alpha_path, os.X_OK):
+    raise svntest.Failure("alpha is not marked as executable after merge")
+  if not os.access(beta_path, os.X_OK):
+    raise svntest.Failure("beta is not marked as executable after merge")
+
+  # Commit (r4)
+  sbox.simple_commit()
+
+  # Verify the executable bit has been set
+  if not os.access(alpha_path, os.X_OK):
+    raise svntest.Failure("alpha is not marked as executable after commit")
+  if not os.access(beta_path, os.X_OK):
+    raise svntest.Failure("beta is not marked as executable after commit")
+
 ########################################################################
 # Run the tests
 
@@ -16507,6 +16593,8 @@ test_list = [ None,
               merge_with_os_deleted_subtrees,
               no_self_referential_or_nonexistent_inherited_mergeinfo,
               XFail(subtree_merges_inherit_invalid_working_mergeinfo),
+              XFail(SkipUnless(merge_change_to_file_with_executable,
+              	               svntest.main.is_posix_os)),
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/svntest/main.py?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/svntest/main.py Tue Jan 25 17:24:01 2011
@@ -1130,6 +1130,8 @@ class TestSpawningThread(threading.Threa
       args.append('--http-library=' + options.http_library)
     if options.server_minor_version:
       args.append('--server-minor-version=' + str(options.server_minor_version))
+    if options.mode_filter:
+      args.append('--mode-filter=' + options.mode_filter)
 
     result, stdout_lines, stderr_lines = spawn_process(command, 0, 0, None,
                                                        *args)
@@ -1151,17 +1153,24 @@ class TestRunner:
     self.index = index
 
   def list(self):
-    if options.verbose and self.pred.inprogress:
-      print(" %2d     %-5s  %s [[%s]]" % (self.index,
-                                        self.pred.list_mode(),
-                                        self.pred.description,
-                                        self.pred.inprogress))
-    else:
-      print(" %2d     %-5s  %s" % (self.index,
-                                   self.pred.list_mode(),
-                                   self.pred.description))
+    if options.mode_filter.upper() == 'ALL' \
+       or options.mode_filter.upper() == self.pred.list_mode().upper() \
+       or (options.mode_filter.upper() == 'PASS' \
+           and self.pred.list_mode() == ''):
+      if options.verbose and self.pred.inprogress:
+        print(" %3d    %-5s  %s [[%s]]" % (self.index,
+                                           self.pred.list_mode(),
+                                           self.pred.description,
+                                           self.pred.inprogress))
+      else:
+        print(" %3d    %-5s  %s" % (self.index,
+                                    self.pred.list_mode(),
+                                    self.pred.description))
     sys.stdout.flush()
 
+  def get_mode(self):
+    return self.pred.list_mode()
+
   def get_function_name(self):
     return self.pred.get_function_name()
 
@@ -1276,9 +1285,15 @@ def run_one_test(n, test_list, finished_
   if n < 0:
     n += 1+num_tests
 
-  # Run the test.
-  exit_code = TestRunner(test_list[n], n).run()
-  return exit_code
+  test_mode = TestRunner(test_list[n], n).get_mode().upper()
+  if options.mode_filter.upper() == 'ALL' \
+     or options.mode_filter.upper() == test_mode \
+     or (options.mode_filter.upper() == 'PASS' and test_mode == ''):
+    # Run the test.
+    exit_code = TestRunner(test_list[n], n).run()
+    return exit_code
+  else:
+    return 0
 
 def _internal_run_tests(test_list, testnums, parallel, srcdir, progress_func):
   """Run the tests from TEST_LIST whose indices are listed in TESTNUMS.
@@ -1300,6 +1315,7 @@ def _internal_run_tests(test_list, testn
 
   if not parallel:
     for i, testnum in enumerate(testnums):
+      
       if run_one_test(testnum, test_list) == 1:
           exit_code = 1
       # signal progress
@@ -1369,6 +1385,9 @@ def _create_parser():
   parser.add_option('-c', action='store_true', dest='is_child_process',
                     help='Flag if we are running this python test as a ' +
                          'child process')
+  parser.add_option('--mode-filter', action='store', dest='mode_filter',
+                    default='ALL',
+                    help='Limit tests to those with type specified (e.g. XFAIL)')
   parser.add_option('--url', action='store',
                     help='Base url to the repos (e.g. svn://localhost)')
   parser.add_option('--fs-type', action='store',
@@ -1565,13 +1584,20 @@ def execute_tests(test_list, serial_only
     testnums = list(range(1, len(test_list)))
 
   if options.list_tests:
-    print("Test #  Mode   Test Description")
-    print("------  -----  ----------------")
+    header = "Test #  Mode   Test Description\n" \
+             "------  -----  ----------------"
+    printed_header = False
     for testnum in testnums:
-      TestRunner(test_list[testnum], testnum).list()
-
-    # done. just exit with success.
-    sys.exit(0)
+      test_mode = TestRunner(test_list[testnum], testnum).get_mode().upper()
+      if options.mode_filter.upper() == 'ALL' \
+         or options.mode_filter.upper() == test_mode \
+         or (options.mode_filter.upper() == 'PASS' and test_mode == ''):
+        if not printed_header:
+          print header
+          printed_header = True
+        TestRunner(test_list[testnum], testnum).list()
+    # We are simply listing the tests so always exit with success.
+    return 0
 
   # don't run tests in parallel when the tests don't support it or there
   # are only a few tests to run.

Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/switch_tests.py?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/switch_tests.py Tue Jan 25 17:24:01 2011
@@ -1072,7 +1072,7 @@ def relocate_beyond_repos_root(sbox):
   # A relocate that changes the repo path part of the URL shouldn't work.
   # This tests for issue #2380.
   svntest.actions.run_and_verify_svn(None, None,
-                                     ".*Invalid destination URL.*",
+                                     ".*Invalid relocation destination.*",
                                      'switch', '--relocate',
                                      A_url, other_B_url, A_wc_dir)
 

Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/dirent_uri-test.c Tue Jan 25 17:24:01 2011
@@ -36,6 +36,7 @@
 
 #include "svn_pools.h"
 #include "svn_dirent_uri.h"
+#include "private/svn_fspath.h"
 
 #include "../svn_test.h"
 

Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/subst_translate-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/subst_translate-test.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/subst_translate-test.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/subst_translate-test.c Tue Jan 25 17:24:01 2011
@@ -66,7 +66,7 @@ test_svn_subst_translate_string2(apr_poo
 
     SVN_ERR(svn_subst_translate_string2(&new_value,
                                         NULL, &translated_line_endings,
-                                        source_string, "ISO-8859-1",
+                                        source_string, "ISO-8859-1", FALSE,
                                         pool, pool));
     SVN_TEST_STRING_ASSERT(new_value->data, t->expected_str);
     SVN_TEST_ASSERT(translated_line_endings == t->translated_line_endings);
@@ -76,13 +76,42 @@ test_svn_subst_translate_string2(apr_poo
     translated_line_endings = ! t->translated_line_endings;
     SVN_ERR(svn_subst_translate_string2(&new_value, &translated_to_utf8,
                                         &translated_line_endings,
-                                        source_string, "ISO-8859-1",
+                                        source_string, "ISO-8859-1", FALSE,
                                         pool, pool));
     SVN_TEST_STRING_ASSERT(new_value->data, t->expected_str);
     SVN_TEST_ASSERT(translated_to_utf8 == t->translated_to_utf8);
     SVN_TEST_ASSERT(translated_line_endings == t->translated_line_endings);
   }
 
+  /* Test that when REPAIR is FALSE, SVN_ERR_IO_INCONSISTENT_EOL is returned. */
+    {
+      svn_string_t *source_string = svn_string_create("  \r   \r\n  \n ", pool);
+      svn_string_t *new_value = NULL;
+      svn_error_t *err = svn_subst_translate_string2(&new_value, NULL, NULL,
+                                                     source_string,
+                                                     "ISO-8859-1", FALSE, pool,
+                                                     pool);
+      SVN_TEST_ASSERT(err != SVN_NO_ERROR);
+      SVN_TEST_ASSERT(err->apr_err == SVN_ERR_IO_INCONSISTENT_EOL);
+      svn_error_clear(err);
+    }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_repairing_svn_subst_translate_string2(apr_pool_t *pool)
+{
+    {
+      svn_string_t *source_string = svn_string_create("  \r   \r\n  \n ", pool);
+      svn_string_t *new_value = NULL;
+      SVN_ERR(svn_subst_translate_string2(&new_value, NULL, NULL, source_string,
+                                          "ISO-8859-1", TRUE, pool, pool));
+      SVN_TEST_ASSERT(new_value != NULL);
+      SVN_TEST_ASSERT(new_value->data != NULL);
+      SVN_TEST_STRING_ASSERT(new_value->data, "  \n   \n  \n ");
+    }
+
   return SVN_NO_ERROR;
 }
 
@@ -142,6 +171,8 @@ struct svn_test_descriptor_t test_funcs[
     SVN_TEST_NULL,
     SVN_TEST_PASS2(test_svn_subst_translate_string2,
                    "test svn_subst_translate_string2()"),
+    SVN_TEST_PASS2(test_repairing_svn_subst_translate_string2,
+                   "test repairing svn_subst_translate_string2()"),
     SVN_TEST_PASS2(test_svn_subst_translate_cstring2,
                    "test svn_subst_translate_cstring2()"),
     SVN_TEST_NULL

Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/db-test.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/db-test.c Tue Jan 25 17:24:01 2011
@@ -329,6 +329,7 @@ create_fake_wc(const char *subdir, int f
   const char * const my_statements[] = {
     statements[STMT_CREATE_SCHEMA],
     statements[STMT_CREATE_NODES],
+    statements[STMT_CREATE_NODES_TRIGGERS],
     TESTING_DATA,
     NULL
   };

Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/entries-compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/entries-compat.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/entries-compat.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/entries-compat.c Tue Jan 25 17:24:01 2011
@@ -336,12 +336,14 @@ create_fake_wc(const char *subdir, int f
   const char * const my_statements[] = {
     statements[STMT_CREATE_SCHEMA],
     statements[STMT_CREATE_NODES],
+    statements[STMT_CREATE_NODES_TRIGGERS],
     TESTING_DATA,
     NULL
   };
   const char * const M_statements[] = {
     statements[STMT_CREATE_SCHEMA],
     statements[STMT_CREATE_NODES],
+    statements[STMT_CREATE_NODES_TRIGGERS],
     M_TESTING_DATA,
     NULL
   };

Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/svn_test.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/svn_test.h?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/svn_test.h (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/svn_test.h Tue Jan 25 17:24:01 2011
@@ -95,7 +95,8 @@ enum svn_test_mode_t
   {
     svn_test_pass,
     svn_test_xfail,
-    svn_test_skip
+    svn_test_skip,
+    svn_test_all
   };
 
 /* Each test gets a test descriptor, holding the function and other

Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/svn_test_main.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/svn_test_main.c Tue Jan 25 17:24:01 2011
@@ -68,6 +68,10 @@ static svn_boolean_t cleanup_mode = FALS
 /* Test option: Allow segfaults */
 static svn_boolean_t allow_segfaults = FALSE;
 
+/* Test option: Limit testing to a given mode (i.e. XFail, Skip,
+   Pass, All). */
+enum svn_test_mode_t mode_filter = svn_test_all;
+
 /* Option parsing enums and structures */
 enum {
   cleanup_opt = SVN_OPT_FIRST_LONGOPT_ID,
@@ -78,7 +82,9 @@ enum {
   quiet_opt,
   config_opt,
   server_minor_version_opt,
-  allow_segfault_opt
+  allow_segfault_opt,
+  srcdir_opt,
+  mode_filter_opt
 };
 
 static const apr_getopt_option_t cl_options[] =
@@ -91,6 +97,9 @@ static const apr_getopt_option_t cl_opti
                     N_("specify a filesystem backend type ARG")},
   {"list",          list_opt, 0,
                     N_("lists all the tests with their short description")},
+  {"mode-filter",   mode_filter_opt, 1,
+                    N_("only run/list tests with expected mode ARG = PASS, "
+                       "XFAIL, SKIP, or ALL (default)\n")},
   {"verbose",       verbose_opt, 0,
                     N_("print extra information")},
   {"server-minor-version", server_minor_version_opt, 1,
@@ -102,6 +111,8 @@ static const apr_getopt_option_t cl_opti
                     N_("print only unexpected results")},
   {"allow-segfaults", allow_segfault_opt, 0,
                     N_("don't trap seg faults (useful for debugging)")},
+  {"srcdir",        srcdir_opt, 1,
+                    N_("source directory")},
   {0,               0, 0, 0}
 };
 
@@ -196,12 +207,15 @@ crash_handler(int signum)
 
 
 /* Execute a test number TEST_NUM.  Pretty-print test name and dots
-   according to our test-suite spec, and return the result code. */
+   according to our test-suite spec, and return the result code.
+   If HEADER_MSG and *HEADER_MSG are not NULL, print *HEADER_MSG prior
+   to pretty-printing the test information, then set *HEADER_MSG to NULL. */
 static svn_boolean_t
 do_test_num(const char *progname,
             int test_num,
             svn_boolean_t msg_only,
             svn_test_opts_t *opts,
+            const char **header_msg,
             apr_pool_t *pool)
 {
   svn_boolean_t skip, xfail, wimp;
@@ -210,12 +224,15 @@ do_test_num(const char *progname,
   const char *msg = NULL;  /* the message this individual test prints out */
   const struct svn_test_descriptor_t *desc;
   const int array_size = get_array_size();
+  svn_boolean_t run_this_test; /* This test's mode matches DESC->MODE. */
 
   /* Check our array bounds! */
   if (test_num < 0)
     test_num += array_size + 1;
   if ((test_num > array_size) || (test_num <= 0))
     {
+      if (header_msg && *header_msg)
+        printf(*header_msg);
       printf("FAIL: %s: THERE IS NO TEST NUMBER %2d\n", progname, test_num);
       skip_cleanup = TRUE;
       return TRUE;  /* BAIL, this test number doesn't exist. */
@@ -226,6 +243,13 @@ do_test_num(const char *progname,
   xfail = desc->mode == svn_test_xfail;
   wimp = xfail && desc->wip;
   msg = desc->msg;
+  run_this_test = mode_filter == svn_test_all || mode_filter == desc->mode;
+
+  if (run_this_test && header_msg && *header_msg)
+    {
+      printf(*header_msg);
+      *header_msg = NULL;
+    }
 
   if (!allow_segfaults)
     {
@@ -242,7 +266,7 @@ do_test_num(const char *progname,
   if (setjmp(jump_buffer) == 0)
     {
       /* Do test */
-      if (msg_only || skip)
+      if (msg_only || skip || !run_this_test)
         ; /* pass */
       else if (desc->func2)
         err = (*desc->func2)(pool);
@@ -279,15 +303,16 @@ do_test_num(const char *progname,
 
   if (msg_only)
     {
-      printf(" %2d     %-5s  %s%s%s%s\n",
-             test_num,
-             (xfail ? "XFAIL" : (skip ? "SKIP" : "")),
-             msg ? msg : "(test did not provide name)",
-             (wimp && verbose_mode) ? " [[" : "",
-             (wimp && verbose_mode) ? desc->wip : "",
-             (wimp && verbose_mode) ? "]]" : "");
+      if (run_this_test)
+        printf(" %3d    %-5s  %s%s%s%s\n",
+               test_num,
+               (xfail ? "XFAIL" : (skip ? "SKIP" : "")),
+               msg ? msg : "(test did not provide name)",
+               (wimp && verbose_mode) ? " [[" : "",
+               (wimp && verbose_mode) ? desc->wip : "",
+               (wimp && verbose_mode) ? "]]" : "");
     }
-  else if ((! quiet_mode) || test_failed)
+  else if (run_this_test && ((! quiet_mode) || test_failed))
     {
       printf("%s %s %d: %s%s%s%s\n",
              (err
@@ -404,6 +429,22 @@ main(int argc, const char *argv[])
         case list_opt:
           list_mode = TRUE;
           break;
+        case mode_filter_opt:
+          if (svn_cstring_casecmp(opt_arg, "PASS") == 0)
+            mode_filter = svn_test_pass;
+          else if (svn_cstring_casecmp(opt_arg, "XFAIL") == 0)
+            mode_filter = svn_test_xfail;
+          else if (svn_cstring_casecmp(opt_arg, "SKIP") == 0)
+            mode_filter = svn_test_skip;
+          else if (svn_cstring_casecmp(opt_arg, "ALL") == 0)
+            mode_filter = svn_test_all;
+          else
+            {
+              fprintf(stderr, "FAIL: Invalid --mode-filter option.  Try ");
+              fprintf(stderr, " PASS, XFAIL, SKIP or ALL.\n");
+              exit(1);
+            }
+          break;
         case verbose_opt:
           verbose_mode = TRUE;
           break;
@@ -453,15 +494,16 @@ main(int argc, const char *argv[])
     {
       if (! strcmp(argv[1], "list") || list_mode)
         {
+          const char *header_msg;
           ran_a_test = TRUE;
 
           /* run all tests with MSG_ONLY set to TRUE */
-
-          printf("Test #  Mode   Test Description\n"
-                 "------  -----  ----------------\n");
+          header_msg = "Test #  Mode   Test Description\n"
+                       "------  -----  ----------------\n";
           for (i = 1; i <= array_size; i++)
             {
-              if (do_test_num(prog_name, i, TRUE, &opts, test_pool))
+              if (do_test_num(prog_name, i, TRUE, &opts, &header_msg,
+                              test_pool))
                 got_error = TRUE;
 
               /* Clear the per-function pool */
@@ -481,7 +523,8 @@ main(int argc, const char *argv[])
                     continue;
 
                   ran_a_test = TRUE;
-                  if (do_test_num(prog_name, test_num, FALSE, &opts, test_pool))
+                  if (do_test_num(prog_name, test_num, FALSE, &opts, NULL,
+                                  test_pool))
                     got_error = TRUE;
 
                   /* Clear the per-function pool */
@@ -497,7 +540,7 @@ main(int argc, const char *argv[])
       /* just run all tests */
       for (i = 1; i <= array_size; i++)
         {
-          if (do_test_num(prog_name, i, FALSE, &opts, test_pool))
+          if (do_test_num(prog_name, i, FALSE, &opts, NULL, test_pool))
             got_error = TRUE;
 
           /* Clear the per-function pool */

Modified: subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svnbuild.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svnbuild.sh?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svnbuild.sh (original)
+++ subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svnbuild.sh Tue Jan 25 17:24:01 2011
@@ -19,6 +19,7 @@
 #
 #
 
+set -e
 set -x
 
 branch="$(basename $(svn info . | grep ^URL  | cut -d' ' -f2))"

Modified: subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svncheck-bindings.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svncheck-bindings.sh?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svncheck-bindings.sh (original)
+++ subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svncheck-bindings.sh Tue Jan 25 17:24:01 2011
@@ -19,6 +19,7 @@
 #
 #
 
+set -e
 set -x
 
 branch="$(basename $(svn info . | grep ^URL  | cut -d' ' -f2))"

Modified: subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svncheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svncheck.sh?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svncheck.sh (original)
+++ subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svncheck.sh Tue Jan 25 17:24:01 2011
@@ -19,6 +19,7 @@
 #
 #
 
+set -e
 set -x
 
 branch="$(basename $(svn info . | grep ^URL  | cut -d' ' -f2))"

Modified: subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svnclean.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svnclean.sh?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svnclean.sh (original)
+++ subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svnclean.sh Tue Jan 25 17:24:01 2011
@@ -19,6 +19,7 @@
 #
 #
 
+set -e
 set -x
 
 branch="$(basename $(svn info . | grep ^URL  | cut -d' ' -f2))"
@@ -26,5 +27,6 @@ branch="$(basename $(svn info . | grep ^
 for i in 3 4 5 6 7; do
   (test -h ../svn-1.${i}.x || ln -s build ../svn-1.${i}.x)
 done
+svn update ../../unix-build
 (test -h ../GNUmakefile || ln -s ../unix-build/Makefile.svn ../GNUmakefile)
 (cd .. && gmake BRANCH="$branch" reset clean)

Modified: subversion/branches/ignore-mergeinfo-log/tools/client-side/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/tools/client-side/svnmucc/svnmucc.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/tools/client-side/svnmucc/svnmucc.c (original)
+++ subversion/branches/ignore-mergeinfo-log/tools/client-side/svnmucc/svnmucc.c Tue Jan 25 17:24:01 2011
@@ -365,7 +365,7 @@ subtract_anchor(const char *anchor, cons
   if (! strcmp(url, anchor))
     return "";
   else
-    return svn_path_uri_decode(svn_path_is_child(anchor, url, pool), pool);
+    return svn_path_uri_decode(svn_uri_is_child(anchor, url, pool), pool);
 }
 
 /* Add PATH to the operations tree rooted at OPERATION, creating any

Modified: subversion/branches/ignore-mergeinfo-log/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/tools/dev/unix-build/Makefile.svn?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/ignore-mergeinfo-log/tools/dev/unix-build/Makefile.svn Tue Jan 25 17:24:01 2011
@@ -2,6 +2,11 @@
 #
 # WARNING: This may or may not work on your system. This Makefile is
 # an example, rather than a ready-made universal solution.
+#
+# Note to Subversion committers:
+# This Makefile is used by the svn-openbsd-i386 buildbot
+# (http://ci.apache.org/builders/svn-openbsd-i386).
+# Please check the bot's health after making changes to this file.
 
 ENABLE_PYTHON_BINDINGS ?= yes
 ENABLE_RUBY_BINDINGS ?= yes
@@ -1050,7 +1055,8 @@ SVNSERVE_START_CMD = $(SVN_PREFIX)/bin/s
 			--listen-host 127.0.0.1 \
 			--pid-file $(PWD)/svnserve-$(WC).pid \
 			-d -r $(svn_builddir)/subversion/tests/cmdline
-SVNSERVE_STOP_CMD = kill `cat $(PWD)/svnserve-$(WC).pid`
+SVNSERVE_STOP_CMD = kill `cat $(PWD)/svnserve-$(WC).pid`; sleep 3; \
+			rm -f $(PWD)/svnserve-$(WC).pid
 
 start-httpd: httpd-conf
 	$(HTTPD_START_CMD)
@@ -1063,6 +1069,10 @@ stop-httpd:
 	$(HTTPD_STOP_CMD)
 
 start-svnserve: $(SVN_OBJDIR)/.compiled
+	-ls $(PWD)/svnserve-*.pid | while read pidfile; do \
+		kill `cat "$$pidfile"`; sleep 3; \
+		rm -f $$pidfile; \
+	done
 	$(SVNSERVE_START_CMD)
 
 stop-svnserve:

Modified: subversion/branches/ignore-mergeinfo-log/tools/po/l10n-report.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/tools/po/l10n-report.py?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/tools/po/l10n-report.py (original)
+++ subversion/branches/ignore-mergeinfo-log/tools/po/l10n-report.py Tue Jan 25 17:24:01 2011
@@ -40,7 +40,9 @@ import os
 import re
 import subprocess
 
+FROM_ADDRESS = "Subversion Translation Status <no...@subversion.apache.org>"
 LIST_ADDRESS = "dev@subversion.apache.org"
+SUBJECT_TEMPLATE = "[l10n] Translation status report for %s r%s"
 
 def _rev():
   dollar = "$Revision$"
@@ -78,6 +80,8 @@ class l10nReport:
         return stdout, stderr
 
     def match(self, pattern, string):
+        if isinstance(pattern, basestring):
+            pattern = re.compile(pattern)
         match = re.compile(pattern).search(string)
         if match and match.groups():
             return match.group(1)
@@ -162,20 +166,21 @@ def main():
         sys.stderr.flush()
         sys.exit(0)
 
-    wc_version = re.sub('[MS]', '', info_out)
+    wc_version = re.sub('[MS]', '', info_out.strip())
     title = "Translation status report for %s@r%s" % \
                (branch_name, wc_version)
 
     os.chdir(po_dir)
     files = sorted(os.listdir('.'))
-    format_head = "%6s %7s %7s %7s %7s" % ("lang", "trans", "untrans",
+    format_head = "\n%6s %7s %7s %7s %7s" % ("lang", "trans", "untrans",
                    "fuzzy", "obs")
     format_line = "--------------------------------------"
     print("\n%s\n%s\n%s" % (title, format_head, format_line))
 
     body = ""
+    po_pattern = re.compile('(.*).po$')
     for file in files:
-        lang = l10n.match('(.*).po$', file)
+        lang = l10n.match(po_pattern, file)
         if not lang:
             continue
         [trans, untrans, fuzzy, obsolete]  = l10n.get_msgattribs(file)
@@ -186,25 +191,28 @@ def main():
 
     if to_email_id:
         import smtplib
+        # Ensure compatibility of the email module all the way to Python 2.3
+        try:
+            from email.message import Message
+        except ImportError:
+            from email.Message import Message
+
+        msg = Message()
+        msg["From"] = FROM_ADDRESS
+        msg["To"] = to_email_id
+        msg["Subject"] = SUBJECT_TEMPLATE % (branch_name, wc_version)
+        msg["X-Mailer"] = "l10n-report.py r%s" % _rev()
+        msg["Reply-To"] = LIST_ADDRESS
+        msg["Mail-Followup-To"] = LIST_ADDRESS
+        # http://www.iana.org/assignments/auto-submitted-keywords/auto-submitted-keywords.xhtml
+        msg["Auto-Submitted"] = 'auto-generated'
+        msg.set_type("text/plain")
+        msg.set_payload("\n".join((title, format_head, format_line, body)))
 
         server = smtplib.SMTP('localhost')
-        email_from = "From: Subversion Translation Status <no...@subversion.apache.org>"
-        email_to = "To: %s" % to_email_id
-        email_sub = "Subject: [l10n] Translation status report for %s r%s" \
-                     % (branch_name, wc_version)
-        x_headers = "\n".join([
-          "X-Mailer: l10n-report.py r%ld" % _rev(),
-          "Reply-To: %s" % LIST_ADDRESS,
-          "Mail-Followup-To: %s" % LIST_ADDRESS,
-          # http://www.iana.org/assignments/auto-submitted-keywords/auto-submitted-keywords.xhtml
-          "Auto-Submitted: auto-generated",
-        ]);
-
-        msg = "\n".join((email_from, email_to, email_sub, x_headers,
-                        "", # blank line at end of headers
-                        title, format_head, format_line, body))
-
-        server.sendmail(email_from, email_to, msg)
+        server.sendmail("From: " + FROM_ADDRESS,
+                        "To: " + to_email_id,
+                        msg.as_string())
         print("The report is sent to '%s' email id." % to_email_id)
     else:
         print("\nYou have not passed '-m' option, so email is not sent.")