Author: cmpilato
Date: Thu Oct 11 14:02:54 2012
New Revision: 1397061

URL: http://svn.apache.org/viewvc?rev=1397061&view=rev
Log:
Sync the 'http-dynamic-prop-namespaces' branch with recent trunk changes.
(Merged /subversion/trunk:r1396196-1397054.)

Added:
    
subversion/branches/http-dynamic-prop-namespaces/tools/hook-scripts/persist-ephemeral-txnprops.py
      - copied unchanged from r1397054, 
subversion/trunk/tools/hook-scripts/persist-ephemeral-txnprops.py
Modified:
    subversion/branches/http-dynamic-prop-namespaces/   (props changed)
    
subversion/branches/http-dynamic-prop-namespaces/subversion/include/svn_props.h
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/cleanup.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/merge.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_fs_fs/tree.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/ra_serf.h
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/gpg_agent.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/path.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/sysinfo.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/win32_crypto.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/conflicts.c
    subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/copy.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/entries.c
    subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/info.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/tree_conflicts.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/upgrade.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/wc-metadata.sql
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/wc.h
    subversion/branches/http-dynamic-prop-namespaces/subversion/svn/file-merge.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/svn/propedit-cmd.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/tests/cmdline/svnlook_tests.py
    
subversion/branches/http-dynamic-prop-namespaces/subversion/tests/libsvn_wc/wc-queries-test.c

