You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/03/10 06:19:04 UTC

svn commit: r1454792 [1/2] - in /subversion/branches/fsfs-format7: ./ subversion/include/ subversion/libsvn_client/ subversion/libsvn_ra_serf/ subversion/libsvn_subr/ subversion/libsvn_wc/ subversion/mod_dav_svn/ subversion/tests/cmdline/ subversion/te...

Author: stefan2
Date: Sun Mar 10 05:19:03 2013
New Revision: 1454792

URL: http://svn.apache.org/r1454792
Log:
On the fsfs-format7 branch: sync with /trunk (up to r1454790).
No conflicts needed to be resolved.

Modified:
    subversion/branches/fsfs-format7/   (props changed)
    subversion/branches/fsfs-format7/build.conf
    subversion/branches/fsfs-format7/subversion/include/svn_repos.h
    subversion/branches/fsfs-format7/subversion/libsvn_client/add.c
    subversion/branches/fsfs-format7/subversion/libsvn_client/client.h
    subversion/branches/fsfs-format7/subversion/libsvn_client/delete.c
    subversion/branches/fsfs-format7/subversion/libsvn_client/merge.c
    subversion/branches/fsfs-format7/subversion/libsvn_client/update.c
    subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/commit.c
    subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/options.c
    subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/ra_serf.h
    subversion/branches/fsfs-format7/subversion/libsvn_subr/dirent_uri.c
    subversion/branches/fsfs-format7/subversion/libsvn_wc/props.c
    subversion/branches/fsfs-format7/subversion/libsvn_wc/questions.c
    subversion/branches/fsfs-format7/subversion/libsvn_wc/status.c
    subversion/branches/fsfs-format7/subversion/libsvn_wc/update_editor.c
    subversion/branches/fsfs-format7/subversion/libsvn_wc/wc.h
    subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.c
    subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.h
    subversion/branches/fsfs-format7/subversion/libsvn_wc/workqueue.c
    subversion/branches/fsfs-format7/subversion/mod_dav_svn/liveprops.c
    subversion/branches/fsfs-format7/subversion/tests/cmdline/basic_tests.py
    subversion/branches/fsfs-format7/subversion/tests/cmdline/merge_tests.py
    subversion/branches/fsfs-format7/subversion/tests/cmdline/prop_tests.py
    subversion/branches/fsfs-format7/subversion/tests/cmdline/tree_conflict_tests.py
    subversion/branches/fsfs-format7/subversion/tests/libsvn_repos/repos-test.c
    subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/dirent_uri-test.c
    subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/op-depth-test.c
    subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/utils.c
    subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/utils.h
    subversion/branches/fsfs-format7/tools/dist/make-deps-tarball.sh   (props changed)

Propchange: subversion/branches/fsfs-format7/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1453267-1454790

Modified: subversion/branches/fsfs-format7/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/build.conf?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/build.conf (original)
+++ subversion/branches/fsfs-format7/build.conf Sun Mar 10 05:19:03 2013
@@ -383,7 +383,7 @@ type = apache-mod
 path = tools/server-side/mod_dontdothat
 nonlibs = mod_dav_svn apr aprutil
 libs = libsvn_subr xml
-install = tools
+install = apache-mod
 msvc-libs = libhttpd.lib
 
 # ----------------------------------------------------------------------------

