You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2012/12/21 01:46:49 UTC

svn commit: r1424778 [1/3] - in /subversion/branches/in-repo-authz: ./ build/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_ra/ subversion/libsvn_subr/ subversion/libsvn_wc/ subversion/svn/ subversion/svnrd...

Author: breser
Date: Fri Dec 21 00:46:48 2012
New Revision: 1424778

URL: http://svn.apache.org/viewvc?rev=1424778&view=rev
Log:
Sync the 'in-repo-authz' branch with recent trunk changes.
(Merged /subversion/trunk:r1423749-r1424776.)


Modified:
    subversion/branches/in-repo-authz/   (props changed)
    subversion/branches/in-repo-authz/CHANGES
    subversion/branches/in-repo-authz/build/run_tests.py
    subversion/branches/in-repo-authz/configure.ac
    subversion/branches/in-repo-authz/get-deps.sh
    subversion/branches/in-repo-authz/subversion/include/private/svn_mergeinfo_private.h
    subversion/branches/in-repo-authz/subversion/include/private/svn_skel.h
    subversion/branches/in-repo-authz/subversion/include/private/svn_sqlite.h
    subversion/branches/in-repo-authz/subversion/include/svn_cmdline.h
    subversion/branches/in-repo-authz/subversion/include/svn_mergeinfo.h
    subversion/branches/in-repo-authz/subversion/include/svn_ra.h
    subversion/branches/in-repo-authz/subversion/include/svn_wc.h
    subversion/branches/in-repo-authz/subversion/libsvn_client/add.c
    subversion/branches/in-repo-authz/subversion/libsvn_client/client.h
    subversion/branches/in-repo-authz/subversion/libsvn_client/commit.c
    subversion/branches/in-repo-authz/subversion/libsvn_client/deprecated.c
    subversion/branches/in-repo-authz/subversion/libsvn_client/diff.c
    subversion/branches/in-repo-authz/subversion/libsvn_client/externals.c
    subversion/branches/in-repo-authz/subversion/libsvn_client/iprops.c
    subversion/branches/in-repo-authz/subversion/libsvn_client/merge.c
    subversion/branches/in-repo-authz/subversion/libsvn_client/patch.c
    subversion/branches/in-repo-authz/subversion/libsvn_client/prop_commands.c
    subversion/branches/in-repo-authz/subversion/libsvn_client/repos_diff.c
    subversion/branches/in-repo-authz/subversion/libsvn_client/switch.c
    subversion/branches/in-repo-authz/subversion/libsvn_client/update.c
    subversion/branches/in-repo-authz/subversion/libsvn_ra/ra_loader.c
    subversion/branches/in-repo-authz/subversion/libsvn_subr/cmdline.c
    subversion/branches/in-repo-authz/subversion/libsvn_subr/deprecated.c
    subversion/branches/in-repo-authz/subversion/libsvn_subr/mergeinfo.c
    subversion/branches/in-repo-authz/subversion/libsvn_subr/opt.c
    subversion/branches/in-repo-authz/subversion/libsvn_subr/skel.c
    subversion/branches/in-repo-authz/subversion/libsvn_subr/sqlite.c
    subversion/branches/in-repo-authz/subversion/libsvn_wc/adm_ops.c
    subversion/branches/in-repo-authz/subversion/libsvn_wc/deprecated.c
    subversion/branches/in-repo-authz/subversion/libsvn_wc/props.c
    subversion/branches/in-repo-authz/subversion/libsvn_wc/props.h
    subversion/branches/in-repo-authz/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/in-repo-authz/subversion/libsvn_wc/wc_db.c
    subversion/branches/in-repo-authz/subversion/libsvn_wc/wc_db.h
    subversion/branches/in-repo-authz/subversion/libsvn_wc/wc_db_update_move.c
    subversion/branches/in-repo-authz/subversion/svn/copy-cmd.c
    subversion/branches/in-repo-authz/subversion/svn/help-cmd.c
    subversion/branches/in-repo-authz/subversion/svn/svn.c
    subversion/branches/in-repo-authz/subversion/svnrdump/svnrdump.c
    subversion/branches/in-repo-authz/subversion/svnsync/svnsync.c
    subversion/branches/in-repo-authz/subversion/tests/cmdline/basic_tests.py
    subversion/branches/in-repo-authz/subversion/tests/cmdline/commit_tests.py
    subversion/branches/in-repo-authz/subversion/tests/cmdline/diff_tests.py
    subversion/branches/in-repo-authz/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
    subversion/branches/in-repo-authz/subversion/tests/cmdline/merge_authz_tests.py
    subversion/branches/in-repo-authz/subversion/tests/cmdline/merge_reintegrate_tests.py
    subversion/branches/in-repo-authz/subversion/tests/cmdline/merge_tests.py
    subversion/branches/in-repo-authz/subversion/tests/cmdline/merge_tree_conflict_tests.py
    subversion/branches/in-repo-authz/subversion/tests/cmdline/revert_tests.py
    subversion/branches/in-repo-authz/subversion/tests/cmdline/svntest/main.py
    subversion/branches/in-repo-authz/subversion/tests/cmdline/update_tests.py
    subversion/branches/in-repo-authz/subversion/tests/libsvn_subr/mergeinfo-test.c
    subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/conflict-data-test.c
    subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/utils.c
    subversion/branches/in-repo-authz/tools/dist/release.py
    subversion/branches/in-repo-authz/tools/server-side/fsfs-reorg.c
    subversion/branches/in-repo-authz/tools/server-side/fsfs-stats.c
    subversion/branches/in-repo-authz/tools/server-side/svnpubsub/commit-hook.py
    subversion/branches/in-repo-authz/tools/server-side/svnpubsub/irkerbridge.py
    subversion/branches/in-repo-authz/tools/server-side/svnpubsub/svnpubsub/client.py
    subversion/branches/in-repo-authz/tools/server-side/svnpubsub/svnpubsub/server.py
    subversion/branches/in-repo-authz/tools/server-side/svnpubsub/svntweet.py   (props changed)

Propchange: subversion/branches/in-repo-authz/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1423749-1424776