Propchange: subversion/branches/http-dynamic-prop-namespaces/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1396196-1397054

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/svn_props.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/include/svn_props.h?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/svn_props.h 
(original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/svn_props.h 
Thu Oct 11 14:02:54 2012
@@ -568,7 +568,7 @@ svn_prop_name_is_valid(const char *prop_
  */
 
 /** The prefix used for all (ephemeral) transaction properties. */
-#define SVN_PROP_TXN_PREFIX  SVN_PROP_PREFIX "txn:"
+#define SVN_PROP_TXN_PREFIX  SVN_PROP_PREFIX "txn-"
 
 /** Identifies the client version compability level.  For clients
  * compiled against Subversion libraries, this is @c SVN_VER_NUMBER.

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/cleanup.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/cleanup.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/cleanup.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/cleanup.c
 Thu Oct 11 14:02:54 2012
@@ -144,8 +144,9 @@ svn_client_upgrade(const char *path,
      upgrade to avoid that errors in the externals causes the wc upgrade to
      fail. Thanks to caching the performance penalty of walking the wc a
      second time shouldn't be too severe */
-  SVN_ERR(svn_client_propget4(&externals, SVN_PROP_EXTERNALS, local_abspath,
-                              &rev, &rev, NULL, svn_depth_infinity, NULL, ctx,
+  SVN_ERR(svn_client_propget5(&externals, NULL, SVN_PROP_EXTERNALS,
+                              local_abspath, &rev, &rev, NULL,
+                              svn_depth_infinity, NULL, ctx,
                               scratch_pool, scratch_pool));
 
   iterpool = svn_pool_create(scratch_pool);

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/merge.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/merge.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/merge.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/merge.c
 Thu Oct 11 14:02:54 2012
@@ -5733,10 +5733,10 @@ get_wc_explicit_mergeinfo_catalog(apr_ha
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   apr_hash_index_t *hi;
 
-  SVN_ERR(svn_client_propget4(subtrees_with_mergeinfo, SVN_PROP_MERGEINFO,
-                              target_abspath, &working_revision,
-                              &working_revision, NULL, depth, NULL,
-                              ctx, result_pool, scratch_pool));
+  SVN_ERR(svn_client_propget5(subtrees_with_mergeinfo, NULL,
+                              SVN_PROP_MERGEINFO, target_abspath,
+                              &working_revision, &working_revision, NULL,
+                              depth, NULL, ctx, result_pool, scratch_pool));
 
   /* Convert property values to svn_mergeinfo_t. */
   for (hi = apr_hash_first(scratch_pool, *subtrees_with_mergeinfo);

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_fs_fs/tree.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_fs_fs/tree.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_fs_fs/tree.c 
(original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_fs_fs/tree.c 
Thu Oct 11 14:02:54 2012
@@ -148,7 +148,7 @@ typedef struct cache_entry_t
 {
   /* hash value derived from PATH, REVISION.
      Used to short-circuit failed lookups. */
-  apr_uint32_t hash_value;
+  apr_uint64_t hash_value;
 
   /* revision to which the NODE belongs */
   svn_revnum_t revision;
@@ -337,7 +337,7 @@ cache_lookup( fs_fs_dag_cache_t *cache
 {
   apr_size_t i, bucket_index;
   apr_size_t path_len = strlen(path);
-  apr_uint32_t hash_value = revision;
+  apr_uint64_t hash_value = revision;
 
   /* optimistic lookup: hit the same bucket again? */
   cache_entry_t *result = &cache->buckets[cache->last_hit];

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/ra_serf.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/ra_serf.h?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/ra_serf.h
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/ra_serf.h
 Thu Oct 11 14:02:54 2012
@@ -979,12 +979,15 @@ svn_ra_serf__add_xml_header_buckets(serf
                                     serf_bucket_alloc_t *bkt_alloc);
 
 /*
- * Add the appropriate serf buckets to AGG_BUCKET representing xml tag open
- * with name TAG.
+ * Add the appropriate serf buckets to AGG_BUCKET representing the XML
+ * open tag with name TAG.
  *
  * Take the tag's attributes from varargs, a NULL-terminated list of
- * alternating <tt>char *</tt> key and <tt>char *</tt> val.  Do xml-escaping
- * on each val. Attribute will be ignored if it's value is NULL.
+ * alternating <tt>char *</tt> key and <tt>char *</tt> val.  Attribute
+ * will be ignored if it's value is NULL.
+ *
+ * NOTE: Callers are responsible for XML-escaping attribute values as
+ * necessary.
  *
  * The bucket will be allocated from BKT_ALLOC.
  */

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/gpg_agent.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/gpg_agent.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/gpg_agent.c
 Thu Oct 11 14:02:54 2012
@@ -107,7 +107,7 @@ static svn_boolean_t
 receive_from_gpg_agent(int sd, char *buf, size_t n)
 {
   int i = 0;
-  int recvd;
+  size_t recvd;
   char c;
 
   /* Clear existing buffer content before reading response. */
@@ -326,7 +326,6 @@ password_get_gpg_agent(svn_boolean_t *do
   display = getenv("DISPLAY");
   if (display != NULL)
     {
-      request = apr_psprintf(pool, "OPTION display=%s\n", display);
       if (!send_option(sd, buffer, BUFFER_SIZE, "display", display, pool))
         {
           close(sd);

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/path.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/path.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/path.c 
(original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/path.c 
Thu Oct 11 14:02:54 2012
@@ -1100,7 +1100,7 @@ svn_path_get_absolute(const char **pabso
 }
 
 
-
+#if !defined(WIN32) && !defined(DARWIN)
 /** Get APR's internal path encoding. */
 static svn_error_t *
 get_path_encoding(svn_boolean_t *path_is_utf8, apr_pool_t *pool)
@@ -1119,6 +1119,7 @@ get_path_encoding(svn_boolean_t *path_is
   *path_is_utf8 = (encoding_style == APR_FILEPATH_ENCODING_UTF8);
   return SVN_NO_ERROR;
 }
+#endif
 
 
 svn_error_t *

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/sysinfo.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/sysinfo.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/sysinfo.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/sysinfo.c
 Thu Oct 11 14:02:54 2012
@@ -1049,9 +1049,9 @@ macos_shared_libs(apr_pool_t *pool)
   static const char fwk_prefix[] = "/System/Library/Frameworks/";
   static const char pfk_prefix[] = "/System/Library/PrivateFrameworks/";
 
-  const int slb_prefix_len = strlen(slb_prefix);
-  const int fwk_prefix_len = strlen(fwk_prefix);
-  const int pfk_prefix_len = strlen(pfk_prefix);
+  const size_t slb_prefix_len = strlen(slb_prefix);
+  const size_t fwk_prefix_len = strlen(fwk_prefix);
+  const size_t pfk_prefix_len = strlen(pfk_prefix);
 
   apr_array_header_t *result = NULL;
   apr_array_header_t *dylibs = NULL;

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/win32_crypto.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/win32_crypto.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/win32_crypto.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/win32_crypto.c
 Thu Oct 11 14:02:54 2012
@@ -145,7 +145,7 @@ windows_password_decrypter(svn_boolean_t
 
   SVN_ERR(svn_auth__simple_password_get(done, &in, creds, realmstring, 
username,
                                         parameters, non_interactive, pool));
-  if (!done)
+  if (!*done)
     return SVN_NO_ERROR;
 
   orig = svn_base64_decode_string(svn_string_create(in, pool), pool);
@@ -270,7 +270,7 @@ windows_ssl_client_cert_pw_decrypter(svn
   SVN_ERR(svn_auth__ssl_client_cert_pw_get(done, &in, creds, realmstring,
                                            username, parameters,
                                            non_interactive, pool));
-  if (!done)
+  if (!*done)
     return SVN_NO_ERROR;
 
   orig = svn_base64_decode_string(svn_string_create(in, pool), pool);

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/conflicts.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/conflicts.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/conflicts.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/conflicts.c
 Thu Oct 11 14:02:54 2012
@@ -1912,13 +1912,19 @@ svn_wc__conflict_invoke_resolver(svn_wc_
 
 /* Read all property conflicts contained in CONFLICT_SKEL into
  * individual conflict descriptions, and append those descriptions
- * to the CONFLICTS array. Allocate results in RESULT_POOL.
- * SCRATCH_POOL is used for temporary allocations. */
+ * to the CONFLICTS array.
+ *
+ * If NOT create_tempfiles, always create a legacy property conflict
+ * descriptor.
+ *
+ * Allocate results in RESULT_POOL. SCRATCH_POOL is used for temporary
+ * allocations. */
 static svn_error_t *
 read_prop_conflicts(apr_array_header_t *conflicts,
                     svn_wc__db_t *db,
                     const char *local_abspath,
                     svn_skel_t *conflict_skel,
+                    svn_boolean_t create_tempfiles,
                     apr_pool_t *result_pool,
                     apr_pool_t *scratch_pool)
 {
@@ -1939,7 +1945,7 @@ read_prop_conflicts(apr_array_header_t *
                                               conflict_skel,
                                               scratch_pool, scratch_pool));
 
-  if (apr_hash_count(conflicted_props) == 0)
+  if ((! create_tempfiles) || apr_hash_count(conflicted_props) == 0)
     {
       /* Legacy prop conflict with only a .reject file. */
       svn_wc_conflict_description2_t *desc;
@@ -2061,6 +2067,7 @@ svn_error_t *
 svn_wc__read_conflicts(const apr_array_header_t **conflicts,
                        svn_wc__db_t *db,
                        const char *local_abspath,
+                       svn_boolean_t create_tempfiles,
                        apr_pool_t *result_pool,
                        apr_pool_t *scratch_pool)
 {
@@ -2093,6 +2100,7 @@ svn_wc__read_conflicts(const apr_array_h
 
   if (prop_conflicted)
     SVN_ERR(read_prop_conflicts(cflcts, db, local_abspath, conflict_skel,
+                                create_tempfiles,
                                 result_pool, scratch_pool));
 
   if (text_conflicted)
@@ -2575,7 +2583,7 @@ conflict_status_walker(void *baton,
 
   iterpool = svn_pool_create(scratch_pool);
 
-  SVN_ERR(svn_wc__read_conflicts(&conflicts, db, local_abspath,
+  SVN_ERR(svn_wc__read_conflicts(&conflicts, db, local_abspath, TRUE,
                                  scratch_pool, iterpool));
 
   for (i = 0; i < conflicts->nelts; i++)

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/copy.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/copy.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/copy.c 
(original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/copy.c 
Thu Oct 11 14:02:54 2012
@@ -36,6 +36,7 @@
 #include "wc.h"
 #include "workqueue.h"
 #include "props.h"
+#include "conflicts.h"
 
 #include "svn_private_config.h"
 #include "private/svn_wc_private.h"
@@ -206,7 +207,6 @@ copy_versioned_file(svn_wc__db_t *db,
   if (!metadata_only)
     {
       const char *my_src_abspath = NULL;
-      int i;
       svn_boolean_t handle_as_unversioned = FALSE;
 
       /* By default, take the copy source as given. */
@@ -214,26 +214,27 @@ copy_versioned_file(svn_wc__db_t *db,
 
       if (conflicted)
         {
-          const apr_array_header_t *conflicts;
-          const char *conflict_working = NULL;
+          svn_skel_t *conflict;
+          const char *conflict_working;
+          svn_error_t *err;
 
           /* Is there a text conflict at the source path? */
-          SVN_ERR(svn_wc__read_conflicts(&conflicts, db, src_abspath,
+          SVN_ERR(svn_wc__db_read_conflict(&conflict, db, src_abspath,
                                          scratch_pool, scratch_pool));
 
-          for (i = 0; i < conflicts->nelts; i++)
-            {
-              const svn_wc_conflict_description2_t *desc;
-
-              desc = APR_ARRAY_IDX(conflicts, i,
-                                   const svn_wc_conflict_description2_t*);
+          err = svn_wc__conflict_read_text_conflict(&conflict_working, NULL, 
NULL,
+                                                    db, src_abspath, conflict,
+                                                    scratch_pool,
+                                                    scratch_pool);
 
-              if (desc->kind == svn_wc_conflict_kind_text)
-                {
-                  conflict_working = desc->my_abspath;
-                  break;
-                }
+          if (err && err->apr_err == SVN_ERR_WC_MISSING)
+            {
+              /* not text conflicted */
+              svn_error_clear(err);
+              conflict_working = NULL;
             }
+          else
+            SVN_ERR(err);
 
           if (conflict_working)
             {
@@ -816,75 +817,40 @@ remove_node_conflict_markers(svn_wc__db_
                              const char *node_abspath,
                              apr_pool_t *scratch_pool)
 {
-  const apr_array_header_t *conflicts;
+  svn_skel_t *conflict;
 
-  SVN_ERR(svn_wc__read_conflicts(&conflicts, db, src_abspath,
+  SVN_ERR(svn_wc__db_read_conflict(&conflict, db, src_abspath,
                                  scratch_pool, scratch_pool));
 
   /* Do we have conflict markers that should be removed? */
-  if (conflicts != NULL)
+  if (conflict != NULL)
     {
+      const apr_array_header_t *markers;
       int i;
       const char *src_dir = svn_dirent_dirname(src_abspath, scratch_pool);
       const char *dst_dir = svn_dirent_dirname(node_abspath, scratch_pool);
 
-      /* No iterpool: Maximum number of possible conflict markers is 4 */
+      SVN_ERR(svn_wc__conflict_read_markers(&markers, db, src_abspath,
+                                            conflict,
+                                            scratch_pool, scratch_pool));
 
-      for (i = 0; i < conflicts->nelts; i++)
+      /* No iterpool: Maximum number of possible conflict markers is 4 */
+      for (i = 0; markers && (i < markers->nelts); i++)
         {
-          const svn_wc_conflict_description2_t *desc;
+          const char *marker_abspath;
           const char *child_relpath;
           const char *child_abpath;
 
-          desc = APR_ARRAY_IDX(conflicts, i,
-                               const svn_wc_conflict_description2_t*);
+          marker_abspath = APR_ARRAY_IDX(markers, i, const char *);
 
-          if (desc->kind != svn_wc_conflict_kind_text
-              && desc->kind != svn_wc_conflict_kind_property)
-            continue;
+          child_relpath = svn_dirent_is_child(src_dir, marker_abspath, NULL);
 
-          if (desc->base_abspath != NULL)
+          if (child_relpath)
             {
-              child_relpath = svn_dirent_is_child(src_dir, desc->base_abspath,
-                                                  NULL);
+              child_abpath = svn_dirent_join(dst_dir, child_relpath,
+                                             scratch_pool);
 
-              if (child_relpath)
-                {
-                  child_abpath = svn_dirent_join(dst_dir, child_relpath,
-                                                 scratch_pool);
-
-                  SVN_ERR(svn_io_remove_file2(child_abpath, TRUE,
-                                              scratch_pool));
-                }
-            }
-          if (desc->their_abspath != NULL)
-            {
-              child_relpath = svn_dirent_is_child(src_dir, desc->their_abspath,
-                                                  NULL);
-
-              if (child_relpath)
-                {
-                  child_abpath = svn_dirent_join(dst_dir, child_relpath,
-                                                 scratch_pool);
-
-                  SVN_ERR(svn_io_remove_file2(child_abpath, TRUE,
-                                              scratch_pool));
-                }
-            }
-          if (desc->my_abspath != NULL)
-            {
-              child_relpath = svn_dirent_is_child(src_dir, desc->my_abspath,
-                                                  NULL);
-
-              if (child_relpath)
-                {
-                  child_abpath = svn_dirent_join(dst_dir, child_relpath,
-                                                 scratch_pool);
-
-                  /* ### Copy child_abspath to node_abspath if it exists? */
-                  SVN_ERR(svn_io_remove_file2(child_abpath, TRUE,
-                                              scratch_pool));
-                }
+              SVN_ERR(svn_io_remove_file2(child_abpath, TRUE, scratch_pool));
             }
         }
     }

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/entries.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/entries.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/entries.c 
(original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/entries.c 
Thu Oct 11 14:02:54 2012
@@ -455,6 +455,7 @@ read_one_entry(const svn_wc_entry_t **ne
 
           SVN_ERR(svn_wc__read_conflicts(&child_conflicts,
                                          db, child_abspath,
+                                         FALSE /* create tempfiles */,
                                          scratch_pool, scratch_pool));
 
           for (j = 0; j < child_conflicts->nelts; j++)
@@ -874,37 +875,53 @@ read_one_entry(const svn_wc_entry_t **ne
 
   if (conflicted)
     {
-      const apr_array_header_t *conflicts;
-      int j;
-      SVN_ERR(svn_wc__read_conflicts(&conflicts, db, entry_abspath,
-                                     scratch_pool, scratch_pool));
-
-      for (j = 0; j < conflicts->nelts; j++)
-        {
-          const svn_wc_conflict_description2_t *cd;
-          cd = APR_ARRAY_IDX(conflicts, j,
-                             const svn_wc_conflict_description2_t *);
+      svn_skel_t *conflict;
+      svn_boolean_t text_conflicted;
+      svn_boolean_t prop_conflicted;
+      SVN_ERR(svn_wc__db_read_conflict(&conflict, db, entry_abspath,
+                                       scratch_pool, scratch_pool));
 
-          switch (cd->kind)
-            {
-            case svn_wc_conflict_kind_text:
-              if (cd->base_abspath)
-                entry->conflict_old = svn_dirent_basename(cd->base_abspath,
-                                                          result_pool);
-              if (cd->their_abspath)
-                entry->conflict_new = svn_dirent_basename(cd->their_abspath,
-                                                          result_pool);
-              if (cd->my_abspath)
-                entry->conflict_wrk = svn_dirent_basename(cd->my_abspath,
-                                                          result_pool);
-              break;
-            case svn_wc_conflict_kind_property:
-              entry->prejfile = svn_dirent_basename(cd->their_abspath,
-                                                    result_pool);
-              break;
-            case svn_wc_conflict_kind_tree:
-              break;
-            }
+      SVN_ERR(svn_wc__conflict_read_info(NULL, NULL, &text_conflicted,
+                                         &prop_conflicted, NULL,
+                                         db, dir_abspath, conflict,
+                                         scratch_pool, scratch_pool));
+
+      if (text_conflicted)
+        {
+          const char *my_abspath;
+          const char *their_old_abspath;
+          const char *their_abspath;
+          SVN_ERR(svn_wc__conflict_read_text_conflict(&my_abspath,
+                                                      &their_old_abspath,
+                                                      &their_abspath,
+                                                      db, dir_abspath,
+                                                      conflict, scratch_pool,
+                                                      scratch_pool));
+
+          if (my_abspath)
+            entry->conflict_wrk = svn_dirent_basename(my_abspath, result_pool);
+
+          if (their_old_abspath)
+            entry->conflict_old = svn_dirent_basename(their_old_abspath,
+                                                      result_pool);
+
+          if (their_abspath)
+            entry->conflict_new = svn_dirent_basename(their_abspath,
+                                                      result_pool);
+        }
+
+      if (prop_conflicted)
+        {
+          const char *prej_abspath;
+
+          SVN_ERR(svn_wc__conflict_read_prop_conflict(&prej_abspath, NULL,
+                                                      NULL, NULL, NULL,
+                                                      db, dir_abspath,
+                                                      conflict, scratch_pool,
+                                                      scratch_pool));
+
+          if (prej_abspath)
+            entry->prejfile = svn_dirent_basename(prej_abspath, result_pool);
         }
     }
 

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/info.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/info.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/info.c 
(original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/info.c 
Thu Oct 11 14:02:54 2012
@@ -281,6 +281,7 @@ build_info_for_node(svn_wc__info2_t **in
   if (conflicted)
     SVN_ERR(svn_wc__read_conflicts(&wc_info->conflicts, db,
                                    local_abspath,
+                                   TRUE /* ### create tempfiles */,
                                    result_pool, scratch_pool));
   else
     wc_info->conflicts = NULL;
@@ -526,6 +527,7 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
 
       SVN_ERR(svn_wc__read_conflicts(&info->wc_info->conflicts,
                                      wc_ctx->db, this_abspath,
+                                     TRUE /* ### create tempfiles */,
                                      iterpool, iterpool));
 
       if (! info->wc_info->conflicts || ! info->wc_info->conflicts->nelts)

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/tree_conflicts.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/tree_conflicts.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/tree_conflicts.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/tree_conflicts.c
 Thu Oct 11 14:02:54 2012
@@ -472,7 +472,7 @@ svn_wc__get_tree_conflict(const svn_wc_c
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
   SVN_ERR(svn_wc__read_conflicts(&conflicts,
-                                 wc_ctx->db, local_abspath,
+                                 wc_ctx->db, local_abspath, FALSE,
                                  scratch_pool, scratch_pool));
 
   if (!conflicts || conflicts->nelts == 0)

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/upgrade.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/upgrade.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/upgrade.c 
(original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/upgrade.c 
Thu Oct 11 14:02:54 2012
@@ -1577,7 +1577,7 @@ bump_to_31(void *baton,
      switched subtrees in the WC.  This allows subsequent updates
      to recognize these roots as needing an iprops cache. */
   SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
-                                    STMT_SELECT_WCROOT_NODES));
+                                    STMT_UPGRADE_31_SELECT_WCROOT_NODES));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
 
   SVN_ERR(svn_sqlite__get_statement(&stmt_mark_switch_roots, sdb,

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/wc-metadata.sql
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/wc-metadata.sql?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/wc-metadata.sql
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/wc-metadata.sql
 Thu Oct 11 14:02:54 2012
@@ -795,12 +795,6 @@ UPDATE nodes SET presence = "server-excl
    working copies that were never updated by 1.7.0+ style clients */
 UPDATE nodes SET file_external=1 WHERE file_external IS NOT NULL;
 
-/* Format 31 adds the inherited_props column to the NODES table. */
--- STMT_UPGRADE_TO_31
-ALTER TABLE NODES ADD COLUMN inherited_props BLOB;
-
-PRAGMA user_version = 31;
-
 -- STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE
 SELECT wc_id, local_relpath,
   conflict_old, conflict_working, conflict_new, prop_reject, tree_conflict_data
@@ -820,6 +814,38 @@ WHERE wc_id = ?1 and local_relpath = ?2
 
 /* ------------------------------------------------------------------------- */
 
+/* Format 31 adds the inherited_props column to the NODES table. C code then
+   initializes the update/switch roots to make sure future updates fetch the
+   inherited properties */
+-- STMT_UPGRADE_TO_31
+ALTER TABLE NODES ADD COLUMN inherited_props BLOB;
+
+PRAGMA user_version = 31;
+
+-- STMT_UPGRADE_31_SELECT_WCROOT_NODES
+/* Select all base nodes which are the root of a WC, including
+   switched subtrees, but excluding those which map to the root
+   of the repos.
+
+   ### IPROPS: Is this query horribly inefficient?  Quite likely,
+   ### but it only runs during an upgrade, so do we care? */
+SELECT l.wc_id, l.local_relpath FROM nodes as l
+LEFT OUTER JOIN nodes as r
+ON l.wc_id = r.wc_id
+   AND l.repos_id = r.repos_id
+   AND r.local_relpath = l.parent_relpath
+WHERE (l.local_relpath = '' AND l.repos_path != '')
+   OR (l.op_depth = 0
+       AND l.local_relpath != ''
+       AND l.repos_path != ltrim(r.repos_path
+                                 || '/'
+                                 || ltrim(substr(l.local_relpath,
+                                                 length(l.parent_relpath) + 1),
+                                          '/'),
+                                 '/'))
+
+/* ------------------------------------------------------------------------- */
+
 /* Format YYY introduces new handling for conflict information.  */
 -- format: YYY
 

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/wc-queries.sql
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/wc-queries.sql?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/wc-queries.sql
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/wc-queries.sql
 Thu Oct 11 14:02:54 2012
@@ -245,7 +245,7 @@ WHERE wc_id = ?1
 SELECT local_relpath FROM nodes
 WHERE wc_id = ?1 AND op_depth = ?3
   AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
-  AND presence == 'not-present'
+  AND presence = 'not-present'
 
 -- STMT_COMMIT_DESCENDANT_TO_BASE
 UPDATE NODES SET op_depth = 0, repos_id = ?4, repos_path = ?5, revision = ?6,
@@ -1073,28 +1073,6 @@ WHERE wc_id = ?1 AND local_relpath = ?2 
 SELECT 1 FROM nodes WHERE op_depth > 0
 LIMIT 1
 
--- STMT_SELECT_WCROOT_NODES
-/* Select all base nodes which are the root of a WC, including
-   switched subtrees, but excluding those which map to the root
-   of the repos.
-
-   ### IPROPS: Is this query horribly inefficient?  Quite likely,
-   ### but it only runs during an upgrade, so do we care? */
-SELECT l.wc_id, l.local_relpath FROM nodes as l
-LEFT OUTER JOIN nodes as r
-ON l.wc_id = r.wc_id
-   AND l.repos_id = r.repos_id
-   AND r.local_relpath = l.parent_relpath
-WHERE (l.local_relpath == '' AND l.repos_path != '')
-   OR (l.op_depth = 0
-       AND l.local_relpath != ''
-       AND l.repos_path != ltrim(r.repos_path
-                                 || '/'
-                                 || ltrim(substr(l.local_relpath,
-                                                 length(l.parent_relpath) + 1),
-                                          '/'),
-                                 '/'))
-
 /* --------------------------------------------------------------------------
  * Complex queries for callback walks, caching results in a temporary table.
  *
@@ -1443,7 +1421,7 @@ WHERE wc_id = ?1
 
 -- STMT_SELECT_ALL_NODES
 SELECT op_depth, local_relpath, parent_relpath, file_external FROM nodes
-WHERE wc_id == ?1
+WHERE wc_id = ?1
 
 /* ------------------------------------------------------------------------- */
 

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/wc.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/wc.h?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/wc.h 
(original)
+++ subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/wc.h 
Thu Oct 11 14:02:54 2012
@@ -708,6 +708,8 @@ svn_wc__write_check(svn_wc__db_t *db,
  *
  * Victim must be versioned or be part of a tree conflict.
  *
+ * If CREATE_TEMPFILES is TRUE, create temporary files for property conflicts.
+ *
  * Allocate *CONFLICTS in RESULT_POOL and do temporary allocations in
  * SCRATCH_POOL
  */
@@ -715,6 +717,7 @@ svn_error_t *
 svn_wc__read_conflicts(const apr_array_header_t **conflicts,
                        svn_wc__db_t *db,
                        const char *local_abspath,
+                       svn_boolean_t create_tempfiles,
                        apr_pool_t *result_pool,
                        apr_pool_t *scratch_pool);
 

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/svn/file-merge.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/svn/file-merge.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/svn/file-merge.c 
(original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/svn/file-merge.c 
Thu Oct 11 14:02:54 2012
@@ -365,7 +365,7 @@ static const char *
 prepare_line_for_display(const char *line, apr_pool_t *pool)
 {
   svn_stringbuf_t *buf = svn_stringbuf_create(line, pool);
-  int width;
+  size_t width;
   int line_width = LINE_DISPLAY_WIDTH;
   apr_pool_t *iterpool;
 

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/svn/propedit-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/svn/propedit-cmd.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/svn/propedit-cmd.c 
(original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/svn/propedit-cmd.c 
Thu Oct 11 14:02:54 2012
@@ -228,7 +228,7 @@ svn_cl__propedit(apr_getopt_t *os,
           peg_revision.kind = svn_opt_revision_unspecified;
 
           /* Fetch the current property. */
-          SVN_ERR(svn_client_propget4(&props, pname_utf8, abspath_or_url,
+          SVN_ERR(svn_client_propget5(&props, NULL, pname_utf8, abspath_or_url,
                                       &peg_revision,
                                       &(opt_state->start_revision),
                                       &base_rev, svn_depth_empty,

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/tests/cmdline/svnlook_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/tests/cmdline/svnlook_tests.py?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/tests/cmdline/svnlook_tests.py
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/tests/cmdline/svnlook_tests.py
 Thu Oct 11 14:02:54 2012
@@ -701,11 +701,11 @@ fp.close()"""
                     '  svn:check-locks\n', # internal prop, not really expected
                     '  bogus_rev_prop\n',
                     '  svn:date\n',
-                    '  svn:txn:client-compat-version\n',
+                    '  svn:txn-client-compat-version\n',
                     ]
   # ra_dav and ra_svn add the user-agent ephemeral property
   if svntest.main.is_ra_type_dav() or svntest.main.is_ra_type_svn():
-    expected_data.append('  svn:txn:user-agent\n')
+    expected_data.append('  svn:txn-user-agent\n')
   verify_logfile(logfilepath, svntest.verify.UnorderedOutput(expected_data))
 
 def property_delete(sbox):

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/tests/libsvn_wc/wc-queries-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/tests/libsvn_wc/wc-queries-test.c?rev=1397061&r1=1397060&r2=1397061&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/tests/libsvn_wc/wc-queries-test.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/tests/libsvn_wc/wc-queries-test.c
 Thu Oct 11 14:02:54 2012
@@ -97,9 +97,6 @@ static const int slow_statements[] =
   /* Designed as slow to avoid penalty on other queries */
   STMT_SELECT_UNREFERENCED_PRISTINES,
 
-  /* Only runs once during upgrade. */
-  STMT_SELECT_WCROOT_NODES,
-
   /* Slow, but just if foreign keys are enabled:
    * STMT_DELETE_PRISTINE_IF_UNREFERENCED,
    */


Reply via email to