Modified: subversion/branches/fsfs-format7/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_repos.h?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_repos.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_repos.h Sun Mar 10 05:19:03 2013
@@ -854,6 +854,10 @@ svn_repos_hooks_setenv(svn_repos_t *repo
  * other clients may get blocked.  Thus, be careful when using larger
  * values here.  0 disables the optimization.
  *
+ * @a note Never activate this optimization if @a editor might access
+ * any FSFS data structures (and, hence, caches).  So, it is basically
+ * safe for networked editors only.
+ *
  * All allocation for the context and collected state will occur in
  * @a pool.
  *

Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/add.c?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/add.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/add.c Sun Mar 10 05:19:03 2013
@@ -343,9 +343,9 @@ add_file(const char *local_abspath,
  * If IGNORES is not NULL, then it is an array of const char * ignore patterns
  * that apply to any children of DIR_ABSPATH.  If REFRESH_IGNORES is TRUE, then
  * the passed in value of IGNORES (if any) is itself ignored and this function
- * will gather all ignore patterns applicable to DIR_ABSPATH itself.  Any
- * recursive calls to this function get the refreshed ignore patterns.  If
- * IGNORES is NULL and REFRESH_IGNORES is FALSE, then all children of DIR_ABSPATH
+ * will gather all ignore patterns applicable to DIR_ABSPATH itself (allocated in
+ * RESULT_POOL).  Any recursive calls to this function get the refreshed ignore
+ * patterns.  If IGNORES is NULL and REFRESH_IGNORES is FALSE, then all children of DIR_ABSPATH
  * are unconditionally added.
  *
  * If CTX->CANCEL_FUNC is non-null, call it with CTX->CANCEL_BATON to allow
@@ -363,6 +363,7 @@ add_dir_recursive(const char *dir_abspat
                   svn_boolean_t refresh_ignores,
                   apr_array_header_t *ignores,
                   svn_client_ctx_t *ctx,
+                  apr_pool_t *result_pool,
                   apr_pool_t *scratch_pool)
 {
   svn_error_t *err;
@@ -377,11 +378,6 @@ add_dir_recursive(const char *dir_abspat
 
   iterpool = svn_pool_create(scratch_pool);
 
-  if (refresh_ignores)
-    SVN_ERR(svn_client__get_all_ignores(&ignores, dir_abspath,
-                                        ctx, scratch_pool,
-                                        iterpool));
-
   /* Add this directory to revision control. */
   err = svn_wc_add_from_disk2(ctx->wc_ctx, dir_abspath, NULL /*props*/,
                               ctx->notify_func2, ctx->notify_baton2,
@@ -399,6 +395,12 @@ add_dir_recursive(const char *dir_abspat
         }
     }
 
+  /* Fetch ignores after adding to handle ignores on the directory itself
+     and ancestors via the single db optimization in libsvn_wc */
+  if (refresh_ignores)
+    SVN_ERR(svn_wc_get_ignores2(&ignores, ctx->wc_ctx, dir_abspath,
+                                ctx->config, result_pool, iterpool));
+
   /* If DIR_ABSPATH is the root of an unversioned subtree then get the
      following "autoprops":
 
@@ -463,7 +465,7 @@ add_dir_recursive(const char *dir_abspat
                                     force, no_autoprops,
                                     magic_cookie, config_autoprops,
                                     refresh_ignores, ignores, ctx,
-                                    iterpool));
+                                    result_pool, iterpool));
         }
       else if ((dirent->kind == svn_node_file || dirent->special)
                && depth >= svn_depth_files)
@@ -826,85 +828,6 @@ svn_error_t *svn_client__get_inherited_i
   return SVN_NO_ERROR;
 }
 
-svn_error_t *svn_client__get_all_ignores(apr_array_header_t **ignores,
-                                         const char *local_abspath,
-                                         svn_client_ctx_t *ctx,
-                                         apr_pool_t *result_pool,
-                                         apr_pool_t *scratch_pool)
-{
-  apr_hash_t *explicit_ignores;
-  apr_array_header_t *inherited_ignores;
-  svn_error_t *err = NULL;
-  svn_string_t *explicit_prop;
-  int i;
-  svn_opt_revision_t rev;
-
-  rev.kind = svn_opt_revision_working;
-
-  /* LOCAL_ABSPATH might be unversioned, in which case we find its
-     nearest versioned parent. */
-  while (err == NULL)
-    {
-      err = svn_client_propget5(&explicit_ignores, &inherited_ignores,
-                                SVN_PROP_INHERITABLE_IGNORES, local_abspath,
-                                &rev, &rev, NULL, svn_depth_empty, NULL, ctx,
-                                scratch_pool, scratch_pool);
-      if (err)
-        {
-          /* Unversioned and deleted nodes don't have properties */
-          if (err->apr_err != SVN_ERR_UNVERSIONED_RESOURCE
-              && err->apr_err != SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
-            return svn_error_trace(err);
-
-          svn_error_clear(err);
-          err = NULL;
-          SVN_ERR(find_existing_parent(&local_abspath, ctx, local_abspath,
-                                       scratch_pool, scratch_pool));
-        }
-      else
-        {
-          break;
-        }
-    }
-
-  explicit_prop = apr_hash_get(explicit_ignores, local_abspath,
-                               APR_HASH_KEY_STRING);
-
-  if (explicit_prop)
-    {
-      svn_prop_inherited_item_t *new_iprop =
-        apr_palloc(scratch_pool, sizeof(*new_iprop));
-      new_iprop->path_or_url = local_abspath;
-      new_iprop->prop_hash = apr_hash_make(scratch_pool);
-      apr_hash_set(new_iprop->prop_hash,
-                   SVN_PROP_INHERITABLE_IGNORES,
-                   APR_HASH_KEY_STRING,
-                   explicit_prop);
-      APR_ARRAY_PUSH(inherited_ignores,
-                     svn_prop_inherited_item_t *) = new_iprop;
-    }
-
-  /* Now that we are sure we have an existing parent, get the config ignore
-     and the local ignore patterns... */
-  SVN_ERR(svn_wc_get_ignores2(ignores, ctx->wc_ctx, local_abspath,
-                              ctx->config, result_pool, scratch_pool));
-
-  /* ...and add the inherited ignores to it. */
-  for (i = 0; i < inherited_ignores->nelts; i++)
-    {
-      svn_prop_inherited_item_t *elt = APR_ARRAY_IDX(
-        inherited_ignores, i, svn_prop_inherited_item_t *);
-      svn_string_t *ignore_val = apr_hash_get(elt->prop_hash,
-                                              SVN_PROP_INHERITABLE_IGNORES,
-                                              APR_HASH_KEY_STRING);
-      if (ignore_val)
-        svn_cstring_split_append(*ignores, ignore_val->data, "\n\r\t\v ",
-                                 FALSE, result_pool);
-    }
-
-  return SVN_NO_ERROR;
-}
-
 /* The main logic of the public svn_client_add5.
  *
  * EXISTING_PARENT_ABSPATH is the absolute path to the first existing
@@ -976,7 +899,8 @@ add(const char *local_abspath,
          target's depth will be set correctly. */
       err = add_dir_recursive(local_abspath, depth, force,
                               no_autoprops, magic_cookie, NULL,
-                              !no_ignore, ignores, ctx, scratch_pool);
+                              !no_ignore, ignores, ctx,
+                              scratch_pool, scratch_pool);
     }
   else if (kind == svn_node_file)
     err = add_file(local_abspath, magic_cookie, NULL,

Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/client.h?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/client.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/client.h Sun Mar 10 05:19:03 2013
@@ -387,22 +387,6 @@ svn_error_t *svn_client__get_all_auto_pr
                                             apr_pool_t *result_pool,
                                             apr_pool_t *scratch_pool);
 
-/* Get a combined list of ignore patterns from CTX->CONFIG, local ignore
-   patterns on LOCAL_ABSPATH (per the svn:ignore property), and from any
-   svn:global-ignores properties set on, or inherited by, LOCAL_ABSPATH.
-   If LOCAL_ABSPATH is unversioned but is located within a valid working copy,
-   then find its nearest versioned parent path, if any, and return the ignore
-   patterns for that parent.  Return an SVN_ERR_WC_NOT_WORKING_COPY error if
-   LOCAL_ABSPATH is neither a versioned working copy path nor an unversioned
-   path within a working copy.  Store the collected patterns as const char *
-   elements in the array *IGNORES.  Allocate *IGNORES and its contents in
-   RESULT_POOL.  Use SCRATCH_POOL for temporary allocations. */
-svn_error_t *svn_client__get_all_ignores(apr_array_header_t **ignores,
-                                         const char *local_abspath,
-                                         svn_client_ctx_t *ctx,
-                                         apr_pool_t *result_pool,
-                                         apr_pool_t *scratch_pool);
-
 /* Get a list of ignore patterns defined by the svn:global-ignores
    properties set on, or inherited by, PATH_OR_URL.  Store the collected
    patterns as const char * elements in the array *IGNORES.  Allocate

Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/delete.c?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/delete.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/delete.c Sun Mar 10 05:19:03 2013
@@ -248,6 +248,16 @@ single_repos_delete(svn_ra_session_t *ra
   return svn_error_trace(editor->close_edit(edit_baton, pool));
 }
 
+
+/* Structure for tracking remote delete targets associated with a
+   specific repository. */
+struct repos_deletables_t
+{
+  svn_ra_session_t *ra_session;
+  apr_array_header_t *target_uris;
+};
+
+
 static svn_error_t *
 delete_urls_multi_repos(const apr_array_header_t *uris,
                         const apr_hash_t *revprop_table,
@@ -256,90 +266,131 @@ delete_urls_multi_repos(const apr_array_
                         svn_client_ctx_t *ctx,
                         apr_pool_t *pool)
 {
-  apr_hash_t *sessions = apr_hash_make(pool);
-  apr_hash_t *relpaths = apr_hash_make(pool);
+  apr_hash_t *deletables = apr_hash_make(pool);
+  apr_pool_t *iterpool;
   apr_hash_index_t *hi;
   int i;
 
-  /* Create a hash of repos_root -> ra_session maps and repos_root -> relpaths
-     maps, used to group the various targets. */
+  /* Create a hash mapping repository root URLs -> repos_deletables_t *
+     structures.  */
   for (i = 0; i < uris->nelts; i++)
     {
       const char *uri = APR_ARRAY_IDX(uris, i, const char *);
-      svn_ra_session_t *ra_session = NULL;
-      const char *repos_root = NULL;
-      const char *repos_relpath = NULL;
-      apr_array_header_t *relpaths_list;
+      struct repos_deletables_t *repos_deletables = NULL;
+      const char *repos_relpath;
       svn_node_kind_t kind;
 
-      for (hi = apr_hash_first(pool, sessions); hi; hi = apr_hash_next(hi))
+      for (hi = apr_hash_first(pool, deletables); hi; hi = apr_hash_next(hi))
         {
-          repos_root = svn__apr_hash_index_key(hi);
-          repos_relpath = svn_uri_skip_ancestor(repos_root, uri, pool);
+          const char *repos_root = svn__apr_hash_index_key(hi);
 
+          repos_relpath = svn_uri_skip_ancestor(repos_root, uri, pool);
           if (repos_relpath)
             {
-              /* Great!  We've found another uri underneath this session,
-                 store it and move on. */
-              ra_session = svn__apr_hash_index_val(hi);
-              relpaths_list = apr_hash_get(relpaths, repos_root,
-                                           APR_HASH_KEY_STRING);
-
-              APR_ARRAY_PUSH(relpaths_list, const char *) = repos_relpath;
+              /* Great!  We've found another URI underneath this
+                 session.  We'll pick out the related RA session for
+                 use later, store the new target, and move on.  */
+              repos_deletables = svn__apr_hash_index_val(hi);
+              APR_ARRAY_PUSH(repos_deletables->target_uris, const char *) =
+                apr_pstrdup(pool, uri);
               break;
             }
         }
 
-      if (!ra_session)
+      /* If we haven't created a repos_deletable structure for this
+         delete target, we need to do.  That means opening up an RA
+         session and initializing its targets list.  */
+      if (!repos_deletables)
         {
-          /* If we haven't found a session yet, we need to open one up.
-             Note that we don't have a local directory, nor a place
-             to put temp files. */
+          svn_ra_session_t *ra_session = NULL;
+          const char *repos_root;
+          apr_array_header_t *target_uris;
+
+          /* Open an RA session to (ultimately) the root of the
+             repository in which URI is found.  */
           SVN_ERR(svn_client_open_ra_session2(&ra_session, uri, NULL,
                                               ctx, pool, pool));
           SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root, pool));
           SVN_ERR(svn_ra_reparent(ra_session, repos_root, pool));
-
-          apr_hash_set(sessions, repos_root, APR_HASH_KEY_STRING, ra_session);
           repos_relpath = svn_uri_skip_ancestor(repos_root, uri, pool);
 
-          relpaths_list = apr_array_make(pool, 1, sizeof(const char *));
-          apr_hash_set(relpaths, repos_root, APR_HASH_KEY_STRING,
-                       relpaths_list);
-          APR_ARRAY_PUSH(relpaths_list, const char *) = repos_relpath;
+          /* Make a new relpaths list for this repository, and add
+             this URI's relpath to it. */
+          target_uris = apr_array_make(pool, 1, sizeof(const char *));
+          APR_ARRAY_PUSH(target_uris, const char *) = apr_pstrdup(pool, uri);
+
+          /* Build our repos_deletables_t item and stash it in the
+             hash. */
+          repos_deletables = apr_pcalloc(pool, sizeof(*repos_deletables));
+          repos_deletables->ra_session = ra_session;
+          repos_deletables->target_uris = target_uris;
+          apr_hash_set(deletables, repos_root,
+                       APR_HASH_KEY_STRING, repos_deletables);
         }
 
-      /* Check we identified a non-root relpath.  Return an RA error
-         code for 1.6 compatibility. */
+      /* If we get here, we should have been able to calculate a
+         repos_relpath for this URI.  Let's make sure.  (We return an
+         RA error code otherwise for 1.6 compatibility.)  */
       if (!repos_relpath || !*repos_relpath)
         return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
                                  "URL '%s' not within a repository", uri);
 
-      /* Now, test to see if the thing actually exists. */
-      SVN_ERR(svn_ra_check_path(ra_session, repos_relpath, SVN_INVALID_REVNUM,
-                                &kind, pool));
+      /* Now, test to see if the thing actually exists in HEAD. */
+      SVN_ERR(svn_ra_check_path(repos_deletables->ra_session, repos_relpath,
+                                SVN_INVALID_REVNUM, &kind, pool));
       if (kind == svn_node_none)
         return svn_error_createf(SVN_ERR_FS_NOT_FOUND, NULL,
                                  "URL '%s' does not exist", uri);
     }
 
-  /* At this point, we should have two hashs:
-      SESSIONS maps repos_roots to ra_sessions.
-      RELPATHS maps repos_roots to a list of decoded relpaths for that root.
-
-     Now we iterate over the collection of sessions and do a commit for each
-     one with the collected relpaths. */
-  for (hi = apr_hash_first(pool, sessions); hi; hi = apr_hash_next(hi))
+  /* Now we iterate over the DELETABLES hash, issuing a commit for
+     each repository with its associated collected targets. */
+  iterpool = svn_pool_create(pool);
+  for (hi = apr_hash_first(pool, deletables); hi; hi = apr_hash_next(hi))
     {
       const char *repos_root = svn__apr_hash_index_key(hi);
-      svn_ra_session_t *ra_session = svn__apr_hash_index_val(hi);
-      const apr_array_header_t *relpaths_list =
-        apr_hash_get(relpaths, repos_root, APR_HASH_KEY_STRING);
+      struct repos_deletables_t *repos_deletables = svn__apr_hash_index_val(hi);
+      const char *base_uri;
+      apr_array_header_t *target_relpaths;
+
+      svn_pool_clear(iterpool);
+
+      /* We want to anchor the commit on the longest common path
+         across the targets for this one repository.  If, however, one
+         of our targets is that longest common path, we need instead
+         anchor the commit on that path's immediate parent.  Because
+         we're asking svn_uri_condense_targets() to remove
+         redundancies, this situation should be detectable by their
+         being returned either a) only a single, empty-path, target
+         relpath, or b) no target relpaths at all.  */
+      SVN_ERR(svn_uri_condense_targets(&base_uri, &target_relpaths,
+                                       repos_deletables->target_uris,
+                                       TRUE, iterpool, iterpool));
+      SVN_ERR_ASSERT(!svn_path_is_empty(base_uri));
+      if (target_relpaths->nelts == 0)
+        {
+          const char *target_relpath;
 
-      SVN_ERR(single_repos_delete(ra_session, repos_root, relpaths_list,
+          svn_uri_split(&base_uri, &target_relpath, base_uri, iterpool);
+          APR_ARRAY_PUSH(target_relpaths, const char *) = target_relpath;
+        }
+      else if ((target_relpaths->nelts == 1)
+               && (svn_path_is_empty(APR_ARRAY_IDX(target_relpaths, 0,
+                                                   const char *))))
+        {
+          const char *target_relpath;
+
+          svn_uri_split(&base_uri, &target_relpath, base_uri, iterpool);
+          APR_ARRAY_IDX(target_relpaths, 0, const char *) = target_relpath;
+        }
+          
+      SVN_ERR(svn_ra_reparent(repos_deletables->ra_session, base_uri, pool));
+      SVN_ERR(single_repos_delete(repos_deletables->ra_session, repos_root,
+                                  target_relpaths,
                                   revprop_table, commit_callback,
-                                  commit_baton, ctx, pool));
+                                  commit_baton, ctx, iterpool));
     }
+  svn_pool_destroy(iterpool);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/merge.c?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/merge.c Sun Mar 10 05:19:03 2013
@@ -3460,6 +3460,37 @@ notify_merge_completed(const char *targe
                      || notify->action == svn_wc_notify_tree_conflict)
 
 
+/* Remove merge source gaps from range used for merge notifications.
+   See http://subversion.tigris.org/issues/show_bug.cgi?id=4138
+
+   If IMPLICIT_SRC_GAP is not NULL then it is a rangelist containing a
+   single range (see the implicit_src_gap member of merge_cmd_baton_t).
+   RANGE describes a (possibly reverse) merge.
+
+   If IMPLICIT_SRC_GAP is not NULL and it's sole range intersects with
+   the older revision in *RANGE, then remove IMPLICIT_SRC_GAP's range
+   from *RANGE. */
+static void
+remove_source_gap(svn_merge_range_t *range,
+                  apr_array_header_t *implicit_src_gap)
+{
+  if (implicit_src_gap)
+    {
+      svn_merge_range_t *gap_range =
+        APR_ARRAY_IDX(implicit_src_gap, 0, svn_merge_range_t *);
+      if (range->start < range->end)
+        {
+          if (gap_range->start == range->start)
+            range->start = gap_range->end;
+        }
+      else /* Reverse merge */
+        {
+          if (gap_range->start == range->end)
+            range->end = gap_range->end;
+        }
+    }
+}
+
 /* Notify that we're starting a merge
  *
  * This calls the client's notification receiver (as found in the client
@@ -3551,9 +3582,16 @@ notify_merge_begin(merge_cmd_baton_t *me
                                 scratch_pool);
 
   if (SVN_IS_VALID_REVNUM(n_range.start))
-    notify->merge_range = &n_range;
+    {
+      /* If the merge source has a gap, then don't mention
+         those gap revisions in the notification. */
+      remove_source_gap(&n_range, merge_b->implicit_src_gap);
+      notify->merge_range = &n_range;
+    }
   else