Modified: subversion/branches/in-repo-authz/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/CHANGES?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/CHANGES (original)
+++ subversion/branches/in-repo-authz/CHANGES Fri Dec 21 00:46:48 2012
@@ -34,6 +34,7 @@ http://svn.apache.org/repos/asf/subversi
     * 'svndumpfilter' now supports --delta dumpfiles (r1351009, -3745)
     * client version info now reported to commit hooks (issue #4124)
     * 'svn merge' now uses reintegrate mode automatically when needed
+    * 'svn' is now non-interactive when not run in a terminal device (r1424037)
 
   - Client-side bugfixes:
     *

Modified: subversion/branches/in-repo-authz/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/build/run_tests.py?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/build/run_tests.py (original)
+++ subversion/branches/in-repo-authz/build/run_tests.py Fri Dec 21 00:46:48 2012
@@ -565,11 +565,11 @@ class TestHarness:
     progdir, progbase = os.path.split(prog)
     if self.log:
       # Using write here because we don't want even a trailing space
-      test_info = '%s [%d/%d]' % (progbase, test_nr + 1, total_tests)
+      test_info = '[%02d/%d] %s' % (test_nr + 1, total_tests, progbase)
       if self.list_tests:
         sys.stdout.write('Listing tests in %s' % (test_info, ))
       else:
-        sys.stdout.write('Running tests in %s' % (test_info, ))
+        sys.stdout.write('%s' % (test_info, ))
       sys.stdout.flush()
     else:
       # ### Hack for --log-to-stdout to work (but not print any dots).
@@ -589,7 +589,6 @@ class TestHarness:
     line_length = _get_term_width()
     dots_needed = line_length \
                     - len(test_info) \
-                    - len('Running tests in ') \
                     - len('success')
     try:
       os.chdir(progdir)

Modified: subversion/branches/in-repo-authz/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/configure.ac?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/configure.ac (original)
+++ subversion/branches/in-repo-authz/configure.ac Fri Dec 21 00:46:48 2012
@@ -148,7 +148,7 @@ SVN_FIND_APACHE(20020903)
 
 dnl Search for SQLite
 SQLITE_MINIMUM_VER="3.7.12"
-SQLITE_RECOMMENDED_VER="3.7.15"
+SQLITE_RECOMMENDED_VER="3.7.15.1"
 SQLITE_URL="http://www.sqlite.org/sqlite-amalgamation-$(printf %d%02d%02d%02d $(echo ${SQLITE_RECOMMENDED_VER} | sed -e 's/\./ /g')).zip"
 
 SVN_LIB_SQLITE(${SQLITE_MINIMUM_VER}, ${SQLITE_RECOMMENDED_VER},

Modified: subversion/branches/in-repo-authz/get-deps.sh
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/get-deps.sh?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/get-deps.sh (original)
+++ subversion/branches/in-repo-authz/get-deps.sh Fri Dec 21 00:46:48 2012
@@ -27,7 +27,7 @@ APR=apr-1.4.6
 APR_UTIL=apr-util-1.5.1
 SERF=serf-1.1.1
 ZLIB=zlib-1.2.7
-SQLITE_VERSION=3.7.15
+SQLITE_VERSION=3.7.15.1
 SQLITE=sqlite-amalgamation-$(printf %d%02d%02d%02d $(echo $SQLITE_VERSION | sed -e 's/\./ /g'))
 
 HTTPD=httpd-2.4.3

Modified: subversion/branches/in-repo-authz/subversion/include/private/svn_mergeinfo_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/private/svn_mergeinfo_private.h?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/private/svn_mergeinfo_private.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/private/svn_mergeinfo_private.h Fri Dec 21 00:46:48 2012
@@ -50,12 +50,21 @@ svn_rangelist__set_inheritance(svn_range
  * R1 >= R2 in a "R1-R2" range element).
  *
  * Unlike svn_mergeinfo_parse(), this does not sort the ranges into order
- * or combine adjacent and overlapping ranges. */
+ * or combine adjacent and overlapping ranges.
+ *
+ * The compaction can be done with svn_rangelist__combine_adjacent_ranges().
+ */
 svn_error_t *
 svn_rangelist__parse(svn_rangelist_t **rangelist,
                      const char *str,
                      apr_pool_t *result_pool);
 
+/* In-place combines adjacent ranges in a rangelist.
+   SCRATCH_POOL is just used for providing error messages. */
+svn_error_t *
+svn_rangelist__combine_adjacent_ranges(svn_rangelist_t *rangelist,
+                                       apr_pool_t *scratch_pool);
+
 /* Set inheritability of all rangelists in MERGEINFO to INHERITABLE.
    If MERGEINFO is NULL do nothing.  If a rangelist in MERGEINFO is
    NULL leave it alone. */

Modified: subversion/branches/in-repo-authz/subversion/include/private/svn_skel.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/private/svn_skel.h?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/private/svn_skel.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/private/svn_skel.h Fri Dec 21 00:46:48 2012
@@ -226,7 +226,8 @@ svn_skel__unparse_proplist(svn_skel_t **
 svn_error_t *
 svn_skel__unparse_iproplist(svn_skel_t **skel_p,
                             const apr_array_header_t *inherited_props,
-                            apr_pool_t *result_pool);
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool);
 
 #ifdef __cplusplus
 }

Modified: subversion/branches/in-repo-authz/subversion/include/private/svn_sqlite.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/private/svn_sqlite.h?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/private/svn_sqlite.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/private/svn_sqlite.h Fri Dec 21 00:46:48 2012
@@ -389,6 +389,10 @@ svn_sqlite__begin_transaction(svn_sqlite
 svn_error_t *
 svn_sqlite__begin_immediate_transaction(svn_sqlite__db_t *db);
 
+/* Begin a savepoint in DB. */
+svn_error_t *
+svn_sqlite__begin_savepoint(svn_sqlite__db_t *db);
+
 /* Commit the current transaction in DB if ERR is SVN_NO_ERROR, otherwise
  * roll back the transaction.  Return a composition of ERR and any error
  * that may occur during the commit or roll-back. */
@@ -396,6 +400,13 @@ svn_error_t *
 svn_sqlite__finish_transaction(svn_sqlite__db_t *db,
                                svn_error_t *err);
 
+/* Release the current savepoint in DB if EXPR is SVN_NO_ERROR, otherwise
+ * roll back to the savepoint and then release it.  Return a composition of
+ * ERR and any error that may occur during the release or roll-back. */
+svn_error_t *
+svn_sqlite__finish_savepoint(svn_sqlite__db_t *db,
+                             svn_error_t *err);
+
 /* Evaluate the expression EXPR within a transaction.
  *
  * Begin a transaction in DB; evaluate the expression EXPR, which would
@@ -447,6 +458,23 @@ svn_sqlite__with_immediate_transaction(s
                                        void *cb_baton,
                                        apr_pool_t *scratch_pool);
 
+/* Evaluate the expression EXPR within a 'savepoint'.  Savepoints can be
+ * nested.
+ *
+ * Begin a savepoint in DB; evaluate the expression EXPR, which would
+ * typically be a function call that does some work in DB; finally release
+ * the savepoint if EXPR evaluated to SVN_NO_ERROR, otherwise roll back
+ * to the savepoint and then release it.
+ */
+#define SVN_SQLITE__WITH_LOCK(expr, db)                                       \
+  do {                                                                        \
+    svn_sqlite__db_t *svn_sqlite__db = (db);                                  \
+    svn_error_t *svn_sqlite__err;                                             \
+                                                                              \
+    SVN_ERR(svn_sqlite__begin_savepoint(svn_sqlite__db));                     \
+    svn_sqlite__err = (expr);                                                 \
+    SVN_ERR(svn_sqlite__finish_savepoint(svn_sqlite__db, svn_sqlite__err));   \
+  } while (0)
 
 /* Helper function to handle several SQLite operations inside a shared lock.
    This callback is similar to svn_sqlite__with_transaction(), but can be

Modified: subversion/branches/in-repo-authz/subversion/include/svn_cmdline.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/svn_cmdline.h?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/svn_cmdline.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/svn_cmdline.h Fri Dec 21 00:46:48 2012
@@ -381,6 +381,15 @@ svn_cmdline__getopt_init(apr_getopt_t **
                          const char *argv[],
                          apr_pool_t *pool);
 
+/* Determine whether interactive mode should be enabled, based on whether
+ * the user passed the --non-interactive or --force-interactive options.
+ * If neither option was passed, interactivity is enabled if standard
+ * input is connected to a terminal device.
+ * @since New in 1.8. */
+svn_boolean_t
+svn_cmdline__be_interactive(svn_boolean_t non_interactive,
+                            svn_boolean_t force_interactive);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/in-repo-authz/subversion/include/svn_mergeinfo.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/svn_mergeinfo.h?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/svn_mergeinfo.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/svn_mergeinfo.h Fri Dec 21 00:46:48 2012
@@ -315,6 +315,9 @@ svn_rangelist_diff(svn_rangelist_t **del
  * in sorted order and be compacted to the minimal number of ranges
  * needed to represent the merged result.
  *
+ * If the original rangelisted contain non collapsed adjacent ranges, the
+ * final result is not guaranteed to be compacted either.
+ *
  * Use @a scratch_pool for temporary allocations.
  *
  * @since New in 1.8.
@@ -331,6 +334,9 @@ svn_rangelist_merge2(svn_rangelist_t *ra
  * in place. If not used carefully, this function can use up a lot of memory
  * if called in a loop.
  *
+ * It performs an extra adjacent range compaction round to make sure non
+ * collapsed input ranges are compacted in the result.
+ *
  * @since New in 1.5.
  * @deprecated Provided for backward compatibility with the 1.7 API.
  */

Modified: subversion/branches/in-repo-authz/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/svn_ra.h?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/svn_ra.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/svn_ra.h Fri Dec 21 00:46:48 2012
@@ -1930,6 +1930,12 @@ svn_ra_get_deleted_rev(svn_ra_session_t 
  * inheritable properties are found, then set @a *inherited_props to
  * an empty array.
  *
+ * If @a use_relpath_keys is true, then the
+ * #svn_prop_inherited_item_t->path_or_url members of the
+ * #svn_prop_inherited_item_t * structures in @a *inherited_props are
+ * paths relative to the repository root URL (of the repository which
+ * @a ra_session is associated).  Otherwise these members are URLs.
+ *
  * Allocated @a *inherited_props in @a result_pool, use @a scratch_pool
  * for temporary allocations.
  *
@@ -1940,6 +1946,7 @@ svn_ra_get_inherited_props(svn_ra_sessio
                            apr_array_header_t **inherited_props,
                            const char *path,
                            svn_revnum_t revision,
+                           svn_boolean_t use_relpath_keys,
                            apr_pool_t *result_pool,
                            apr_pool_t *scratch_pool);
 

Modified: subversion/branches/in-repo-authz/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/svn_wc.h?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/svn_wc.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/svn_wc.h Fri Dec 21 00:46:48 2012
@@ -4528,7 +4528,16 @@ svn_wc_delete(const char *path,
 
 /**
  * Schedule the single node that exists on disk at @a local_abspath for
- * addition to the working copy.  The added node will have no properties.
+ * addition to the working copy.  The added node will have the properties
+ * provided in @a props, or none if that is NULL.
+ *
+ * Check and canonicalize the properties in the same way as
+ * svn_wc_prop_set4().  Return an error and don't add the node if the
+ * properties are not valid on this node.  Unlike svn_wc_prop_set4()
+ * there is no option to skip some of the checks and canonicalizations.
+ *
+ * ### The error code on validity check failure should be specified, and
+ *     preferably should be a single code.
  *
  * The versioned state of the parent path must be a modifiable directory,
  * and the versioned state of @a local_abspath must be either nonexistent or
@@ -4537,14 +4546,28 @@ svn_wc_delete(const char *path,
  * If @a local_abspath does not exist as file, directory or symlink, return
  * #SVN_ERR_WC_PATH_NOT_FOUND.
  *
- * This is a replacement for svn_wc_add4() case 2a.
+ * ### TODO: Split into add_dir, add_file, add_symlink?
  *
- * ### TODO: Allow the caller to provide the node's properties?
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_wc_add_from_disk2(svn_wc_context_t *wc_ctx,
+                      const char *local_abspath,
+                      const apr_hash_t *props,
+                      svn_wc_notify_func2_t notify_func,
+                      void *notify_baton,
+                      apr_pool_t *scratch_pool);
+
+
+/**
+ * Similar to svn_wc_add4(), but gives the new node an empty set of properties.
  *
- * ### TODO: Split into add_dir, add_file, add_symlink?
+ * This is a replacement for svn_wc_add4() case 2a.
  *
  * @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.7 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_wc_add_from_disk(svn_wc_context_t *wc_ctx,
                      const char *local_abspath,

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/add.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/add.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/add.c Fri Dec 21 00:46:48 2012
@@ -275,7 +275,6 @@ add_file(const char *local_abspath,
          apr_pool_t *pool)
 {
   apr_hash_t *properties;
-  apr_hash_index_t *hi;
   const char *mimetype;
   svn_node_kind_t kind;
   svn_boolean_t is_special;
@@ -283,10 +282,7 @@ add_file(const char *local_abspath,
   /* Check to see if this is a special file. */
   SVN_ERR(svn_io_check_special_path(local_abspath, &kind, &is_special, pool));
 
-  /* Add the file */
-  SVN_ERR(svn_wc_add_from_disk(ctx->wc_ctx, local_abspath,
-                               NULL, NULL, pool));
-
+  /* Determine the properties that the file should have */
   if (is_special)
     {
       mimetype = NULL;
@@ -320,47 +316,9 @@ add_file(const char *local_abspath,
                                                pool));
     }
 
-  /* loop through the hashtable and add the properties */
-  for (hi = apr_hash_first(pool, properties);
-       hi != NULL; hi = apr_hash_next(hi))
-    {
-      const char *pname = svn__apr_hash_index_key(hi);
-      const svn_string_t *pval = svn__apr_hash_index_val(hi);
-      svn_error_t *err;
-
-      /* It's probably best to pass 0 for force, so that if
-         the autoprops say to set some weird combination,
-         we just error and let the user sort it out. */
-      err = svn_wc_prop_set4(ctx->wc_ctx, local_abspath, pname, pval,
-                             svn_depth_empty, FALSE, NULL,
-                             NULL, NULL /* cancellation */,
-                             NULL, NULL /* notification */,
-                             pool);
-      if (err)
-        {
-          /* Don't leave the job half-done. If we fail to set a property,
-           * (try to) un-add the file. */
-          return svn_error_compose_create(
-                   err,
-                   svn_wc_revert4(ctx->wc_ctx,
-                                  local_abspath,
-                                  svn_depth_empty,
-                                  FALSE /* use_commit_times */,
-                                  NULL /* changelists */,
-                                  NULL, NULL, NULL, NULL,
-                                  pool));
-        }
-    }
-
-  /* Report the addition to the caller. */
-  if (ctx->notify_func2 != NULL)
-    {
-      svn_wc_notify_t *notify = svn_wc_create_notify(local_abspath,
-                                                     svn_wc_notify_add, pool);
-      notify->kind = svn_node_file;
-      notify->mime_type = mimetype;
-      (*ctx->notify_func2)(ctx->notify_baton2, notify, pool);
-    }
+  /* Add the file */
+  SVN_ERR(svn_wc_add_from_disk2(ctx->wc_ctx, local_abspath, properties,
+                                ctx->notify_func2, ctx->notify_baton2, pool));
 
   return SVN_NO_ERROR;
 }
@@ -425,9 +383,9 @@ add_dir_recursive(const char *dir_abspat
                                         iterpool));
 
   /* Add this directory to revision control. */
-  err = svn_wc_add_from_disk(ctx->wc_ctx, dir_abspath,
-                             ctx->notify_func2, ctx->notify_baton2,
-                             iterpool);
+  err = svn_wc_add_from_disk2(ctx->wc_ctx, dir_abspath, NULL /*props*/,
+                              ctx->notify_func2, ctx->notify_baton2,
+                              iterpool);
   if (err)
     {
       if (err->apr_err == SVN_ERR_ENTRY_EXISTS && force)
@@ -1009,9 +967,10 @@ add(const char *local_abspath,
                                      parent_abspath, local_abspath);
 
           SVN_ERR(svn_io_make_dir_recursively(parent_abspath, scratch_pool));
-          SVN_ERR(svn_wc_add_from_disk(ctx->wc_ctx, parent_abspath,
-                                       ctx->notify_func2, ctx->notify_baton2,
-                                       scratch_pool));
+          SVN_ERR(svn_wc_add_from_disk2(ctx->wc_ctx, parent_abspath,
+                                        NULL /*props*/,
+                                        ctx->notify_func2, ctx->notify_baton2,
+                                        scratch_pool));
         }
       svn_pool_destroy(iterpool);
     }

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/client.h?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/client.h (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/client.h Fri Dec 21 00:46:48 2012
@@ -653,7 +653,10 @@ svn_client__list_internal(const char *pa
    as any WC roots under LOCAL_ABSPATH (as limited by DEPTH) using
    RA_SESSION.  Store the results in *WCROOT_IPROPS, a hash mapping
    const char * absolute working copy paths to depth-first ordered arrays
-   of svn_prop_inherited_item_t * structures.
+   of svn_prop_inherited_item_t * structures.  If WANT_RELPATH_KEYS is true,
+   then any svn_prop_inherited_item_t->path_or_url members returned in
+   *WCROOT_IPROPS are repository relative paths, otherwise these members are
+   URLs.
 
    If LOCAL_ABSPATH has no base then do nothing.
 
@@ -668,6 +671,7 @@ svn_client__get_inheritable_props(apr_ha
                                   const char *local_abspath,
                                   svn_revnum_t revision,
                                   svn_depth_t depth,
+                                  svn_boolean_t use_relpath_keys,
                                   svn_ra_session_t *ra_session,
                                   svn_client_ctx_t *ctx,
                                   apr_pool_t *result_pool,

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/commit.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/commit.c Fri Dec 21 00:46:48 2012
@@ -1028,25 +1028,3 @@ svn_client_commit6(const apr_array_heade
   return svn_error_trace(reconcile_errors(cmt_err, unlock_err, bump_err,
                                           pool));
 }
-
-svn_error_t *
-svn_client_commit5(const apr_array_header_t *targets,
-                   svn_depth_t depth,
-                   svn_boolean_t keep_locks,
-                   svn_boolean_t keep_changelists,
-                   svn_boolean_t commit_as_operations,
-                   const apr_array_header_t *changelists,
-                   const apr_hash_t *revprop_table,
-                   svn_commit_callback2_t commit_callback,
-                   void *commit_baton,
-                   svn_client_ctx_t *ctx,
-                   apr_pool_t *pool)
-{
-  return svn_client_commit6(targets, depth, keep_locks, keep_changelists,
-                            commit_as_operations,
-                            TRUE,  /* include_file_externals */
-                            FALSE, /* include_dir_externals */
-                            changelists, revprop_table, commit_callback,
-                            commit_baton, ctx, pool);
-}
-

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/deprecated.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/deprecated.c Fri Dec 21 00:46:48 2012
@@ -512,6 +512,26 @@ downgrade_commit_copied_notify_func(void
     b->orig_notify_func2(b->orig_notify_baton2, notify, pool);
 }
 
+svn_error_t *
+svn_client_commit5(const apr_array_header_t *targets,
+                   svn_depth_t depth,
+                   svn_boolean_t keep_locks,
+                   svn_boolean_t keep_changelists,
+                   svn_boolean_t commit_as_operations,
+                   const apr_array_header_t *changelists,
+                   const apr_hash_t *revprop_table,
+                   svn_commit_callback2_t commit_callback,
+                   void *commit_baton,
+                   svn_client_ctx_t *ctx,
+                   apr_pool_t *pool)
+{
+  return svn_client_commit6(targets, depth, keep_locks, keep_changelists,
+                            commit_as_operations,
+                            FALSE,  /* include_file_externals */
+                            FALSE, /* include_dir_externals */
+                            changelists, revprop_table, commit_callback,
+                            commit_baton, ctx, pool);
+}
 
 svn_error_t *
 svn_client_commit4(svn_commit_info_t **commit_info_p,

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/diff.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/diff.c Fri Dec 21 00:46:48 2012
@@ -613,6 +613,8 @@ static svn_error_t *
 diff_props_changed(svn_wc_notify_state_t *state,
                    svn_boolean_t *tree_conflicted,
                    const char *path,
+                   svn_revnum_t rev1,
+                   svn_revnum_t rev2,
                    svn_boolean_t dir_was_added,
                    const apr_array_header_t *propchanges,
                    apr_hash_t *original_props,
@@ -642,8 +644,8 @@ diff_props_changed(svn_wc_notify_state_t
       SVN_ERR(display_prop_diffs(props, original_props, path,
                                  diff_cmd_baton->orig_path_1,
                                  diff_cmd_baton->orig_path_2,
-                                 diff_cmd_baton->revnum1,
-                                 diff_cmd_baton->revnum2,
+                                 rev1,
+                                 rev2,
                                  diff_cmd_baton->header_encoding,
                                  diff_cmd_baton->outstream,
                                  diff_cmd_baton->relative_to_dir,
@@ -686,6 +688,10 @@ diff_dir_props_changed(svn_wc_notify_sta
 
   return svn_error_trace(diff_props_changed(state,
                                             tree_conflicted, path,
+                                            /* ### These revs be filled
+                                             * ### with per node info */
+                                            diff_cmd_baton->revnum1,
+                                            diff_cmd_baton->revnum2,
                                             dir_was_added,
                                             propchanges,
                                             original_props,
@@ -952,7 +958,7 @@ diff_file_changed(svn_wc_notify_state_t 
                                  SVN_INVALID_REVNUM, diff_cmd_baton));
   if (prop_changes->nelts > 0)
     SVN_ERR(diff_props_changed(prop_state, tree_conflicted,
-                               path, FALSE, prop_changes,
+                               path, rev1, rev2, FALSE, prop_changes,
                                original_props, diff_cmd_baton, scratch_pool));
   if (content_state)
     *content_state = svn_wc_notify_state_unknown;
@@ -1025,7 +1031,8 @@ diff_file_added(svn_wc_notify_state_t *c
                                  diff_cmd_baton));
   if (prop_changes->nelts > 0)
     SVN_ERR(diff_props_changed(prop_state, tree_conflicted,
-                               path, FALSE, prop_changes,
+                               path, rev1, rev2,
+                               FALSE, prop_changes,
                                original_props, diff_cmd_baton, scratch_pool));
   if (content_state)
     *content_state = svn_wc_notify_state_unknown;
@@ -1877,6 +1884,8 @@ arbitrary_diff_walker(void *baton, const
                              scratch_pool));
       if (prop_changes->nelts > 0)
         SVN_ERR(diff_props_changed(NULL, NULL, child_relpath,
+                                   b->callback_baton->revnum1,
+                                   b->callback_baton->revnum2,
                                    b->recursing_within_added_subtree,
                                    prop_changes, original_props,
                                    b->callback_baton, scratch_pool));

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/externals.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/externals.c Fri Dec 21 00:46:48 2012
@@ -484,7 +484,8 @@ switch_file_external(const char *local_a
                                               ctx, subpool));
     /* Get the external file's iprops. */
     SVN_ERR(svn_ra_get_inherited_props(ra_session, &inherited_props, "",
-                                       switch_loc->rev, subpool, subpool));
+                                       switch_loc->rev, TRUE,
+                                       subpool, subpool));
 
     SVN_ERR(svn_ra_reparent(ra_session, svn_uri_dirname(url, subpool),
                             subpool));

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/iprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/iprops.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/iprops.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/iprops.c Fri Dec 21 00:46:48 2012
@@ -41,10 +41,12 @@
 /*** Code. ***/
 
 /* Determine if LOCAL_ABSPATH needs an inherited property cache.  If it does,
-   then set *NEEDS_CACHE to TRUE, set it to FALSE otherwise. */
+   then set *NEEDS_CACHE to TRUE, set it to FALSE otherwise.  All other args
+   are as per svn_client__get_inheritable_props(). */
 static svn_error_t *
 need_to_cache_iprops(svn_boolean_t *needs_cache,
                      const char *local_abspath,
+                     svn_ra_session_t *ra_session,
                      svn_client_ctx_t *ctx,
                      apr_pool_t *scratch_pool)
 {
@@ -71,7 +73,25 @@ need_to_cache_iprops(svn_boolean_t *need
         }
     }
 
-  *needs_cache = (is_wc_root || is_switched);
+  /* Starting assumption. */
+  *needs_cache = FALSE;
+
+  if (is_wc_root || is_switched)
+    {
+      const char *session_url;
+      const char *session_root_url;
+
+      /* Looks likely that we need an inherited properties cache...Unless
+         LOCAL_ABSPATH is a WC root that points to the repos root.  Then it
+         doesn't need a cache because it has nowhere to inherit from.  Check
+         for that case. */
+      SVN_ERR(svn_ra_get_session_url(ra_session, &session_url, scratch_pool));
+      SVN_ERR(svn_ra_get_repos_root2(ra_session, &session_root_url,
+                                     scratch_pool));
+
+      if (strcmp(session_root_url, session_url) != 0)
+        *needs_cache = TRUE;
+    }
 
   return SVN_NO_ERROR;
 }
@@ -81,6 +101,7 @@ svn_client__get_inheritable_props(apr_ha
                                   const char *local_abspath,
                                   svn_revnum_t revision,
                                   svn_depth_t depth,
+                                  svn_boolean_t use_relpath_keys,
                                   svn_ra_session_t *ra_session,
                                   svn_client_ctx_t *ctx,
                                   apr_pool_t *result_pool,
@@ -111,7 +132,7 @@ svn_client__get_inheritable_props(apr_ha
           svn_boolean_t needs_cached_iprops;
 
           SVN_ERR(need_to_cache_iprops(&needs_cached_iprops, local_abspath,
-                                       ctx, iterpool));
+                                       ra_session, ctx, iterpool));
           if (needs_cached_iprops)
             {
               const char *target_abspath = apr_pstrdup(scratch_pool,
@@ -163,8 +184,8 @@ svn_client__get_inheritable_props(apr_ha
             }
 
           SVN_ERR(svn_ra_get_inherited_props(ra_session, &inherited_props,
-                                             "", revision, result_pool,
-                                             iterpool));
+                                             "", revision, use_relpath_keys,
+                                             result_pool, iterpool));
           apr_hash_set(*wcroot_iprops,
                        apr_pstrdup(result_pool, child_abspath),
                        APR_HASH_KEY_STRING,

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/merge.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/merge.c Fri Dec 21 00:46:48 2012
@@ -4429,13 +4429,24 @@ find_gaps_in_merge_source_history(svn_re
 
   if (rangelist->nelts > 1) /* Copy */
     {
+      const svn_merge_range_t *gap;
       /* As mentioned above, multiple gaps *shouldn't* be possible. */
       SVN_ERR_ASSERT(apr_hash_count(implicit_src_mergeinfo) == 1);
 
+      gap = APR_ARRAY_IDX(rangelist, rangelist->nelts - 1,
+                          const svn_merge_range_t *);
+
       *gap_start = MIN(source->loc1->rev, source->loc2->rev);
-      *gap_end = (APR_ARRAY_IDX(rangelist,
-                                rangelist->nelts - 1,
-                                svn_merge_range_t *))->start;
+      *gap_end = gap->start;
+
+      /* ### Issue #4132:
+         ### This assertion triggers in merge_tests.py svnmucc_abuse_1()
+         ### when a node is replaced by an older copy of itself.
+
+         BH: I think we should review this and the 'rename' case to find
+             out which behavior we really want, and if we can really
+             determine what happened this way. */
+      SVN_ERR_ASSERT(*gap_start < *gap_end);
     }
   else if (apr_hash_count(implicit_src_mergeinfo) > 1) /* Rename */
     {

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/patch.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/patch.c Fri Dec 21 00:46:48 2012
@@ -2288,9 +2288,10 @@ create_missing_parents(patch_target_t *t
               if (ctx->cancel_func)
                 SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
 
-              SVN_ERR(svn_wc_add_from_disk(ctx->wc_ctx, local_abspath,
-                                           ctx->notify_func2, ctx->notify_baton2,
-                                           iterpool));
+              SVN_ERR(svn_wc_add_from_disk2(ctx->wc_ctx, local_abspath,
+                                            NULL /*props*/,
+                                            ctx->notify_func2, ctx->notify_baton2,
+                                            iterpool));
             }
         }
     }
@@ -2402,8 +2403,9 @@ install_patched_target(patch_target_t *t
                * Suppress notification, we'll do that later (and also
                * during dry-run). Don't allow cancellation because
                * we'd rather notify about what we did before aborting. */
-              SVN_ERR(svn_wc_add_from_disk(ctx->wc_ctx, target->local_abspath,
-                                           NULL, NULL, pool));
+              SVN_ERR(svn_wc_add_from_disk2(ctx->wc_ctx, target->local_abspath,
+                                            NULL /*props*/,
+                                            NULL, NULL, pool));
             }
 
           /* Restore the target's executable bit if necessary. */
@@ -2494,10 +2496,11 @@ install_patched_prop_targets(patch_targe
             {
               SVN_ERR(svn_io_file_create(target->local_abspath, "",
                                          scratch_pool));
-              SVN_ERR(svn_wc_add_from_disk(ctx->wc_ctx, target->local_abspath,
-                                           /* suppress notification */
-                                           NULL, NULL,
-                                           iterpool));
+              SVN_ERR(svn_wc_add_from_disk2(ctx->wc_ctx, target->local_abspath,
+                                            NULL /*props*/,
+                                            /* suppress notification */
+                                            NULL, NULL,
+                                            iterpool));
             }
           target->added = TRUE;
         }

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/prop_commands.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/prop_commands.c Fri Dec 21 00:46:48 2012
@@ -639,7 +639,7 @@ remote_propget(apr_hash_t *props,
       /* We will filter out all but PROPNAME later, making a final copy
          in RESULT_POOL, so pass SCRATCH_POOL for both pools. */
       SVN_ERR(svn_ra_get_inherited_props(ra_session, inherited_props,
-                                         target_relative, revnum,
+                                         target_relative, revnum, FALSE,
                                          scratch_pool, scratch_pool));
     }
 
@@ -1125,7 +1125,7 @@ remote_proplist(const char *target_prefi
 
   if (get_target_inherited_props)
     SVN_ERR(svn_ra_get_inherited_props(ra_session, &inherited_props,
-                                       target_relative, revnum,
+                                       target_relative, revnum, FALSE,
                                        result_pool, scratch_pool));
   else
     inherited_props = NULL;

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/repos_diff.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/repos_diff.c Fri Dec 21 00:46:48 2012
@@ -143,6 +143,9 @@ struct dir_baton {
   /* A cache of any property changes (svn_prop_t) received for this dir. */
   apr_array_header_t *propchanges;
 
+  /* Boolean indicating whether a node property was changed */
+  svn_boolean_t has_propchange;
+
   /* The pool passed in by add_dir, open_dir, or open_root.
      Also, the pool this dir baton is allocated in. */
   apr_pool_t *pool;
@@ -199,6 +202,9 @@ struct file_baton {
   /* A cache of any property changes (svn_prop_t) received for this file. */
   apr_array_header_t *propchanges;
 
+  /* Boolean indicating whether a node property was changed */
+  svn_boolean_t has_propchange;
+
   /* The pool passed in by add_file or open_file.
      Also, the pool this file_baton is allocated in. */
   apr_pool_t *pool;
@@ -230,7 +236,7 @@ make_dir_baton(const char *path,
   dir_baton->skip_children = FALSE;
   dir_baton->pool = dir_pool;
   dir_baton->path = apr_pstrdup(dir_pool, path);
-  dir_baton->propchanges  = apr_array_make(pool, 1, sizeof(svn_prop_t));
+  dir_baton->propchanges  = apr_array_make(pool, 8, sizeof(svn_prop_t));
   dir_baton->base_revision = base_revision;
 
   return dir_baton;
@@ -256,7 +262,7 @@ make_file_baton(const char *path,
   file_baton->skip = FALSE;
   file_baton->pool = file_pool;
   file_baton->path = apr_pstrdup(file_pool, path);
-  file_baton->propchanges  = apr_array_make(pool, 1, sizeof(svn_prop_t));
+  file_baton->propchanges  = apr_array_make(pool, 8, sizeof(svn_prop_t));
   file_baton->base_revision = edit_baton->revision;
 
   return file_baton;
@@ -271,29 +277,29 @@ make_file_baton(const char *path,
 static void
 get_file_mime_types(const char **mimetype1,
                     const char **mimetype2,
-                    struct file_baton *b)
+                    struct file_baton *fb)
 {
   /* Defaults */
   *mimetype1 = NULL;
   *mimetype2 = NULL;
 
-  if (b->pristine_props)
+  if (fb->pristine_props)
     {
       svn_string_t *pristine_val;
-      pristine_val = apr_hash_get(b->pristine_props, SVN_PROP_MIME_TYPE,
+      pristine_val = apr_hash_get(fb->pristine_props, SVN_PROP_MIME_TYPE,
                                   strlen(SVN_PROP_MIME_TYPE));
       if (pristine_val)
         *mimetype2 = *mimetype1 = pristine_val->data;
     }
 
-  if (b->propchanges)
+  if (fb->propchanges)
     {
       int i;
       svn_prop_t *propchange;
 
-      for (i = 0; i < b->propchanges->nelts; i++)
+      for (i = 0; i < fb->propchanges->nelts; i++)
         {
-          propchange = &APR_ARRAY_IDX(b->propchanges, i, svn_prop_t);
+          propchange = &APR_ARRAY_IDX(fb->propchanges, i, svn_prop_t);
           if (strcmp(propchange->name, SVN_PROP_MIME_TYPE) == 0)
             {
               if (propchange->value)
@@ -305,22 +311,22 @@ get_file_mime_types(const char **mimetyp
 }
 
 
-/* Get revision B->base_revision of the file described by B from the
- * repository, through B->edit_baton->ra_session.
+/* Get revision FB->base_revision of the file described by FB from the
+ * repository, through FB->edit_baton->ra_session.
  *
  * Unless PROPS_ONLY is true:
- *   Set B->path_start_revision to the path of a new temporary file containing
+ *   Set FB->path_start_revision to the path of a new temporary file containing
  *   the file's text.
- *   Set B->start_md5_checksum to that file's MD-5 checksum.
- *   Install a pool cleanup handler on B->pool to delete the file.
+ *   Set FB->start_md5_checksum to that file's MD-5 checksum.
+ *   Install a pool cleanup handler on FB->pool to delete the file.
  *
  * Always:
- *   Set B->pristine_props to a new hash containing the file's properties.
+ *   Set FB->pristine_props to a new hash containing the file's properties.
  *
- * Allocate all results in B->pool.
+ * Allocate all results in FB->pool.
  */
 static svn_error_t *
-get_file_from_ra(struct file_baton *b,
+get_file_from_ra(struct file_baton *fb,
                  svn_boolean_t props_only,
                  apr_pool_t *scratch_pool)
 {
@@ -328,30 +334,30 @@ get_file_from_ra(struct file_baton *b,
     {
       svn_stream_t *fstream;
 
-      SVN_ERR(svn_stream_open_unique(&fstream, &(b->path_start_revision), NULL,
-                                     svn_io_file_del_on_pool_cleanup,
-                                     b->pool, scratch_pool));
+      SVN_ERR(svn_stream_open_unique(&fstream, &(fb->path_start_revision),
+                                     NULL, svn_io_file_del_on_pool_cleanup,
+                                     fb->pool, scratch_pool));
 
-      fstream = svn_stream_checksummed2(fstream, NULL, &b->start_md5_checksum,
+      fstream = svn_stream_checksummed2(fstream, NULL, &fb->start_md5_checksum,
                                         svn_checksum_md5, TRUE, scratch_pool);
 
       /* Retrieve the file and its properties */
-      SVN_ERR(svn_ra_get_file(b->edit_baton->ra_session,
-                              b->path,
-                              b->base_revision,
+      SVN_ERR(svn_ra_get_file(fb->edit_baton->ra_session,
+                              fb->path,
+                              fb->base_revision,
                               fstream, NULL,
-                              &(b->pristine_props),
-                              b->pool));
+                              &(fb->pristine_props),
+                              fb->pool));
       SVN_ERR(svn_stream_close(fstream));
     }
   else
     {
-      SVN_ERR(svn_ra_get_file(b->edit_baton->ra_session,
-                              b->path,
-                              b->base_revision,
+      SVN_ERR(svn_ra_get_file(fb->edit_baton->ra_session,
+                              fb->path,
+                              fb->base_revision,
                               NULL, NULL,
-                              &(b->pristine_props),
-                              b->pool));
+                              &(fb->pristine_props),
+                              fb->pool));
     }
 
   return SVN_NO_ERROR;
@@ -461,10 +467,10 @@ open_root(void *edit_baton,
           void **root_baton)
 {
   struct edit_baton *eb = edit_baton;
-  struct dir_baton *b = make_dir_baton("", NULL, eb, FALSE, base_revision,
-                                       pool);
+  struct dir_baton *db = make_dir_baton("", NULL, eb, FALSE, base_revision,
+                                        pool);
 
-  *root_baton = b;
+  *root_baton = db;
   return SVN_NO_ERROR;
 }
 
@@ -477,26 +483,26 @@ diff_deleted_file(svn_wc_notify_state_t 
                   struct edit_baton *eb,
                   apr_pool_t *scratch_pool)
 {
-  struct file_baton *b = make_file_baton(path, FALSE, eb, scratch_pool);
-/*  struct edit_baton *eb = b->edit_baton;*/
+  struct file_baton *fb = make_file_baton(path, FALSE, eb, scratch_pool);
+/*  struct edit_baton *eb = fb->edit_baton;*/
   const char *mimetype1, *mimetype2;
 
   if (eb->cancel_func)
     SVN_ERR(eb->cancel_func(eb->cancel_baton));
 
   if (eb->text_deltas)
-    SVN_ERR(get_file_from_ra(b, FALSE, scratch_pool));
+    SVN_ERR(get_file_from_ra(fb, FALSE, scratch_pool));
   else
-    SVN_ERR(get_empty_file(eb, &b->path_start_revision));
-  SVN_ERR(get_empty_file(eb, &b->path_end_revision));
-  get_file_mime_types(&mimetype1, &mimetype2, b);
+    SVN_ERR(get_empty_file(eb, &fb->path_start_revision));
+  SVN_ERR(get_empty_file(eb, &fb->path_end_revision));
+  get_file_mime_types(&mimetype1, &mimetype2, fb);
 
   SVN_ERR(eb->diff_callbacks->file_deleted(state_p, tree_conflicted_p,
-                                           b->path,
-                                           b->path_start_revision,
-                                           b->path_end_revision,
+                                           fb->path,
+                                           fb->path_start_revision,
+                                           fb->path_end_revision,
                                            mimetype1, mimetype2,
-                                           b->pristine_props,
+                                           fb->pristine_props,
                                            eb->diff_cmd_baton,
                                            scratch_pool));
   return SVN_NO_ERROR;
@@ -654,26 +660,26 @@ add_directory(const char *path,
 {
   struct dir_baton *pb = parent_baton;
   struct edit_baton *eb = pb->edit_baton;
-  struct dir_baton *b;
+  struct dir_baton *db;
   svn_wc_notify_state_t state;
 
   /* ### TODO: support copyfrom? */
 
-  b = make_dir_baton(path, pb, eb, TRUE, SVN_INVALID_REVNUM, pool);
-  *child_baton = b;
+  db = make_dir_baton(path, pb, eb, TRUE, SVN_INVALID_REVNUM, pool);
+  *child_baton = db;
 
   /* Skip *everything* within a newly tree-conflicted directory,
    * and directories the children of which should be skipped. */
   if (pb->skip || pb->tree_conflicted || pb->skip_children)
     {
-      b->skip = TRUE;
+      db->skip = TRUE;
       return SVN_NO_ERROR;
     }
 
 
   SVN_ERR(eb->diff_callbacks->dir_added(
-                &state, &b->tree_conflicted,
-                &b->skip, &b->skip_children, b->path,
+                &state, &db->tree_conflicted,
+                &db->skip, &db->skip_children, db->path,
                 eb->target_revision, copyfrom_path, copyfrom_revision,
                 eb->diff_cmd_baton, pool));
 
@@ -692,12 +698,12 @@ add_directory(const char *path,
 
       /* Find out if a pending delete notification for this path is
        * still around. */
-      dpn = apr_hash_get(eb->deleted_paths, b->path, APR_HASH_KEY_STRING);
+      dpn = apr_hash_get(eb->deleted_paths, db->path, APR_HASH_KEY_STRING);
       if (dpn)
         {
           /* If any was found, we will handle the pending 'deleted path
            * notification' (DPN) here. Remove it from the list. */
-          apr_hash_set(eb->deleted_paths, b->path,
+          apr_hash_set(eb->deleted_paths, db->path,
                        APR_HASH_KEY_STRING, NULL);
 
           /* the pending delete might be on a different node kind. */
@@ -707,7 +713,7 @@ add_directory(const char *path,
 
       /* Determine what the notification (ACTION) should be.
        * In case of a pending 'delete', this might become a 'replace'. */
-      if (b->tree_conflicted)
+      if (db->tree_conflicted)
         action = svn_wc_notify_tree_conflict;
       else if (dpn)
         {
@@ -723,7 +729,7 @@ add_directory(const char *path,
       else
         action = svn_wc_notify_update_add;
 
-      notify = svn_wc_create_notify(b->path, action, pool);
+      notify = svn_wc_create_notify(db->path, action, pool);
       notify->kind = kind;
       notify->content_state = notify->prop_state = state;
       (*eb->notify_func)(eb->notify_baton, notify, pool);
@@ -742,24 +748,24 @@ open_directory(const char *path,
 {
   struct dir_baton *pb = parent_baton;
   struct edit_baton *eb = pb->edit_baton;
-  struct dir_baton *b;
+  struct dir_baton *db;
 
-  b = make_dir_baton(path, pb, pb->edit_baton, FALSE, base_revision, pool);
+  db = make_dir_baton(path, pb, eb, FALSE, base_revision, pool);
 
-  *child_baton = b;
+  *child_baton = db;
 
   /* Skip *everything* within a newly tree-conflicted directory
    * and directories the children of which should be skipped. */
   if (pb->skip || pb->tree_conflicted || pb->skip_children)
     {
-      b->skip = TRUE;
+      db->skip = TRUE;
       return SVN_NO_ERROR;
     }
 
   SVN_ERR(eb->diff_callbacks->dir_opened(
-                &b->tree_conflicted, &b->skip,
-                &b->skip_children, b->path, base_revision,
-                b->edit_baton->diff_cmd_baton, pool));
+                &db->tree_conflicted, &db->skip,
+                &db->skip_children, db->path, base_revision,
+                eb->diff_cmd_baton, pool));
 
   return SVN_NO_ERROR;
 }
@@ -775,22 +781,22 @@ add_file(const char *path,
          void **file_baton)
 {
   struct dir_baton *pb = parent_baton;
-  struct file_baton *b;
+  struct file_baton *fb;
 
   /* ### TODO: support copyfrom? */
 
-  b = make_file_baton(path, TRUE, pb->edit_baton, pool);
-  *file_baton = b;
+  fb = make_file_baton(path, TRUE, pb->edit_baton, pool);
+  *file_baton = fb;
 
   /* Skip *everything* within a newly tree-conflicted directory.
    * and directories the children of which should be skipped. */
   if (pb->skip || pb->tree_conflicted || pb->skip_children)
     {
-      b->skip = TRUE;
+      fb->skip = TRUE;
       return SVN_NO_ERROR;
     }
 
-  b->pristine_props = pb->edit_baton->empty_hash;
+  fb->pristine_props = pb->edit_baton->empty_hash;
 
   return SVN_NO_ERROR;
 }
@@ -804,24 +810,24 @@ open_file(const char *path,
           void **file_baton)
 {
   struct dir_baton *pb = parent_baton;
-  struct file_baton *b;
+  struct file_baton *fb;
   struct edit_baton *eb = pb->edit_baton;
-  b = make_file_baton(path, FALSE, pb->edit_baton, pool);
-  *file_baton = b;
+  fb = make_file_baton(path, FALSE, pb->edit_baton, pool);
+  *file_baton = fb;
 
   /* Skip *everything* within a newly tree-conflicted directory
    * and directories the children of which should be skipped. */
   if (pb->skip || pb->tree_conflicted || pb->skip_children)
     {
-      b->skip = TRUE;
+      fb->skip = TRUE;
       return SVN_NO_ERROR;
     }
 
-  b->base_revision = base_revision;
+  fb->base_revision = base_revision;
 
   SVN_ERR(eb->diff_callbacks->file_opened(
-                   &b->tree_conflicted, &b->skip,
-                   b->path, base_revision, eb->diff_cmd_baton, pool));
+                   &fb->tree_conflicted, &fb->skip,
+                   fb->path, base_revision, eb->diff_cmd_baton, pool));
 
   return SVN_NO_ERROR;
 }
@@ -831,14 +837,15 @@ static svn_error_t *
 window_handler(svn_txdelta_window_t *window,
                void *window_baton)
 {
-  struct file_baton *b = window_baton;
+  struct file_baton *fb = window_baton;
 
-  SVN_ERR(b->apply_handler(window, b->apply_baton));
+  SVN_ERR(fb->apply_handler(window, fb->apply_baton));
 
   if (!window)
     {
-      b->result_md5_checksum = svn_checksum__from_digest_md5(b->result_digest,
-                                                             b->pool);
+      fb->result_md5_checksum = svn_checksum__from_digest_md5(
+                                        fb->result_digest,
+                                        fb->pool);
     }
 
   return SVN_NO_ERROR;
@@ -852,13 +859,13 @@ apply_textdelta(void *file_baton,
                 svn_txdelta_window_handler_t *handler,
                 void **handler_baton)
 {
-  struct file_baton *b = file_baton;
+  struct file_baton *fb = file_baton;
   svn_stream_t *src_stream;
   svn_stream_t *result_stream;
-  apr_pool_t *scratch_pool = b->pool;
+  apr_pool_t *scratch_pool = fb->pool;
 
   /* Skip *everything* within a newly tree-conflicted directory. */
-  if (b->skip)
+  if (fb->skip)
     {
       *handler = svn_delta_noop_window_handler;
       *handler_baton = NULL;
@@ -866,11 +873,11 @@ apply_textdelta(void *file_baton,
     }
 
   /* If we're not sending file text, then ignore any that we receive. */
-  if (! b->edit_baton->text_deltas)
+  if (! fb->edit_baton->text_deltas)
     {
       /* Supply valid paths to indicate there is a text change. */
-      SVN_ERR(get_empty_file(b->edit_baton, &b->path_start_revision));
-      SVN_ERR(get_empty_file(b->edit_baton, &b->path_end_revision));
+      SVN_ERR(get_empty_file(fb->edit_baton, &fb->path_start_revision));
+      SVN_ERR(get_empty_file(fb->edit_baton, &fb->path_end_revision));
 
       *handler = svn_delta_noop_window_handler;
       *handler_baton = NULL;
@@ -879,12 +886,12 @@ apply_textdelta(void *file_baton,
     }
 
   /* We need the expected pristine file, so go get it */
-  if (!b->added)
-    SVN_ERR(get_file_from_ra(b, FALSE, scratch_pool));
+  if (!fb->added)
+    SVN_ERR(get_file_from_ra(fb, FALSE, scratch_pool));
   else
-    SVN_ERR(get_empty_file(b->edit_baton, &(b->path_start_revision)));
+    SVN_ERR(get_empty_file(fb->edit_baton, &(fb->path_start_revision)));
 
-  SVN_ERR_ASSERT(b->path_start_revision != NULL);
+  SVN_ERR_ASSERT(fb->path_start_revision != NULL);
 
   if (base_md5_digest != NULL)
     {
@@ -893,30 +900,30 @@ apply_textdelta(void *file_baton,
       SVN_ERR(svn_checksum_parse_hex(&base_md5_checksum, svn_checksum_md5,
                                      base_md5_digest, scratch_pool));
 
-      if (!svn_checksum_match(base_md5_checksum, b->start_md5_checksum))
+      if (!svn_checksum_match(base_md5_checksum, fb->start_md5_checksum))
         return svn_error_trace(svn_checksum_mismatch_err(
                                       base_md5_checksum,
-                                      b->start_md5_checksum,
+                                      fb->start_md5_checksum,
                                       scratch_pool,
                                       _("Base checksum mismatch for '%s'"),
-                                      b->path));
+                                      fb->path));
     }
 
   /* Open the file to be used as the base for second revision */
-  SVN_ERR(svn_stream_open_readonly(&src_stream, b->path_start_revision,
+  SVN_ERR(svn_stream_open_readonly(&src_stream, fb->path_start_revision,
                                    scratch_pool, scratch_pool));
 
   /* Open the file that will become the second revision after applying the
      text delta, it starts empty */
-  SVN_ERR(svn_stream_open_unique(&result_stream, &b->path_end_revision, NULL,
+  SVN_ERR(svn_stream_open_unique(&result_stream, &fb->path_end_revision, NULL,
                                  svn_io_file_del_on_pool_cleanup,
                                  scratch_pool, scratch_pool));
 
   svn_txdelta_apply(src_stream,
                     result_stream,
-                    b->result_digest,
-                    b->path, b->pool,
-                    &(b->apply_handler), &(b->apply_baton));
+                    fb->result_digest,
+                    fb->path, fb->pool,
+                    &(fb->apply_handler), &(fb->apply_baton));
 
   *handler = window_handler;
   *handler_baton = file_baton;
@@ -939,20 +946,20 @@ close_file(void *file_baton,
            const char *expected_md5_digest,
            apr_pool_t *pool)
 {
-  struct file_baton *b = file_baton;
-  struct edit_baton *eb = b->edit_baton;
+  struct file_baton *fb = file_baton;
+  struct edit_baton *eb = fb->edit_baton;
   svn_wc_notify_state_t content_state = svn_wc_notify_state_unknown;
   svn_wc_notify_state_t prop_state = svn_wc_notify_state_unknown;
   apr_pool_t *scratch_pool;
 
   /* Skip *everything* within a newly tree-conflicted directory. */
-  if (b->skip)
+  if (fb->skip)
     {
-      svn_pool_destroy(b->pool);
+      svn_pool_destroy(fb->pool);
       return SVN_NO_ERROR;
     }
 
-  scratch_pool = b->pool;
+  scratch_pool = fb->pool;
 
   if (expected_md5_digest && eb->text_deltas)
     {
@@ -961,57 +968,56 @@ close_file(void *file_baton,
       SVN_ERR(svn_checksum_parse_hex(&expected_md5_checksum, svn_checksum_md5,
                                      expected_md5_digest, scratch_pool));
 
-      if (!svn_checksum_match(expected_md5_checksum, b->result_md5_checksum))
+      if (!svn_checksum_match(expected_md5_checksum, fb->result_md5_checksum))
         return svn_error_trace(svn_checksum_mismatch_err(
                                       expected_md5_checksum,
-                                      b->result_md5_checksum,
+                                      fb->result_md5_checksum,
                                       pool,
                                       _("Checksum mismatch for '%s'"),
-                                      b->path));
+                                      fb->path));
     }
 
-  if (!b->added && b->propchanges->nelts > 0)
+  if (fb->path_end_revision || fb->has_propchange)
     {
-      if (!b->pristine_props)
+      const char *mimetype1, *mimetype2;
+
+      if (!fb->added && !fb->pristine_props)
         {
           /* We didn't receive a text change, so we have no pristine props.
              Retrieve just the props now. */
-          SVN_ERR(get_file_from_ra(b, TRUE, scratch_pool));
+          SVN_ERR(get_file_from_ra(fb, TRUE, scratch_pool));
         }
 
-      remove_non_prop_changes(b->pristine_props, b->propchanges);
-    }
+      if (fb->pristine_props)
+        remove_non_prop_changes(fb->pristine_props, fb->propchanges);
 
-  if (b->path_end_revision || b->propchanges->nelts > 0)
-    {
-      const char *mimetype1, *mimetype2;
-      get_file_mime_types(&mimetype1, &mimetype2, b);
+      get_file_mime_types(&mimetype1, &mimetype2, fb);
 
 
-      if (b->added)
+      if (fb->added)
         SVN_ERR(eb->diff_callbacks->file_added(
-                 &content_state, &prop_state, &b->tree_conflicted,
-                 b->path,
-                 b->path_end_revision ? b->path_start_revision : NULL,
-                 b->path_end_revision,
+                 &content_state, &prop_state, &fb->tree_conflicted,
+                 fb->path,
+                 fb->path_end_revision ? fb->path_start_revision : NULL,
+                 fb->path_end_revision,
                  0,
-                 b->edit_baton->target_revision,
+                 eb->target_revision,
                  mimetype1, mimetype2,
                  NULL, SVN_INVALID_REVNUM,
-                 b->propchanges, b->pristine_props,
-                 b->edit_baton->diff_cmd_baton,
+                 fb->propchanges, fb->pristine_props,
+                 eb->diff_cmd_baton,
                  scratch_pool));
       else
         SVN_ERR(eb->diff_callbacks->file_changed(
                  &content_state, &prop_state,
-                 &b->tree_conflicted, b->path,
-                 b->path_end_revision ? b->path_start_revision : NULL,
-                 b->path_end_revision,
-                 b->edit_baton->revision,
-                 b->edit_baton->target_revision,
+                 &fb->tree_conflicted, fb->path,
+                 fb->path_end_revision ? fb->path_start_revision : NULL,
+                 fb->path_end_revision,
+                 eb->revision,
+                 eb->target_revision,
                  mimetype1, mimetype2,
-                 b->propchanges, b->pristine_props,
-                 b->edit_baton->diff_cmd_baton,
+                 fb->propchanges, fb->pristine_props,
+                 eb->diff_cmd_baton,
                  scratch_pool));
     }
 
@@ -1025,12 +1031,12 @@ close_file(void *file_baton,
 
       /* Find out if a pending delete notification for this path is
        * still around. */
-      dpn = apr_hash_get(eb->deleted_paths, b->path, APR_HASH_KEY_STRING);
+      dpn = apr_hash_get(eb->deleted_paths, fb->path, APR_HASH_KEY_STRING);
       if (dpn)
         {
           /* If any was found, we will handle the pending 'deleted path
            * notification' (DPN) here. Remove it from the list. */
-          apr_hash_set(eb->deleted_paths, b->path,
+          apr_hash_set(eb->deleted_paths, fb->path,
                        APR_HASH_KEY_STRING, NULL);
 
           /* the pending delete might be on a different node kind. */
@@ -1040,12 +1046,12 @@ close_file(void *file_baton,
 
       /* Determine what the notification (ACTION) should be.
        * In case of a pending 'delete', this might become a 'replace'. */
-      if (b->tree_conflicted)
+      if (fb->tree_conflicted)
         action = svn_wc_notify_tree_conflict;
       else if (dpn)
         {
           if (dpn->action == svn_wc_notify_update_delete
-              && b->added)
+              && fb->added)
             action = svn_wc_notify_update_replace;
           else
             /* Note: dpn->action might be svn_wc_notify_tree_conflict */
@@ -1054,19 +1060,19 @@ close_file(void *file_baton,
       else if ((content_state == svn_wc_notify_state_missing)
                 || (content_state == svn_wc_notify_state_obstructed))
         action = svn_wc_notify_skip;
-      else if (b->added)
+      else if (fb->added)
         action = svn_wc_notify_update_add;
       else
         action = svn_wc_notify_update_update;
 
-      notify = svn_wc_create_notify(b->path, action, scratch_pool);
+      notify = svn_wc_create_notify(fb->path, action, scratch_pool);
       notify->kind = kind;
       notify->content_state = content_state;
       notify->prop_state = prop_state;
       (*eb->notify_func)(eb->notify_baton, notify, scratch_pool);
     }
 
-  svn_pool_destroy(b->pool); /* Destroy file and scratch pool */
+  svn_pool_destroy(fb->pool); /* Destroy file and scratch pool */
 
   return SVN_NO_ERROR;
 }
@@ -1082,8 +1088,8 @@ static svn_error_t *
 close_directory(void *dir_baton,
                 apr_pool_t *pool)
 {
-  struct dir_baton *b = dir_baton;
-  struct edit_baton *eb = b->edit_baton;
+  struct dir_baton *db = dir_baton;
+  struct edit_baton *eb = db->edit_baton;
   svn_wc_notify_state_t content_state = svn_wc_notify_state_unknown;
   svn_wc_notify_state_t prop_state = svn_wc_notify_state_unknown;
   svn_boolean_t skipped = FALSE;
@@ -1091,56 +1097,59 @@ close_directory(void *dir_baton,
   apr_hash_t *pristine_props;
 
   /* Skip *everything* within a newly tree-conflicted directory. */
-  if (b->skip)
+  if (db->skip)
     {
-      svn_pool_destroy(b->pool);
+      svn_pool_destroy(db->pool);
       return SVN_NO_ERROR;
     }
 
-  scratch_pool = b->pool;
+  scratch_pool = db->pool;
 
-  if (b->added)
-    {
-      pristine_props = eb->empty_hash;
-    }
-  else
+  if (db->has_propchange)
     {
-      SVN_ERR(svn_ra_get_dir2(eb->ra_session, NULL, NULL, &pristine_props,
-                              b->path, b->base_revision, 0, scratch_pool));
-    }
-
-  if (b->propchanges->nelts > 0)
-    {
-      remove_non_prop_changes(pristine_props, b->propchanges);
-    }
+      if (db->added)
+        {
+          pristine_props = eb->empty_hash;
+        }
+      else
+        {
+          SVN_ERR(svn_ra_get_dir2(eb->ra_session, NULL, NULL, &pristine_props,
+                                  db->path, db->base_revision, 0, scratch_pool));
+        }
 
-  if (b->propchanges->nelts > 0)
-    {
-      svn_boolean_t tree_conflicted = FALSE;
-      SVN_ERR(eb->diff_callbacks->dir_props_changed(
-               &prop_state, &tree_conflicted,
-               b->path, b->added,
-               b->propchanges, pristine_props,
-               b->edit_baton->diff_cmd_baton, scratch_pool));
-      if (tree_conflicted)
-        b->tree_conflicted = TRUE;
+      if (db->propchanges->nelts > 0)
+        {
+          remove_non_prop_changes(pristine_props, db->propchanges);
+        }
 
-      if (prop_state == svn_wc_notify_state_obstructed
-          || prop_state == svn_wc_notify_state_missing)
+      if (db->propchanges->nelts > 0)
         {
-          content_state = prop_state;
-          skipped = TRUE;
+          svn_boolean_t tree_conflicted = FALSE;
+          SVN_ERR(eb->diff_callbacks->dir_props_changed(
+                   &prop_state, &tree_conflicted,
+                   db->path, db->added,
+                   db->propchanges, pristine_props,
+                   eb->diff_cmd_baton, scratch_pool));
+          if (tree_conflicted)
+            db->tree_conflicted = TRUE;
+
+          if (prop_state == svn_wc_notify_state_obstructed
+              || prop_state == svn_wc_notify_state_missing)
+            {
+              content_state = prop_state;
+              skipped = TRUE;
+            }
         }
     }
 
   SVN_ERR(eb->diff_callbacks->dir_closed(NULL, NULL, NULL,
-                                         b->path, b->added,
-                                         b->edit_baton->diff_cmd_baton,
+                                         db->path, db->added,
+                                         eb->diff_cmd_baton,
                                          scratch_pool));
 
   /* Notify about any deleted paths within this directory that have not
    * already been notified. */
-  if (!skipped && !b->added && eb->notify_func)
+  if (!skipped && !db->added && eb->notify_func)
     {
       apr_hash_index_t *hi;
 
@@ -1151,11 +1160,11 @@ close_directory(void *dir_baton,
           const char *deleted_path = svn__apr_hash_index_key(hi);
           deleted_path_notify_t *dpn = svn__apr_hash_index_val(hi);
 
-          /* Ignore paths which are not children of b->path.  (There
+          /* Ignore paths which are not children of bb->path.  (There
              should be none due to editor ordering constraints, but
              ra_serf drops the ball here -- see issue #3802 for
              details.) */
-          if (! svn_relpath_skip_ancestor(b->path, deleted_path))
+          if (! svn_relpath_skip_ancestor(db->path, deleted_path))
             continue;
 
           notify = svn_wc_create_notify(deleted_path, dpn->action, pool);
@@ -1170,19 +1179,19 @@ close_directory(void *dir_baton,
 
   /* Notify about this directory itself (unless it was added, in which
    * case the notification was done at that time). */
-  if (!b->added && eb->notify_func)
+  if (!db->added && eb->notify_func)
     {
       svn_wc_notify_t *notify;
       svn_wc_notify_action_t action;
 
-      if (b->tree_conflicted)
+      if (db->tree_conflicted)
         action = svn_wc_notify_tree_conflict;
       else if (skipped)
         action = svn_wc_notify_skip;
       else
         action = svn_wc_notify_update_update;
 
-      notify = svn_wc_create_notify(b->path, action, pool);
+      notify = svn_wc_create_notify(db->path, action, pool);
       notify->kind = svn_node_dir;
 
       /* In case of a tree conflict during merge, the diff callback
@@ -1195,7 +1204,7 @@ close_directory(void *dir_baton,
       (*eb->notify_func)(eb->notify_baton, notify, scratch_pool);
     }
 
-  svn_pool_destroy(b->pool); /* Destroy baton and scratch_pool */
+  svn_pool_destroy(db->pool); /* Destroy baton and scratch_pool */
 
   return SVN_NO_ERROR;
 }
@@ -1210,16 +1219,19 @@ change_file_prop(void *file_baton,
                  const svn_string_t *value,
                  apr_pool_t *pool)
 {
-  struct file_baton *b = file_baton;
+  struct file_baton *fb = file_baton;
   svn_prop_t *propchange;
 
   /* Skip *everything* within a newly tree-conflicted directory. */
-  if (b->skip)
+  if (fb->skip)
     return SVN_NO_ERROR;
 
-  propchange = apr_array_push(b->propchanges);
-  propchange->name = apr_pstrdup(b->pool, name);
-  propchange->value = value ? svn_string_dup(value, b->pool) : NULL;
+  if (!fb->has_propchange && svn_property_kind2(name) == svn_prop_regular_kind)
+    fb->has_propchange = TRUE;
+
+  propchange = apr_array_push(fb->propchanges);
+  propchange->name = apr_pstrdup(fb->pool, name);
+  propchange->value = value ? svn_string_dup(value, fb->pool) : NULL;
 
   return SVN_NO_ERROR;
 }
@@ -1240,6 +1252,9 @@ change_dir_prop(void *dir_baton,
   if (db->skip)
     return SVN_NO_ERROR;
 
+  if (!db->has_propchange && svn_property_kind2(name) == svn_prop_regular_kind)
+    db->has_propchange = TRUE;
+
   propchange = apr_array_push(db->propchanges);
   propchange->name = apr_pstrdup(db->pool, name);
   propchange->value = value ? svn_string_dup(value, db->pool) : NULL;

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/switch.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/switch.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/switch.c Fri Dec 21 00:46:48 2012
@@ -267,7 +267,7 @@ switch_internal(svn_revnum_t *result_rev
       if (needs_iprop_cache)
         {
           SVN_ERR(svn_ra_get_inherited_props(ra_session, &inherited_props,
-                                             "", switch_loc->rev, pool,
+                                             "", switch_loc->rev, TRUE, pool,
                                              pool));
           apr_hash_set(wcroot_iprops, local_abspath, APR_HASH_KEY_STRING,
                        inherited_props);

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/update.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/update.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/update.c Fri Dec 21 00:46:48 2012
@@ -377,8 +377,8 @@ update_internal(svn_revnum_t *result_rev
   dfb.anchor_url = anchor_loc->url;
 
   err = svn_client__get_inheritable_props(&wcroot_iprops, local_abspath,
-                                          revnum, depth, ra_session, ctx,
-                                          pool, pool);
+                                          revnum, depth, TRUE, ra_session,
+                                          ctx, pool, pool);
 
   /* We might be trying to update to a non-existant path-rev. */
   if (err)

Modified: subversion/branches/in-repo-authz/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_ra/ra_loader.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_ra/ra_loader.c Fri Dec 21 00:46:48 2012
@@ -1298,6 +1298,7 @@ svn_ra_get_inherited_props(svn_ra_sessio
                            apr_array_header_t **iprops,
                            const char *path,
                            svn_revnum_t revision,
+                           svn_boolean_t use_relpath_keys,
                            apr_pool_t *result_pool,
                            apr_pool_t *scratch_pool)
 {
@@ -1323,6 +1324,23 @@ svn_ra_get_inherited_props(svn_ra_sessio
                                                result_pool, scratch_pool));
     }
 
+  if (use_relpath_keys && (*iprops)->nelts)
+    {
+      const char *repos_root_url;
+      int i;
+
+      SVN_ERR(svn_ra_get_repos_root2(session, &repos_root_url, scratch_pool));
+      for (i = 0; i < (*iprops)->nelts; i++)
+        {
+          svn_prop_inherited_item_t *elt =
+            APR_ARRAY_IDX(*iprops, i, svn_prop_inherited_item_t *);
+          elt->path_or_url =
+            svn_dirent_skip_ancestor(repos_root_url, elt->path_or_url);
+          elt->path_or_url = svn_path_uri_decode(elt->path_or_url,
+                                                 result_pool);
+        }
+    }
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/in-repo-authz/subversion/libsvn_subr/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_subr/cmdline.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_subr/cmdline.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_subr/cmdline.c Fri Dec 21 00:46:48 2012
@@ -33,8 +33,10 @@
 #include <unistd.h>
 #else
 #include <crtdbg.h>
+#include <io.h>
 #endif
 
+#include <apr.h>                /* for STDIN_FILENO */
 #include <apr_errno.h>          /* for apr_strerror */
 #include <apr_general.h>        /* for apr_initialize/apr_terminate */
 #include <apr_strings.h>        /* for apr_snprintf */
@@ -923,3 +925,24 @@ svn_cmdline__print_xml_prop_hash(svn_str
 
     return SVN_NO_ERROR;
 }
+
+svn_boolean_t
+svn_cmdline__be_interactive(svn_boolean_t non_interactive,
+                            svn_boolean_t force_interactive)
+{
+  /* If neither --non-interactive nor --force-interactive was passed,
+   * be interactive if stdin is a terminal.
+   * If --force-interactive was passed, always be interactive. */
+  if (!force_interactive && !non_interactive)
+    {
+#ifdef WIN32
+      return (_isatty(STDIN_FILENO) != 0);
+#else
+      return (isatty(STDIN_FILENO) != 0);
+#endif
+    }
+  else if (force_interactive) 
+    return TRUE;
+
+  return !non_interactive;
+}

Modified: subversion/branches/in-repo-authz/subversion/libsvn_subr/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_subr/deprecated.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_subr/deprecated.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_subr/deprecated.c Fri Dec 21 00:46:48 2012
@@ -45,6 +45,7 @@
 
 #include "opt.h"
 #include "private/svn_opt_private.h"
+#include "private/svn_mergeinfo_private.h"
 
 #include "svn_private_config.h"
 
@@ -1122,8 +1123,11 @@ svn_rangelist_merge(svn_rangelist_t **ra
                     const svn_rangelist_t *changes,
                     apr_pool_t *pool)
 {
-  return svn_error_trace(svn_rangelist_merge2(*rangelist, changes,
-                                              pool, pool));
+  SVN_ERR(svn_rangelist_merge2(*rangelist, changes,
+                               pool, pool));
+
+  return svn_error_trace(
+            svn_rangelist__combine_adjacent_ranges(*rangelist, pool));
 }
 
 svn_error_t *

Modified: subversion/branches/in-repo-authz/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_subr/mergeinfo.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_subr/mergeinfo.c Fri Dec 21 00:46:48 2012
@@ -611,6 +611,58 @@ svn_rangelist__parse(svn_rangelist_t **r
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_rangelist__combine_adjacent_ranges(svn_rangelist_t *rangelist,
+                                       apr_pool_t *scratch_pool)
+{
+  int i;
+  svn_merge_range_t *range, *lastrange;
+
+  lastrange = APR_ARRAY_IDX(rangelist, 0, svn_merge_range_t *);
+
+  for (i = 1; i < rangelist->nelts; i++)
+    {
+      range = APR_ARRAY_IDX(rangelist, i, svn_merge_range_t *);
+      if (lastrange->start <= range->end
+          && range->start <= lastrange->end)
+        {
+          /* The ranges are adjacent or intersect. */
+
+          /* svn_mergeinfo_parse promises to combine overlapping
+             ranges as long as their inheritability is the same. */
+          if (range->start < lastrange->end
+              && range->inheritable != lastrange->inheritable)
+            {
+              return svn_error_createf(SVN_ERR_MERGEINFO_PARSE_ERROR, NULL,
+                                       _("Unable to parse overlapping "
+                                         "revision ranges '%s' and '%s' "
+                                         "with different inheritance "
+                                         "types"),
+                                       range_to_string(lastrange,
+                                                       scratch_pool),
+                                       range_to_string(range,
+                                                       scratch_pool));
+            }
+
+          /* Combine overlapping or adjacent ranges with the
+             same inheritability. */
+          if (lastrange->inheritable == range->inheritable)
+            {
+              lastrange->end = MAX(range->end, lastrange->end);
+              if (i + 1 < rangelist->nelts)
+                memmove(rangelist->elts + (rangelist->elt_size * i),
+                        rangelist->elts + (rangelist->elt_size * (i + 1)),
+                        rangelist->elt_size * (rangelist->nelts - i));
+              rangelist->nelts--;
+              i--;
+            }
+        }
+      lastrange = APR_ARRAY_IDX(rangelist, i, svn_merge_range_t *);
+    }
+
+  return SVN_NO_ERROR;
+}
+
 /* revisionline -> PATHNAME COLON revisionlist */
 static svn_error_t *
 parse_revision_line(const char **input, const char *end, svn_mergeinfo_t hash,
@@ -648,52 +700,10 @@ parse_revision_line(const char **input, 
      and make sure there are no overlapping ranges. */
   if (rangelist->nelts > 1)
     {
-      int i;
-      svn_merge_range_t *range, *lastrange;
-
       qsort(rangelist->elts, rangelist->nelts, rangelist->elt_size,
             svn_sort_compare_ranges);
-      lastrange = APR_ARRAY_IDX(rangelist, 0, svn_merge_range_t *);
-
-      for (i = 1; i < rangelist->nelts; i++)
-        {
-          range = APR_ARRAY_IDX(rangelist, i, svn_merge_range_t *);
-          if (lastrange->start <= range->end
-              && range->start <= lastrange->end)
-            {
-              /* The ranges are adjacent or intersect. */
 
-              /* svn_mergeinfo_parse promises to combine overlapping
-                 ranges as long as their inheritability is the same. */
-              if (range->start < lastrange->end
-                  && range->inheritable != lastrange->inheritable)
-                {
-                  return svn_error_createf(SVN_ERR_MERGEINFO_PARSE_ERROR, NULL,
-                                           _("Unable to parse overlapping "
-                                             "revision ranges '%s' and '%s' "
-                                             "with different inheritance "
-                                             "types"),
-                                           range_to_string(lastrange,
-                                                           scratch_pool),
-                                           range_to_string(range,
-                                                           scratch_pool));
-                }
-
-              /* Combine overlapping or adjacent ranges with the
-                 same inheritability. */
-              if (lastrange->inheritable == range->inheritable)
-                {
-                  lastrange->end = MAX(range->end, lastrange->end);
-                  if (i + 1 < rangelist->nelts)
-                    memmove(rangelist->elts + (rangelist->elt_size * i),
-                            rangelist->elts + (rangelist->elt_size * (i + 1)),
-                            rangelist->elt_size * (rangelist->nelts - i));
-                  rangelist->nelts--;
-                  i--;
-                }
-            }
-          lastrange = APR_ARRAY_IDX(rangelist, i, svn_merge_range_t *);
-        }
+      SVN_ERR(svn_rangelist__combine_adjacent_ranges(rangelist, scratch_pool));
     }
 
   /* Handle any funky mergeinfo with relative merge source paths that

Modified: subversion/branches/in-repo-authz/subversion/libsvn_subr/opt.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_subr/opt.c?rev=1424778&r1=1424777&r2=1424778&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_subr/opt.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_subr/opt.c Fri Dec 21 00:46:48 2012
@@ -1121,17 +1121,6 @@ svn_opt__print_version_info(const char *
                              svn_version_ext_build_host(info)));
   SVN_ERR(svn_cmdline_printf(pool, "%s\n", svn_version_ext_copyright(info)));
 
-#if !defined(SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE) && !defined(WIN32)
-  /* FIXME: Checking this config variable is the wrong thing to do,
-            since it apparently means that the simple auth provider is
-            disabled, not that plaintext password storage is disabled.
-            So in either the configure option is misnamed, or its
-            implementation is too simplistic. */
-  SVN_ERR(svn_cmdline_fputs(
-              _("WARNING: Plaintext password storage is enabled!\n\n"),
-              stdout, pool));
-#endif /* SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE && !WIN32 */
-
   if (footer)
     {
       SVN_ERR(svn_cmdline_printf(pool, "%s\n", footer));