-    notify->merge_range = NULL;
+    {
+      notify->merge_range = NULL;
+    }
 
   (*merge_b->ctx->notify_func2)(merge_b->ctx->notify_baton2, notify,
                                 scratch_pool);
@@ -4690,6 +4728,10 @@ find_gaps_in_merge_source_history(svn_re
   /* Start by assuming there is no gap. */
   *gap_start = *gap_end = SVN_INVALID_REVNUM;
 
+  /* Easy out: There can't be a gap between adjacent revisions. */
+  if (abs(source->loc1->rev - source->loc2->rev) == 1)
+    return SVN_NO_ERROR;
+
   /* Get SOURCE as mergeinfo. */
   SVN_ERR(svn_client__get_history_as_mergeinfo(&implicit_src_mergeinfo, NULL,
                                                primary_src,
@@ -8309,8 +8351,13 @@ record_mergeinfo_for_dir_merge(svn_merge
             continue;
 
           if (!squelch_mergeinfo_notifications)
-            notify_mergeinfo_recording(child->abspath, merged_range,
-                                      merge_b->ctx, iterpool);
+            {
+              /* If the merge source has a gap, then don't mention
+                 those gap revisions in the notification. */
+              remove_source_gap(&range, merge_b->implicit_src_gap);
+              notify_mergeinfo_recording(child->abspath, &range,
+                                         merge_b->ctx, iterpool);
+            }
 
           /* If we are here we know we will be recording some mergeinfo, but
              before we do, set override mergeinfo on skipped paths so they

Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/update.c?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/update.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/update.c Sun Mar 10 05:19:03 2013
@@ -239,20 +239,21 @@ update_internal(svn_revnum_t *result_rev
   /* It does not make sense to update conflict victims. */
   if (repos_relpath)
     {
-      svn_boolean_t text_conflicted, prop_conflicted, tree_conflicted;
+      svn_boolean_t text_conflicted, prop_conflicted;
 
       anchor_url = svn_path_url_add_component2(repos_root_url, repos_relpath,
                                                pool);
 
       err = svn_wc_conflicted_p3(&text_conflicted, &prop_conflicted,
-                                 &tree_conflicted,
+                                 NULL,
                                  ctx->wc_ctx, local_abspath, pool);
 
       if (err && err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
         return svn_error_trace(err);
       svn_error_clear(err);
 
-      if (!err && (text_conflicted || prop_conflicted || tree_conflicted))
+      /* tree-conflicts are handled by the update editor */
+      if (!err && (text_conflicted || prop_conflicted))
         target_conflicted = TRUE;
     }
   else

Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/commit.c?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/commit.c Sun Mar 10 05:19:03 2013
@@ -1385,16 +1385,26 @@ open_root(void *edit_baton,
     }
   else
     {
-      const char *activity_str;
+      const char *activity_str = ctx->session->activity_collection_url;
 
-      SVN_ERR(svn_ra_serf__v1_get_activity_collection(&activity_str,
-                                                      ctx->session->conns[0],
-                                                      ctx->pool,
-                                                      ctx->pool));
       if (!activity_str)
-        return svn_error_create(SVN_ERR_RA_DAV_OPTIONS_REQ_FAILED, NULL,
-                                _("The OPTIONS response did not include the "
-                                  "requested activity-collection-set value"));
+        SVN_ERR(svn_ra_serf__v1_get_activity_collection(&activity_str,
+                                                        ctx->session->conns[0],
+                                                        ctx->pool,
+                                                        ctx->pool));
+
+      /* Cache the result. */
+      if (activity_str)
+        {
+          ctx->session->activity_collection_url =
+            apr_pstrdup(ctx->session->pool, activity_str);
+        }
+      else
+        {
+          return svn_error_create(SVN_ERR_RA_DAV_OPTIONS_REQ_FAILED, NULL,
+                                  _("The OPTIONS response did not include the "
+                                    "requested activity-collection-set value"));
+        }
 
       ctx->activity_url =
         svn_path_url_add_component2(activity_str, svn_uuid_generate(ctx->pool),

Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/options.c?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/options.c Sun Mar 10 05:19:03 2013
@@ -497,11 +497,22 @@ svn_ra_serf__exchange_capabilities(svn_r
       return SVN_NO_ERROR;
     }
 
-  return svn_error_compose_create(
-             svn_ra_serf__error_on_status(opt_ctx->handler->sline.code,
-                                          serf_sess->session_url.path,
-                                          opt_ctx->handler->location),
-             err);
+  SVN_ERR(svn_error_compose_create(
+              svn_ra_serf__error_on_status(opt_ctx->handler->sline.code,
+                                           serf_sess->session_url.path,
+                                           opt_ctx->handler->location),
+              err));
+
+  /* Opportunistically cache any reported activity URL.  (We don't
+     want to have to ask for this again later, potentially against an
+     unreadable commit anchor URL.)  */
+  if (opt_ctx->activity_collection)
+    {
+      serf_sess->activity_collection_url =
+        apr_pstrdup(serf_sess->pool, opt_ctx->activity_collection);
+    }
+
+  return SVN_NO_ERROR;
 }
 
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/ra_serf.h?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/ra_serf.h Sun Mar 10 05:19:03 2013
@@ -180,6 +180,10 @@ struct svn_ra_serf__session_t {
      constants' addresses, therefore). */
   apr_hash_t *capabilities;
 
+  /* Activity collection URL.  (Cached from the initial OPTIONS
+     request when run against HTTPv1 servers.)  */
+  const char *activity_collection_url;
+
   /* Are we using a proxy? */
   int using_proxy;
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/dirent_uri.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/dirent_uri.c?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/dirent_uri.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/dirent_uri.c Sun Mar 10 05:19:03 2013
@@ -359,8 +359,24 @@ canonicalize(path_type_t type, const cha
             src = seg;
 
           /* Found a hostname, convert to lowercase and copy to dst. */
-          while (*src && (*src != '/') && (*src != ':'))
-            *(dst++) = canonicalize_to_lower((*src++));
+          if (*src == '[')
+            {
+             *(dst++) = *(src++); /* Copy '[' */
+
+              while (*src == ':'
+                     || (*src >= '0' && (*src <= '9'))
+                     || (*src >= 'a' && (*src <= 'f'))
+                     || (*src >= 'A' && (*src <= 'F')))
+                {
+                  *(dst++) = canonicalize_to_lower((*src++));
+                }
+
+              if (*src == ']')
+                *(dst++) = *(src++); /* Copy ']' */
+            }
+          else
+            while (*src && (*src != '/') && (*src != ':'))
+              *(dst++) = canonicalize_to_lower((*src++));
 
           if (*src == ':')
             {
@@ -1774,12 +1790,28 @@ svn_uri_is_canonical(const char *uri, ap
 
   /* Found a hostname, check that it's all lowercase. */
   ptr = seg;
-  while (*ptr && *ptr != '/' && *ptr != ':')
+
+  if (*ptr == '[')
     {
-      if (*ptr >= 'A' && *ptr <= 'Z')
+      ptr++;
+      while (*ptr == ':' 
+             || (*ptr >= '0' && *ptr <= '9')
+             || (*ptr >= 'a' && *ptr <= 'f'))
+        {
+          ptr++;
+        }
+
+      if (*ptr != ']')
         return FALSE;
       ptr++;
     }
+  else
+    while (*ptr && *ptr != '/' && *ptr != ':')
+      {
+        if (*ptr >= 'A' && *ptr <= 'Z')
+          return FALSE;
+        ptr++;
+      }
 
   /* Found a portnumber */
   if (*ptr == ':')

Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/props.c?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/props.c Sun Mar 10 05:19:03 2013
@@ -2314,7 +2314,7 @@ svn_wc__get_iprops(apr_array_header_t **
                    apr_pool_t *scratch_pool)
 {
   return svn_error_trace(
-            svn_wc__db_read_inherited_props(inherited_props,
+            svn_wc__db_read_inherited_props(inherited_props, NULL,
                                             wc_ctx->db, local_abspath,
                                             propname,
                                             result_pool, scratch_pool));

Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/questions.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/questions.c?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/questions.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/questions.c Sun Mar 10 05:19:03 2013
@@ -363,13 +363,14 @@ svn_wc_text_modified_p2(svn_boolean_t *m
 
 
 
-svn_error_t *
-svn_wc__internal_conflicted_p(svn_boolean_t *text_conflicted_p,
-                              svn_boolean_t *prop_conflicted_p,
-                              svn_boolean_t *tree_conflicted_p,
-                              svn_wc__db_t *db,
-                              const char *local_abspath,
-                              apr_pool_t *scratch_pool)
+static svn_error_t *
+internal_conflicted_p(svn_boolean_t *text_conflicted_p,
+                      svn_boolean_t *prop_conflicted_p,
+                      svn_boolean_t *tree_conflicted_p,
+                      svn_boolean_t ignore_move_edit,
+                      svn_wc__db_t *db,
+                      const char *local_abspath,
+                      apr_pool_t *scratch_pool)
 {
   svn_node_kind_t kind;
   svn_skel_t *conflicts;
@@ -470,7 +471,19 @@ svn_wc__internal_conflicted_p(svn_boolea
         }
     }
 
-  /* tree_conflicts don't have markers, so don't need checking */
+  if (tree_conflicted_p && *tree_conflicted_p && ignore_move_edit)
+    {
+      svn_wc_conflict_reason_t reason;
+      svn_wc_conflict_action_t action;
+
+      SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, &action, NULL,
+                                                  db, local_abspath, conflicts,
+                                                  scratch_pool, scratch_pool));
+
+      if (reason == svn_wc_conflict_reason_moved_away
+          && action == svn_wc_conflict_action_edit)
+        *tree_conflicted_p = FALSE;
+    }
 
   if (resolved_text || resolved_props)
     {
@@ -492,6 +505,42 @@ svn_wc__internal_conflicted_p(svn_boolea
 }
 
 svn_error_t *
+svn_wc__internal_conflicted_p(svn_boolean_t *text_conflicted_p,
+                              svn_boolean_t *prop_conflicted_p,
+                              svn_boolean_t *tree_conflicted_p,
+                              svn_wc__db_t *db,
+                              const char *local_abspath,
+                              apr_pool_t *scratch_pool)
+{
+  SVN_ERR(internal_conflicted_p(text_conflicted_p, prop_conflicted_p,
+                                tree_conflicted_p, FALSE,
+                                db, local_abspath, scratch_pool));
+  return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_wc__conflicted_for_update_p(svn_boolean_t *conflicted_p,
+                                svn_wc__db_t *db,
+                                const char *local_abspath,
+                                svn_boolean_t tree_only,
+                                apr_pool_t *scratch_pool)
+{
+  svn_boolean_t text_conflicted, prop_conflicted, tree_conflicted;
+
+  SVN_ERR(internal_conflicted_p(tree_only ? NULL: &text_conflicted,
+                                tree_only ? NULL: &prop_conflicted,
+                                &tree_conflicted, TRUE,
+                                db, local_abspath, scratch_pool));
+  if (tree_only)
+    *conflicted_p = tree_conflicted;
+  else
+    *conflicted_p = text_conflicted || prop_conflicted || tree_conflicted;
+
+  return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
 svn_wc_conflicted_p3(svn_boolean_t *text_conflicted_p,
                      svn_boolean_t *prop_conflicted_p,
                      svn_boolean_t *tree_conflicted_p,

Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/status.c?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/status.c Sun Mar 10 05:19:03 2013
@@ -936,13 +936,10 @@ send_status_structure(const struct walk_
 }
 
 
-/* Store in *PATTERNS a list of all svn:ignore properties from
-   the working copy directory, including the default ignores
-   passed in as IGNORES.
-
-   If INHERITED_PATTERNS is not NULL, then store in *INHERITED_PATTERNS
-   a list of all ignore patterns defined by the svn:inherited-ignores
-   properties explicitly set on, or inherited by, LOCAL_ABSPATH.
+/* Store in *PATTERNS a list of ignores collected from svn:ignore properties
+   on LOCAL_ABSPATH and svn:global-ignores on LOCAL_ABSPATH and its
+   repository ancestors (as cached in the working copy), including the default
+   ignores passed in as IGNORES.
 
    Upon return, *PATTERNS will contain zero or more (const char *)
    patterns from the value of the SVN_PROP_IGNORE property set on
@@ -951,10 +948,7 @@ send_status_structure(const struct walk_
    IGNORES is a list of patterns to include; typically this will
    be the default ignores as, for example, specified in a config file.
 
-   If MAY_HAVE_PROPS is false, local_abspath is assumed to have no
-   properties.
-
-   LOCAL_ABSPATH and DB control how to access the ignore information.
+   DB, LOCAL_ABSPATH is used to access the working copy.
 
    Allocate results in RESULT_POOL, temporary stuffs in SCRATCH_POOL.
 
@@ -962,17 +956,16 @@ send_status_structure(const struct walk_
 */
 static svn_error_t *
 collect_ignore_patterns(apr_array_header_t **patterns,
-                        apr_array_header_t **inherited_patterns,
                         svn_wc__db_t *db,
                         const char *local_abspath,
                         const apr_array_header_t *ignores,
-                        svn_boolean_t may_have_props,
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool)
 {
   int i;
-  const svn_string_t *value;
-  apr_hash_t *props = NULL;
+  apr_hash_t *props;
+  apr_array_header_t *inherited_props;
+  svn_error_t *err;
 
   /* ### assert we are passed a directory? */
 
@@ -986,56 +979,46 @@ collect_ignore_patterns(apr_array_header
                                                             ignore);
     }
 
-  if (may_have_props)
+  err = svn_wc__db_read_inherited_props(&inherited_props, &props,
+                                        db, local_abspath,
+                                        SVN_PROP_INHERITABLE_IGNORES,
+                                        scratch_pool, scratch_pool);
+
+  if (err)
     {
-      /* Add any svn:ignore globs to the PATTERNS array. */
-      SVN_ERR(svn_wc__db_read_props(&props, db, local_abspath,
-                                    scratch_pool, scratch_pool));
+      if (err->apr_err != SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
+        return svn_error_trace(err);
 
-      if (!props)
-        return SVN_NO_ERROR;
+      svn_error_clear(err);
+      return SVN_NO_ERROR;
+    }
 
-      value = apr_hash_get(props, SVN_PROP_IGNORE, APR_HASH_KEY_STRING);
+  if (props)
+    {
+      const svn_string_t *value;
 
-      if (value != NULL)
+      value = svn_hash_gets(props, SVN_PROP_IGNORE);
+      if (value)
+        svn_cstring_split_append(*patterns, value->data, "\n\r", FALSE,
+                                 result_pool);
+
+      value = svn_hash_gets(props, SVN_PROP_INHERITABLE_IGNORES);
+      if (value)
         svn_cstring_split_append(*patterns, value->data, "\n\r", FALSE,
                                  result_pool);
     }
 
-  if (inherited_patterns)
+  for (i = 0; i < inherited_props->nelts; i++)
     {
-      apr_array_header_t *inherited_props;
+      svn_prop_inherited_item_t *elt = APR_ARRAY_IDX(
+        inherited_props, i, svn_prop_inherited_item_t *);
+      const svn_string_t *value;
 
-      *inherited_patterns = apr_array_make(result_pool, 1,
-                                           sizeof(const char *));
-      if (props)
-        {
-          value = apr_hash_get(props, SVN_PROP_INHERITABLE_IGNORES,
-                               APR_HASH_KEY_STRING);
-          if (value != NULL)
-            svn_cstring_split_append(*inherited_patterns, value->data, "\n\r",
-                                     FALSE, result_pool);      
-        }
-
-      SVN_ERR(svn_wc__db_read_inherited_props(&inherited_props,
-                                              db, local_abspath,
-                                              SVN_PROP_INHERITABLE_IGNORES,
-                                              scratch_pool, scratch_pool));
-      for (i = 0; i < inherited_props->nelts; i++)
-        {
-          apr_hash_index_t *hi;
-          svn_prop_inherited_item_t *elt = APR_ARRAY_IDX(
-            inherited_props, i, svn_prop_inherited_item_t *);
-
-          for (hi = apr_hash_first(scratch_pool, elt->prop_hash);
-               hi;
-               hi = apr_hash_next(hi))
-            {
-              const svn_string_t *propval = svn__apr_hash_index_val(hi);
-              svn_cstring_split_append(*inherited_patterns, propval->data,
-                                       "\n\r", FALSE, result_pool);   
-            }
-        }
+      value = svn_hash_gets(elt->prop_hash, SVN_PROP_INHERITABLE_IGNORES);
+
+      if (value)
+        svn_cstring_split_append(*patterns, value->data,
+                                 "\n\r", FALSE, result_pool);
     }
 
   return SVN_NO_ERROR;
@@ -1081,9 +1064,8 @@ is_external_path(apr_hash_t *externals,
    requested.  PATH_KIND is the node kind of NAME as determined by the
    caller.  PATH_SPECIAL is the special status of the path, also determined
    by the caller.
-   PATTERNS and INHERITED_PATTERNS point to a list of filename patterns which
-   are marked as ignored.  None of these parameter may be NULL.  EXTERNALS is
-   a hash of known externals definitions for this status run.
+   PATTERNS points to a list of filename patterns which are marked as ignored.
+   None of these parameter may be NULL.
 
    If NO_IGNORE is TRUE, the item will be added regardless of
    whether it is ignored; otherwise we will only add the item if it
@@ -1097,26 +1079,21 @@ send_unversioned_item(const struct walk_
                       const svn_io_dirent2_t *dirent,
                       svn_boolean_t tree_conflicted,
                       const apr_array_header_t *patterns,
-                      const apr_array_header_t *inherited_patterns,
                       svn_boolean_t no_ignore,
                       svn_wc_status_func4_t status_func,
                       void *status_baton,
                       apr_pool_t *scratch_pool)
 {
   svn_boolean_t is_ignored;
-  svn_boolean_t is_mandatory_ignored;
   svn_boolean_t is_external;
   svn_wc_status3_t *status;
   const char *base_name = svn_dirent_basename(local_abspath, NULL);
 
   is_ignored = svn_wc_match_ignore_list(base_name, patterns, scratch_pool);
-  is_mandatory_ignored = svn_wc_match_ignore_list(base_name,
-                                                  inherited_patterns,
-                                                  scratch_pool);
   SVN_ERR(assemble_unversioned(&status,
                                wb->db, local_abspath,
                                dirent, tree_conflicted,
-                               is_ignored || is_mandatory_ignored,
+                               is_ignored,
                                scratch_pool, scratch_pool));
 
   is_external = is_external_path(wb->externals, local_abspath, scratch_pool);
@@ -1132,7 +1109,7 @@ send_unversioned_item(const struct walk_
   /* If we aren't ignoring it, or if it's an externals path, pass this
      entry to the status func. */
   if (no_ignore
-      || !(is_ignored || is_mandatory_ignored)
+      || !is_ignored
       || is_external)
     return svn_error_trace((*status_func)(status_baton, local_abspath,
                                           status, scratch_pool));
@@ -1179,22 +1156,18 @@ get_dir_status(const struct walk_status_
  * DIR_REPOS_* should reflect LOCAL_ABSPATH's parent URL, i.e. LOCAL_ABSPATH's
  * URL treated with svn_uri_dirname(). ### TODO verify this (externals)
  *
- * DIR_HAS_PROPS is a boolean indicating whether PARENT_ABSPATH has properties.
- *
- * If *COLLECTED_IGNORE_PATTERNS or COLLECTED_INHERITED_IGNORE_PATTERNS are NULL
- * and ignore patterns are needed in this call, then *COLLECTED_IGNORE_PATTERNS
- * *COLLECTED_INHERITED_IGNORE_PATTERNS will be set to an apr_array_header_t*
+ * If *COLLECTED_IGNORE_PATTERNS is NULL and ignore patterns are needed in this
+ * call, then *COLLECTED_IGNORE_PATTERNS will be set to an apr_array_header_t*
  * containing all ignore patterns, as returned by collect_ignore_patterns() on
- * PARENT_ABSPATH and IGNORE_PATTERNS. If *COLLECTED_IGNORE_PATTERNS and 
- * COLLECTED_INHERITED_IGNORE_PATTERNS is passed non-NULL, it is assumed they
- * already hold those results. This speeds up repeated calls with the same
- * PARENT_ABSPATH.
+ * PARENT_ABSPATH and IGNORE_PATTERNS. If *COLLECTED_IGNORE_PATTERNS is passed
+ * non-NULL, it is assumed it already holds those results.
+ * This speeds up repeated calls with the same PARENT_ABSPATH.
  *
- * *COLLECTED_IGNORE_PATTERNS and COLLECTED_INHERITED_IGNORE_PATTERNS will be
- * allocated in RESULT_POOL. All other allocations are made in SCRATCH_POOL.
+ * *COLLECTED_IGNORE_PATTERNS will be allocated in RESULT_POOL. All other
+ * allocations are made in SCRATCH_POOL.
  *
  * The remaining parameters correspond to get_dir_status(). */
-static svn_error_t*
+static svn_error_t *
 one_child_status(const struct walk_status_baton *wb,
                  const char *local_abspath,
                  const char *parent_abspath,
@@ -1203,10 +1176,8 @@ one_child_status(const struct walk_statu
                  const char *dir_repos_root_url,
                  const char *dir_repos_relpath,
                  const char *dir_repos_uuid,
-                 svn_boolean_t dir_has_props,
                  svn_boolean_t unversioned_tree_conflicted,
                  apr_array_header_t **collected_ignore_patterns,
-                 apr_array_header_t **collected_inherited_ignore_patterns,
                  const apr_array_header_t *ignore_patterns,
                  svn_depth_t depth,
                  svn_boolean_t get_all,
@@ -1274,7 +1245,7 @@ one_child_status(const struct walk_statu
       if (depth == svn_depth_files && dirent->kind == svn_node_dir)
         return SVN_NO_ERROR;
 
-      if (svn_wc_is_adm_dir(svn_dirent_basename(local_abspath, scratch_pool),
+      if (svn_wc_is_adm_dir(svn_dirent_basename(local_abspath, NULL),
                             scratch_pool))
         return SVN_NO_ERROR;
     }
@@ -1289,13 +1260,9 @@ one_child_status(const struct walk_statu
    * determined.  For example, in 'svn status', plain unversioned nodes show
    * as '?  C', where ignored ones show as 'I  C'. */
 
-  if ((ignore_patterns && ! *collected_ignore_patterns)
-      || (collected_inherited_ignore_patterns
-          && ! collected_inherited_ignore_patterns))
+  if (ignore_patterns && ! *collected_ignore_patterns)
     SVN_ERR(collect_ignore_patterns(collected_ignore_patterns,
-                                    collected_inherited_ignore_patterns,
                                     wb->db, parent_abspath, ignore_patterns,
-                                    dir_has_props,
                                     result_pool, scratch_pool));
 
   SVN_ERR(send_unversioned_item(wb,
@@ -1303,7 +1270,6 @@ one_child_status(const struct walk_statu
                                 dirent,
                                 conflicted,
                                 *collected_ignore_patterns,
-                                *collected_inherited_ignore_patterns,
                                 no_ignore,
                                 status_func, status_baton,
                                 scratch_pool));
@@ -1353,11 +1319,9 @@ get_dir_status(const struct walk_status_
   const char *dir_repos_root_url;
   const char *dir_repos_relpath;
   const char *dir_repos_uuid;
-  svn_boolean_t dir_has_props;
   apr_hash_t *dirents, *nodes, *conflicts, *all_children;
   apr_array_header_t *sorted_children;
   apr_array_header_t *collected_ignore_patterns = NULL;
-  apr_array_header_t *collected_inherited_ignore_patterns = NULL;
   apr_pool_t *iterpool;
   svn_error_t *err;
   int i;
@@ -1453,8 +1417,6 @@ get_dir_status(const struct walk_status_
   if (depth == svn_depth_empty)
     return SVN_NO_ERROR;
 
-  dir_has_props = (dir_info->had_props || dir_info->props_mod);
-
   /* Walk all the children of this directory. */
   sorted_children = svn_sort__hash(all_children,
                                    svn_sort_compare_items_lexically,
@@ -1486,10 +1448,8 @@ get_dir_status(const struct walk_status_
                                dir_repos_root_url,
                                dir_repos_relpath,
                                dir_repos_uuid,
-                               dir_has_props,
                                apr_hash_get(conflicts, key, klen) != NULL,
                                &collected_ignore_patterns,
-                               &collected_inherited_ignore_patterns,
                                ignore_patterns,
                                depth,
                                get_all,
@@ -1539,7 +1499,6 @@ get_child_status(const struct walk_statu
   const char *dir_repos_uuid;
   const struct svn_wc__db_info_t *dir_info;
   apr_array_header_t *collected_ignore_patterns = NULL;
-  apr_array_header_t *collected_inherited_ignore_patterns = NULL;
   const char *parent_abspath = svn_dirent_dirname(local_abspath,
                                                   scratch_pool);
 
@@ -1571,10 +1530,8 @@ get_child_status(const struct walk_statu
                            dir_repos_root_url,
                            dir_repos_relpath,
                            dir_repos_uuid,
-                           (dir_info->had_props || dir_info->props_mod),
                            FALSE, /* unversioned_tree_conflicted */
                            &collected_ignore_patterns,
-                           &collected_inherited_ignore_patterns,
                            ignore_patterns,
                            svn_depth_empty,
                            get_all,
@@ -3092,8 +3049,8 @@ svn_wc_get_ignores2(apr_array_header_t *
   apr_array_header_t *default_ignores;
 
   SVN_ERR(svn_wc_get_default_ignores(&default_ignores, config, scratch_pool));
-  return svn_error_trace(collect_ignore_patterns(patterns, NULL, wc_ctx->db,
+  return svn_error_trace(collect_ignore_patterns(patterns, wc_ctx->db,
                                                  local_abspath,
-                                                 default_ignores, TRUE,
+                                                 default_ignores,
                                                  result_pool, scratch_pool));
 }

Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/update_editor.c?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/update_editor.c Sun Mar 10 05:19:03 2013
@@ -1170,6 +1170,7 @@ open_root(void *edit_baton,
   svn_boolean_t already_conflicted;
   svn_error_t *err;
   svn_wc__db_status_t status;
+  svn_wc__db_status_t base_status;
   svn_kind_t kind;
   svn_boolean_t have_work;
 
@@ -1227,6 +1228,17 @@ open_root(void *edit_baton,
       SVN_ERR(svn_wc__db_base_moved_to(NULL, NULL, &move_src_root_abspath,
                                        NULL, eb->db, db->local_abspath,
                                        pool, pool));
+      if (move_src_root_abspath || *eb->target_basename == '\0')
+        SVN_ERR(svn_wc__db_base_get_info(&base_status, NULL,
+                                         &db->old_revision,
+                                         &db->old_repos_relpath, NULL, NULL,
+                                         &db->changed_rev, &db->changed_date,
+                                         &db->changed_author,
+                                         &db->ambient_depth,
+                                         NULL, NULL, NULL, NULL, NULL, NULL,
+                                         eb->db, db->local_abspath,
+                                         db->pool, pool));
+
       if (move_src_root_abspath)
         {
           /* This is an update anchored inside a move. We need to
@@ -1242,8 +1254,9 @@ open_root(void *edit_baton,
 
           if (strcmp(db->local_abspath, move_src_root_abspath))
             {
-              /* This is some parent of the edit root, we won't be
-                 handling it again so raise the conflict now. */
+              /* We are raising the tree-conflict on some parent of
+                 the edit root, we won't be handling that path again
+                 so raise the conflict now. */
               SVN_ERR(complete_conflict(tree_conflict, eb,
                                         move_src_root_abspath,
                                         db->old_repos_relpath,
@@ -1261,28 +1274,16 @@ open_root(void *edit_baton,
             db->edit_conflict = tree_conflict;
         }
 
-
       db->shadowed = TRUE; /* Needed for the close_directory() on the root, to
                               make sure it doesn't use the ACTUAL tree */
     }
+  else
+    base_status = status;
 
   if (*eb->target_basename == '\0')
     {
-      svn_wc__db_status_t base_status;
       /* For an update with a NULL target, this is equivalent to open_dir(): */
 
-      if (! have_work)
-        base_status = status;
-      else
-        {
-          SVN_ERR(svn_wc__db_base_get_info(&base_status, NULL, &db->old_revision,
-                                           &db->old_repos_relpath, NULL, NULL,
-                                           &db->changed_rev, &db->changed_date,
-                                           &db->changed_author, &db->ambient_depth,
-                                           NULL, NULL, NULL, NULL, NULL, NULL,
-                                           eb->db, db->local_abspath,
-                                           db->pool, pool));
-        }
       db->was_incomplete = (base_status == svn_wc__db_status_incomplete);
 
       /* ### TODO: Add some tree conflict and obstruction detection, etc. like
@@ -1615,9 +1616,9 @@ check_tree_conflict(svn_skel_t **pconfli
 }
 
 
-/* If LOCAL_ABSPATH is inside a conflicted tree, set *CONFLICTED to TRUE,
- * Otherwise set *CONFLICTED to FALSE.  Use SCRATCH_POOL for temporary
- * allocations.
+/* If LOCAL_ABSPATH is inside a conflicted tree and the conflict is
+ * not a moved-away-edit conflict, set *CONFLICTED to TRUE.  Otherwise
+ * set *CONFLICTED to FALSE.
  */
 static svn_error_t *
 already_in_a_tree_conflict(svn_boolean_t *conflicted,
@@ -1634,22 +1635,17 @@ already_in_a_tree_conflict(svn_boolean_t
 
   while (TRUE)
     {
-      svn_boolean_t is_wc_root, tree_conflicted;
+      svn_boolean_t is_wc_root;
 
       svn_pool_clear(iterpool);
 
-      SVN_ERR(svn_wc__internal_conflicted_p(NULL, NULL, &tree_conflicted,
-                                            db, ancestor_abspath, iterpool));
-
-      if (tree_conflicted)
-        {
-          *conflicted = TRUE;
-          break;
-        }
+      SVN_ERR(svn_wc__conflicted_for_update_p(conflicted, db, ancestor_abspath,
+                                              TRUE, scratch_pool));
+      if (*conflicted)
+        break;
 
       SVN_ERR(svn_wc__db_is_wcroot(&is_wc_root, db, ancestor_abspath,
                                    iterpool));
-
       if (is_wc_root)
         break;
 
@@ -1668,15 +1664,9 @@ node_already_conflicted(svn_boolean_t *c
                         const char *local_abspath,
                         apr_pool_t *scratch_pool)
 {
-  svn_boolean_t text_conflicted, prop_conflicted, tree_conflicted;
-
-  SVN_ERR(svn_wc__internal_conflicted_p(&text_conflicted,
-                                        &prop_conflicted,
-                                        &tree_conflicted,
-                                        db, local_abspath,
-                                        scratch_pool));
+  SVN_ERR(svn_wc__conflicted_for_update_p(conflicted, db, local_abspath, FALSE,
+                                          scratch_pool));
 
-  *conflicted = (text_conflicted || prop_conflicted || tree_conflicted);
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/wc.h?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/wc.h Sun Mar 10 05:19:03 2013
@@ -501,6 +501,16 @@ svn_wc__internal_conflicted_p(svn_boolea
                               const char *local_abspath,
                               apr_pool_t *scratch_pool);
 
+/* Similar to svn_wc__internal_conflicted_p(), but ignores
+ * moved-away-edit tree conflicts.  Also ignores text and property
+ * conflicts if TREE_ONLY is TRUE */
+svn_error_t *
+svn_wc__conflicted_for_update_p(svn_boolean_t *conflicted_p,
+                                svn_wc__db_t *db,
+                                const char *local_abspath,
+                                svn_boolean_t tree_only,
+                                apr_pool_t *scratch_pool);
+
 
 /* Internal version of svn_wc_transmit_text_deltas3(). */
 svn_error_t *

Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.c?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.c Sun Mar 10 05:19:03 2013
@@ -647,16 +647,13 @@ svn_wc__db_retract_parent_delete(svn_wc_
 
 
 
-/* Insert the base row represented by (insert_base_baton_t *) BATON.
- *
- * Implements svn_wc__db_txn_callback_t. */
+/* Insert the base row represented by (insert_base_baton_t *) BATON. */
 static svn_error_t *
-insert_base_node(void *baton,
+insert_base_node(const insert_base_baton_t *pibb,
                  svn_wc__db_wcroot_t *wcroot,
                  const char *local_relpath,
                  apr_pool_t *scratch_pool)
 {
-  const insert_base_baton_t *pibb = baton;
   apr_int64_t repos_id = pibb->repos_id;
   svn_sqlite__stmt_t *stmt;
   svn_filesize_t recorded_size = SVN_INVALID_FILESIZE;
@@ -935,16 +932,13 @@ insert_incomplete_children(svn_sqlite__d
 }
 
 
-/* Insert the working row represented by (insert_working_baton_t *) BATON.
- *
- * Implements svn_wc__db_txn_callback_t. */
+/* Insert the working row represented by (insert_working_baton_t *) BATON. */
 static svn_error_t *
-insert_working_node(void *baton,
+insert_working_node(const insert_working_baton_t *piwb,
                     svn_wc__db_wcroot_t *wcroot,
                     const char *local_relpath,
                     apr_pool_t *scratch_pool)
 {
-  const insert_working_baton_t *piwb = baton;
   const char *parent_relpath;
   const char *moved_to_relpath = NULL;
   svn_sqlite__stmt_t *stmt;
@@ -1708,8 +1702,9 @@ svn_wc__db_base_add_directory(svn_wc__db
 
      Note: old children can stick around, even if they are no longer present
      in this directory's revision.  */
-  SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, insert_base_node, &ibb,
-                              scratch_pool));
+  SVN_WC__DB_WITH_TXN(
+            insert_base_node(&ibb, wcroot, local_relpath, scratch_pool),
+            wcroot);
 
   SVN_ERR(flush_entries(wcroot, local_abspath, depth, scratch_pool));
   return SVN_NO_ERROR;
@@ -1760,9 +1755,9 @@ svn_wc__db_base_add_incomplete_directory
   ibb.conflict = conflict;
   ibb.work_items = work_items;
 
-  SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath,
-                              insert_base_node,
-                              &ibb, scratch_pool));
+  SVN_WC__DB_WITH_TXN(
+            insert_base_node(&ibb, wcroot, local_relpath, scratch_pool),
+            wcroot);
 
   SVN_ERR(flush_entries(wcroot, local_abspath, svn_depth_empty, scratch_pool));
 
@@ -1846,8 +1841,9 @@ svn_wc__db_base_add_file(svn_wc__db_t *d
   ibb.conflict = conflict;
   ibb.work_items = work_items;
 
-  SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, insert_base_node, &ibb,
-                              scratch_pool));
+  SVN_WC__DB_WITH_TXN(
+            insert_base_node(&ibb, wcroot, local_relpath, scratch_pool),
+            wcroot);
 
   /* If this used to be a directory we should remove children so pass
    * depth infinity. */
@@ -1932,8 +1928,9 @@ svn_wc__db_base_add_symlink(svn_wc__db_t
   ibb.conflict = conflict;
   ibb.work_items = work_items;
 
-  SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, insert_base_node, &ibb,
-                              scratch_pool));
+  SVN_WC__DB_WITH_TXN(
+            insert_base_node(&ibb, wcroot, local_relpath, scratch_pool),
+            wcroot);
 
   /* If this used to be a directory we should remove children so pass
    * depth infinity. */
@@ -2003,8 +2000,9 @@ add_excluded_or_not_present_node(svn_wc_
   ibb.conflict = conflict;
   ibb.work_items = work_items;
 
-  SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, insert_base_node, &ibb,
-                              scratch_pool));
+  SVN_WC__DB_WITH_TXN(
+            insert_base_node(&ibb, wcroot, local_relpath, scratch_pool),
+            wcroot);
 
   /* If this used to be a directory we should remove children so pass
    * depth infinity. */
@@ -2994,12 +2992,11 @@ blank_ieb(insert_external_baton_t *ieb)
  *
  * Implements svn_wc__db_txn_callback_t. */
 static svn_error_t *
-insert_external_node(void *baton,
+insert_external_node(const insert_external_baton_t *ieb,
                      svn_wc__db_wcroot_t *wcroot,
                      const char *local_relpath,
                      apr_pool_t *scratch_pool)
 {
-  const insert_external_baton_t *ieb = baton;
   svn_wc__db_status_t status;
   svn_error_t *err;
   svn_boolean_t update_root;
@@ -3188,9 +3185,11 @@ svn_wc__db_external_add_file(svn_wc__db_
   ieb.conflict = conflict;
   ieb.work_items = work_items;
 
-  return svn_error_trace(
-            svn_wc__db_with_txn(wcroot, local_relpath, insert_external_node,
-                                &ieb, scratch_pool));
+  SVN_WC__DB_WITH_TXN(
+            insert_external_node(&ieb, wcroot, local_relpath, scratch_pool),
+            wcroot);
+
+  return SVN_NO_ERROR;
 }
 
 svn_error_t *
@@ -3272,9 +3271,11 @@ svn_wc__db_external_add_symlink(svn_wc__
 
   ieb.work_items = work_items;
 
-  return svn_error_trace(
-            svn_wc__db_with_txn(wcroot, local_relpath, insert_external_node,
-                                &ieb, scratch_pool));
+  SVN_WC__DB_WITH_TXN(
+            insert_external_node(&ieb, wcroot, local_relpath, scratch_pool),
+            wcroot);
+
+  return SVN_NO_ERROR;
 }
 
 svn_error_t *
@@ -3327,9 +3328,11 @@ svn_wc__db_external_add_dir(svn_wc__db_t
 
   ieb.work_items = work_items;
 
-  return svn_error_trace(
-            svn_wc__db_with_txn(wcroot, local_relpath, insert_external_node,
-                                &ieb, scratch_pool));
+  SVN_WC__DB_WITH_TXN(
+            insert_external_node(&ieb, wcroot, local_relpath, scratch_pool),
+            wcroot);
+
+  return SVN_NO_ERROR;
 }
 
 /* The body of svn_wc__db_external_remove(). */
@@ -5277,8 +5280,9 @@ svn_wc__db_op_copy_dir(svn_wc__db_t *db,
   iwb.work_items = work_items;
   iwb.conflict = conflict;
 
-  SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, insert_working_node, &iwb,
-                              scratch_pool));
+  SVN_WC__DB_WITH_TXN(
+                insert_working_node(&iwb, wcroot, local_relpath, scratch_pool),
+                wcroot);
   SVN_ERR(flush_entries(wcroot, local_abspath, depth, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -5361,8 +5365,9 @@ svn_wc__db_op_copy_file(svn_wc__db_t *db
   iwb.work_items = work_items;
   iwb.conflict = conflict;
 
-  SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, insert_working_node, &iwb,
-                              scratch_pool));
+  SVN_WC__DB_WITH_TXN(
+          insert_working_node(&iwb, wcroot, local_relpath, scratch_pool),
+          wcroot);
   SVN_ERR(flush_entries(wcroot, local_abspath, svn_depth_empty, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -5431,8 +5436,9 @@ svn_wc__db_op_copy_symlink(svn_wc__db_t 
   iwb.work_items = work_items;
   iwb.conflict = conflict;
 
-  SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, insert_working_node, &iwb,
-                              scratch_pool));
+  SVN_WC__DB_WITH_TXN(
+            insert_working_node(&iwb, wcroot, local_relpath, scratch_pool),
+            wcroot);
   SVN_ERR(flush_entries(wcroot, local_abspath, svn_depth_empty, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -5474,8 +5480,9 @@ svn_wc__db_op_add_directory(svn_wc__db_t
 
   iwb.work_items = work_items;
 
-  SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, insert_working_node, &iwb,
-                              scratch_pool));
+  SVN_WC__DB_WITH_TXN(
+            insert_working_node(&iwb, wcroot, local_relpath, scratch_pool),
+            wcroot);
   /* Use depth infinity to make sure we have no invalid cached information
    * about children of this dir. */
   SVN_ERR(flush_entries(wcroot, local_abspath, svn_depth_infinity,
@@ -5520,8 +5527,9 @@ svn_wc__db_op_add_file(svn_wc__db_t *db,
 
   iwb.work_items = work_items;
 
-  SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, insert_working_node, &iwb,
-                              scratch_pool));
+  SVN_WC__DB_WITH_TXN(
+            insert_working_node(&iwb, wcroot, local_relpath, scratch_pool),
+            wcroot);
   SVN_ERR(flush_entries(wcroot, local_abspath, svn_depth_empty, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -5569,8 +5577,9 @@ svn_wc__db_op_add_symlink(svn_wc__db_t *
 
   iwb.work_items = work_items;
 
-  SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, insert_working_node, &iwb,
-                              scratch_pool));
+  SVN_WC__DB_WITH_TXN(
+            insert_working_node(&iwb, wcroot, local_relpath, scratch_pool),
+            wcroot);
   SVN_ERR(flush_entries(wcroot, local_abspath, svn_depth_empty, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -6647,8 +6656,8 @@ svn_wc__db_op_revert(svn_wc__db_t *db,
                               db, local_abspath, scratch_pool, scratch_pool));
   VERIFY_USABLE_WCROOT(wcroot);
 
-  SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, with_triggers, &wtb,
-                              scratch_pool));
+  SVN_WC__DB_WITH_TXN(with_triggers(&wtb, wcroot, local_relpath, scratch_pool),
+                      wcroot);
 
   SVN_ERR(flush_entries(wcroot, local_abspath, depth, scratch_pool));
 
@@ -7938,9 +7947,9 @@ svn_wc__db_op_delete(svn_wc__db_t *db,
     {
       /* Avoid the trigger work */
       odb.notify = FALSE;
-      SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath,
-                                  delete_node, &odb,
-                                  scratch_pool));
+      SVN_WC__DB_WITH_TXN(
+                    delete_node(&odb, wcroot, local_relpath, scratch_pool),
+                    wcroot);
     }
 
   SVN_ERR(flush_entries(wcroot, local_abspath, svn_depth_infinity,
@@ -9629,10 +9638,34 @@ filter_unwanted_props(apr_hash_t *prop_h
   return;
 }
 
-/* The body of svn_wc__db_read_inherited_props().
- */
+/* Get the changed properties as stored in the ACTUAL table */
+static svn_error_t *
+db_get_changed_props(apr_hash_t **actual_props,
+                     svn_wc__db_wcroot_t *wcroot,
+                     const char *local_relpath,
+                     apr_pool_t *result_pool,
+                     apr_pool_t *scratch_pool)
+{
+  svn_sqlite__stmt_t *stmt;
+  svn_boolean_t have_row;
+  SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+                                STMT_SELECT_ACTUAL_PROPS));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
+  SVN_ERR(svn_sqlite__step(&have_row, stmt));
+
+  if (have_row && !svn_sqlite__column_is_null(stmt, 0))
+    SVN_ERR(svn_sqlite__column_properties(actual_props, stmt, 0,
+                                          result_pool, scratch_pool));
+  else
+    *actual_props = NULL; /* Cached when we read that record */
+
+  return svn_error_trace(svn_sqlite__reset(stmt));
+}
+
+/* The body of svn_wc__db_read_inherited_props().  */
 static svn_error_t *
-db_read_inherited_props(apr_array_header_t **iprops,
+db_read_inherited_props(apr_array_header_t **inherited_props,
+                        apr_hash_t **actual_props,
                         svn_wc__db_wcroot_t *wcroot,
                         const char *local_relpath,
                         const char *propname,
@@ -9641,81 +9674,152 @@ db_read_inherited_props(apr_array_header
 {
   int i;
   apr_array_header_t *cached_iprops = NULL;
-  const char *parent_relpath = local_relpath;
-  svn_boolean_t is_wc_root = FALSE;
+  apr_array_header_t *iprops;
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+  svn_sqlite__stmt_t *stmt;
+  const char *relpath;
+  const char *expected_parent_repos_relpath = NULL;
+  const char *parent_relpath;
 
-  *iprops = apr_array_make(result_pool, 1,
+  iprops = apr_array_make(result_pool, 1,
                            sizeof(svn_prop_inherited_item_t *));
+  *inherited_props = iprops;
+
+  if (actual_props)
+    *actual_props = NULL;
+
+  SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+                                    STMT_SELECT_NODE_INFO));
+
+  relpath = local_relpath;
 
   /* Walk up to the root of the WC looking for inherited properties.  When we
      reach the WC root also check for cached inherited properties. */
-  while (TRUE)
+  for (relpath = local_relpath; relpath; relpath = parent_relpath)
     {
-      apr_hash_t *actual_props;
-      svn_boolean_t is_switched;
+      svn_boolean_t have_row;
+      int op_depth;
+      svn_wc__db_status_t status;
+      apr_hash_t *node_props;
+
+      parent_relpath = relpath[0] ? svn_relpath_dirname(relpath, scratch_pool)
+                                  : NULL;
 
       svn_pool_clear(iterpool);
 
-      if (*parent_relpath == '\0')
+      SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, relpath));
+
+      SVN_ERR(svn_sqlite__step(&have_row, stmt));
+
+      if (!have_row)
+        return svn_error_createf(
+                    SVN_ERR_WC_PATH_NOT_FOUND, svn_sqlite__reset(stmt),
+                    _("The node '%s' was not found."),
+                    path_for_error_message(wcroot, relpath,
+                                           scratch_pool));
+
+      op_depth = svn_sqlite__column_int(stmt, 0);
+
+      status = svn_sqlite__column_token(stmt, 3, presence_map);
+
+      if (status != svn_wc__db_status_normal
+          && status != svn_wc__db_status_incomplete)
+        return svn_error_createf(
+                    SVN_ERR_WC_PATH_UNEXPECTED_STATUS, svn_sqlite__reset(stmt),
+                    _("The node '%s' has a status that has no properties."),
+                    path_for_error_message(wcroot, relpath,
+                                           scratch_pool));
+
+      if (op_depth > 0)
         {
-          is_switched = FALSE;
-          is_wc_root = TRUE;
+          /* WORKING node. Nothing to check */
         }
-      else
-        SVN_ERR(db_is_switched(&is_switched, NULL, wcroot, parent_relpath,
-                               scratch_pool));
+      else if (expected_parent_repos_relpath)
+        {
+          const char *repos_relpath = svn_sqlite__column_text(stmt, 2, NULL);
 
-      if (is_switched || is_wc_root)
+          if (strcmp(expected_parent_repos_relpath, repos_relpath) != 0)
+            {
+              /* The child of this node has a different parent than this node
+                 (It is "switched"), so we can stop here. Note that switched
+                 with the same parent is not interesting for us here. */
+              SVN_ERR(svn_sqlite__reset(stmt));
+              break;
+            }
+
+          expected_parent_repos_relpath =
+              svn_relpath_dirname(expected_parent_repos_relpath, scratch_pool);
+        }
+      else
         {
-          is_wc_root = TRUE;
+          const char *repos_relpath = svn_sqlite__column_text(stmt, 2, NULL);
+
+          expected_parent_repos_relpath =
+              svn_relpath_dirname(repos_relpath, scratch_pool);
+        }
 
-          /* If the WC root is also the root of the repository then by
-             definition there are no inheritable properties to be had,
-             but checking for that is just as expensive as fetching them
-             anyway. */
+      if (op_depth == 0
+          && !svn_sqlite__column_is_null(stmt, 16))
+        {
+          /* The node contains a cache. No reason to look further */
+          SVN_ERR(svn_sqlite__column_iprops(&cached_iprops, stmt, 16,
+                                            result_pool, iterpool));
 
-          /* Grab the cached inherited properties for the WC root. */
-          SVN_ERR(db_read_cached_iprops(&cached_iprops,
-                                        wcroot, parent_relpath,
-                                        result_pool, iterpool));
+          parent_relpath = NULL; /* Stop after this */
         }
 
-      /* If PARENT_ABSPATH is a true parent of LOCAL_ABSPATH, then
-         LOCAL_ABSPATH can inherit properties from it. */
-      if (strcmp(local_relpath, parent_relpath) != 0)
+      SVN_ERR(svn_sqlite__column_properties(&node_props, stmt, 14,
+                                            iterpool, iterpool));
+
+      SVN_ERR(svn_sqlite__reset(stmt));
+
+      /* If PARENT_ABSPATH is a parent of LOCAL_ABSPATH, then LOCAL_ABSPATH
+         can inherit properties from it. */
+      if (relpath != local_relpath)
         {
-          SVN_ERR(db_read_props(&actual_props, wcroot, parent_relpath,
-                                result_pool, iterpool));
+          apr_hash_t *changed_props;
 
-          if (actual_props)
+          SVN_ERR(db_get_changed_props(&changed_props, wcroot, relpath,
+                                       result_pool, iterpool));
+
+          if (changed_props)
+            node_props = changed_props;
+          else if (node_props)
+            node_props = svn_prop_hash_dup(node_props, result_pool);
+
+          if (node_props && apr_hash_count(node_props))
             {
               /* If we only want PROPNAME filter out any other properties. */
               if (propname)
-                filter_unwanted_props(actual_props, propname, iterpool);
+                filter_unwanted_props(node_props, propname, iterpool);
 
-              if (apr_hash_count(actual_props))
+              if (apr_hash_count(node_props))
                 {
                   svn_prop_inherited_item_t *iprop_elt =
                     apr_pcalloc(result_pool,
                                 sizeof(svn_prop_inherited_item_t));
                   iprop_elt->path_or_url = svn_dirent_join(wcroot->abspath,
-                                                           parent_relpath,
+                                                           relpath,
                                                            result_pool);
 
-                  iprop_elt->prop_hash = actual_props;
+                  iprop_elt->prop_hash = node_props;
                   /* Build the output array in depth-first order. */
-                  svn_sort__array_insert(&iprop_elt, *iprops, 0);
+                  svn_sort__array_insert(&iprop_elt, iprops, 0);
                 }
             }
         }
+      else if (actual_props)
+        {
+          apr_hash_t *changed_props;
 
-      /* Inheritance only goes as far as the nearest WC root. */
-      if (is_wc_root)
-        break;
+          SVN_ERR(db_get_changed_props(&changed_props, wcroot, relpath,
+                                       result_pool, iterpool));
 
-      /* Keep looking for the WC root. */
-      parent_relpath = svn_relpath_dirname(parent_relpath, scratch_pool);
+          if (changed_props)
+            *actual_props = changed_props;
+          else if (node_props)
+            *actual_props = svn_prop_hash_dup(node_props, result_pool);
+        }
     }
 
   if (cached_iprops)
@@ -9736,16 +9840,20 @@ db_read_inherited_props(apr_array_header
 
           /* If we didn't filter everything then keep this iprop. */
           if (apr_hash_count(cached_iprop->prop_hash))
-            svn_sort__array_insert(&cached_iprop, *iprops, 0);
+            svn_sort__array_insert(&cached_iprop, iprops, 0);
         }
     }
 
+  if (actual_props && !*actual_props)
+    *actual_props = apr_hash_make(result_pool);
+
   svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;
 }
 
 svn_error_t *
 svn_wc__db_read_inherited_props(apr_array_header_t **iprops,
+                                apr_hash_t **actual_props,
                                 svn_wc__db_t *db,
                                 const char *local_abspath,
                                 const char *propname,
@@ -9762,7 +9870,7 @@ svn_wc__db_read_inherited_props(apr_arra
                                                 scratch_pool, scratch_pool));
   VERIFY_USABLE_WCROOT(wcroot);
 
-  SVN_WC__DB_WITH_TXN(db_read_inherited_props(iprops,
+  SVN_WC__DB_WITH_TXN(db_read_inherited_props(iprops, actual_props,
                                               wcroot, local_relpath, propname,
                                               result_pool, scratch_pool),
                       wcroot);

Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.h?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.h Sun Mar 10 05:19:03 2013
@@ -2120,11 +2120,15 @@ svn_wc__db_read_pristine_props(apr_hash_
  * paths relative to the repository root URL for cached inherited
  * properties and absolute working copy paths otherwise.
  *
+ * If ACTUAL_PROPS is not NULL, then set *ACTUAL_PROPS to the actual
+ * properties stored on LOCAL_ABSPATH.
+ *
  * Allocate @a *iprops in @a result_pool.  Use @a scratch_pool
  * for temporary allocations.
  */
 svn_error_t *
 svn_wc__db_read_inherited_props(apr_array_header_t **iprops,
+                                apr_hash_t **actual_props,
                                 svn_wc__db_t *db,
                                 const char *local_abspath,
                                 const char *propname,

Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/workqueue.c?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/workqueue.c Sun Mar 10 05:19:03 2013
@@ -673,19 +673,25 @@ svn_wc__wq_build_file_install(svn_skel_t
                               apr_pool_t *scratch_pool)
 {
   const char *local_relpath;
+  const char *wri_abspath;
   *work_item = svn_skel__make_empty_list(result_pool);
 
+  /* Use the directory of the file to install as wri_abspath to avoid
+     filestats on just obtaining the wc-root */
+  wri_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
+
   /* If a SOURCE_ABSPATH was provided, then put it into the skel. If this
-     value is not provided, then the file's pristine contents will be used.  */
+     value is not provided, then the file's pristine contents will be used. */
   if (source_abspath != NULL)
     {
-      SVN_ERR(svn_wc__db_to_relpath(&local_relpath, db, local_abspath,
-                                    source_abspath, result_pool, scratch_pool));
+      SVN_ERR(svn_wc__db_to_relpath(&local_relpath, db, wri_abspath,
+                                    source_abspath,
+                                    result_pool, scratch_pool));
 
       svn_skel__prepend_str(local_relpath, *work_item, result_pool);
     }
 
-  SVN_ERR(svn_wc__db_to_relpath(&local_relpath, db, local_abspath,
+  SVN_ERR(svn_wc__db_to_relpath(&local_relpath, db, wri_abspath,
                                 local_abspath, result_pool, scratch_pool));
 
   svn_skel__prepend_int(record_fileinfo, *work_item, result_pool);

Modified: subversion/branches/fsfs-format7/subversion/mod_dav_svn/liveprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/mod_dav_svn/liveprops.c?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/branches/fsfs-format7/subversion/mod_dav_svn/liveprops.c Sun Mar 10 05:19:03 2013
@@ -436,7 +436,8 @@ insert_prop_internal(const dav_resource 
         svn_filesize_t len = 0;
 
         /* our property, but not defined on collection resources */
-        if (resource->collection || resource->baselined)
+        if (resource->type == DAV_RESOURCE_TYPE_ACTIVITY
+            || resource->collection || resource->baselined)
           return DAV_PROP_INSERT_NOTSUPP;
 
         serr = svn_fs_file_length(&len, resource->info->root.root,
@@ -466,7 +467,9 @@ insert_prop_internal(const dav_resource 
         svn_string_t *pval;
         const char *mime_type = NULL;
 
-        if (resource->baselined && resource->type == DAV_RESOURCE_TYPE_VERSION)
+        if (resource->type == DAV_RESOURCE_TYPE_ACTIVITY
+            || (resource->baselined
+                && resource->type == DAV_RESOURCE_TYPE_VERSION))
           return DAV_PROP_INSERT_NOTSUPP;
 
         if (resource->type == DAV_RESOURCE_TYPE_PRIVATE

Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/basic_tests.py?rev=1454792&r1=1454791&r2=1454792&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/basic_tests.py Sun Mar 10 05:19:03 2013
@@ -3016,7 +3016,39 @@ def delete_conflicts_one_of_many(sbox):
   verify_file_deleted("failed to remove conflict file",
                       sbox.ospath('A/D/G/rho.mine'))
 
-
+@Issue(3231)
+@XFail()
+def peg_rev_on_non_existent_wc_path(sbox):
+  """peg rev resolution on non-existent wc paths"""
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # setup some history
+  sbox.simple_move('A', 'A2')
+  sbox.simple_move('A2/mu', 'A2/mu2')
+  open(sbox.ospath('A2/mu2'), 'w').write('r2\n')
+  sbox.simple_commit(message='r2')
+  #
+  sbox.simple_move('A2/mu2', 'A2/mu3')
+  sbox.simple_move('A2', 'A3')
+  open(sbox.ospath('A3/mu3'), 'w').write('r3\n')
+  sbox.simple_commit(message='r3')
+  #
+  sbox.simple_move('A3/mu3', 'A3/mu4')
+  open(sbox.ospath('A3/mu4'), 'w').write('r4\n')
+  sbox.simple_move('A3', 'A4')
+  sbox.simple_commit(message='r4')
+
+  # test something.
+  sbox.simple_update()
+  # This currently fails with ENOENT on A/mu3.
+  svntest.actions.run_and_verify_svn(None, ['r2\n'], [], 
+                                     'cat', '-r2', sbox.ospath('A3/mu3') + '@3')
+  os.chdir(sbox.ospath('A4'))
+  svntest.actions.run_and_verify_svn(None, ['r2\n'], [], 
+                                     'cat', '-r2', sbox.ospath('mu3') + '@3')
+  
 ########################################################################
 # Run the tests
 
@@ -3084,6 +3116,7 @@ test_list = [ None,
               quiet_commits,
               rm_missing_with_case_clashing_ondisk_item,
               delete_conflicts_one_of_many,
+              peg_rev_on_non_existent_wc_path,
              ]
 
 if __name__ == '__main__':