You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2012/10/30 21:03:39 UTC

svn commit: r1403849 [15/19] - in /subversion/branches/master-passphrase: ./ build/ build/ac-macros/ build/hudson/ contrib/server-side/fsfsfixer/ notes/ notes/api-errata/1.8/ notes/directory-index/ notes/obliterate/ notes/tree-conflicts/ subversion/bin...

Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db.h?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db.h Tue Oct 30 20:03:28 2012
@@ -255,7 +255,7 @@ typedef struct svn_wc__db_lock_t {
 */
 svn_error_t *
 svn_wc__db_open(svn_wc__db_t **db,
-                const svn_config_t *config,
+                svn_config_t *config,
                 svn_boolean_t auto_upgrade,
                 svn_boolean_t enforce_empty_wq,
                 apr_pool_t *result_pool,
@@ -409,6 +409,10 @@ svn_wc__db_get_wcroot(const char **wcroo
    when the value of NEW_ACTUAL_PROPS matches NEW_PROPS, store NULL in
    ACTUAL, to mark the properties unmodified.
 
+   If NEW_IPROPS is not NULL, then it is a depth-first ordered array of
+   svn_prop_inherited_item_t * structures that is set as the base node's
+   inherited_properties.
+
    Any work items that are necessary as part of this node construction may
    be passed in WORK_ITEMS.
 
@@ -432,6 +436,7 @@ svn_wc__db_base_add_directory(svn_wc__db
                               const svn_skel_t *conflict,
                               svn_boolean_t update_actual_props,
                               apr_hash_t *new_actual_props,
+                              apr_array_header_t *new_iprops,
                               const svn_skel_t *work_items,
                               apr_pool_t *scratch_pool);
 
@@ -1036,6 +1041,7 @@ svn_wc__db_external_add_file(svn_wc__db_
                              svn_revnum_t revision,
 
                              const apr_hash_t *props,
+                             apr_array_header_t *iprops,
 
                              svn_revnum_t changed_rev,
                              apr_time_t changed_date,
@@ -1923,7 +1929,7 @@ struct svn_wc__db_info_t {
   svn_boolean_t incomplete; /* TRUE if a working node is incomplete */
 
   const char *moved_to_abspath; /* Only on op-roots. See svn_wc_status3_t. */
-  svn_boolean_t moved_here;     /* On both op-roots and children. */
+  svn_boolean_t moved_here;     /* Only on op-roots. */
 
   svn_boolean_t file_external;
 };
@@ -2084,6 +2090,39 @@ svn_wc__db_read_pristine_props(apr_hash_
                                apr_pool_t *result_pool,
                                apr_pool_t *scratch_pool);
 
+/* Read a BASE node's inherited property information.
+
+   Set *IPROPS to to a depth-first ordered array of
+   svn_prop_inherited_item_t * structures representing the cached
+   inherited properties for the BASE node at LOCAL_ABSPATH.
+
+   If no cached properties are found, then set *IPROPS to NULL.
+   If LOCAL_ABSPATH represents the root of the repository, then set
+   *IPROPS to an empty array.
+
+   Allocate *IPROPS in RESULT_POOL, use SCRATCH_POOL for temporary
+   allocations. */
+svn_error_t *
+svn_wc__db_read_cached_iprops(apr_array_header_t **iprops,
+                              svn_wc__db_t *db,
+                              const char *local_abspath,
+                              apr_pool_t *result_pool,
+                              apr_pool_t *scratch_pool);
+
+/* Find BASE nodes with cached inherited properties.
+
+   Set *IPROPS_PATHS to a hash mapping const char * absolute working copy
+   paths to the same for each path in the working copy at or below
+   LOCAL_ABSPATH, limited by DEPTH, that has cached inherited properties
+   for the BASE node of the path.  Allocate *IPROP_PATHS in RESULT_POOL.
+   Use SCRATCH_POOL for temporary allocations. */
+svn_error_t *
+svn_wc__db_get_children_with_cached_iprops(apr_hash_t **iprop_paths,
+                                           svn_depth_t depth,
+                                           const char *local_abspath,
+                                           svn_wc__db_t *db,
+                                           apr_pool_t *result_pool,
+                                           apr_pool_t *scratch_pool);
 
 /** Obtain a mapping of const char * local_abspaths to const svn_string_t*
  * property values in *VALUES, of all PROPNAME properties on LOCAL_ABSPATH
@@ -2396,6 +2435,12 @@ svn_wc__db_global_update(svn_wc__db_t *d
    EXCLUDE_RELPATHS is a hash containing const char *local_relpath.  Nodes
    for pathnames contained in EXCLUDE_RELPATHS are not touched by this
    function.  These pathnames should be paths relative to the wcroot.
+
+   If WCROOT_IPROPS is not NULL it is a hash mapping const char * absolute
+   working copy paths to depth-first ordered arrays of
+   svn_prop_inherited_item_t * structures.  If LOCAL_ABSPATH exists in
+   WCROOT_IPROPS, then set the hashed value as the node's inherited
+   properties.
 */
 svn_error_t *
 svn_wc__db_op_bump_revisions_post_update(svn_wc__db_t *db,
@@ -2406,6 +2451,7 @@ svn_wc__db_op_bump_revisions_post_update
                                          const char *new_repos_uuid,
                                          svn_revnum_t new_revision,
                                          apr_hash_t *exclude_relpaths,
+                                         apr_hash_t *wcroot_iprops,
                                          apr_pool_t *scratch_pool);
 
 
@@ -3135,6 +3181,21 @@ svn_wc__db_follow_moved_to(apr_array_hea
                            apr_pool_t *result_pool,
                            apr_pool_t *scratch_pool);
 
+/* Update a moved-away tree conflict victim at VICTIM_ABSPATH with changes
+ * brought in by the update operation which flagged the tree conflict.
+ * Set *WORK_ITEMS to a list of work items, allocated in RESULT_POOL, that
+ * need to run as part of marking the conflict resolved. */
+svn_error_t *
+svn_wc__db_update_moved_away_conflict_victim(svn_skel_t **work_items,
+                                             const char *victim_abspath,
+                                             svn_wc__db_t *db,
+                                             svn_wc_notify_func2_t notify_func,
+                                             void *notify_baton,
+                                             svn_cancel_func_t cancel_func,
+                                             void *cancel_baton,
+                                             apr_pool_t *result_pool,
+                                             apr_pool_t *scratch_pool);
+
 /* @} */
 
 

Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db_private.h?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db_private.h (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db_private.h Tue Oct 30 20:03:28 2012
@@ -36,7 +36,7 @@
 struct svn_wc__db_t {
   /* We need the config whenever we run into a new WC directory, in order
      to figure out where we should look for the corresponding datastore. */
-  const svn_config_t *config;
+  svn_config_t *config;
 
   /* Should we attempt to automatically upgrade the database when it is
      opened, and found to be not-current?  */
@@ -170,6 +170,7 @@ svn_wc__db_util_open_db(svn_sqlite__db_t
                         const char *dir_abspath,
                         const char *sdb_fname,
                         svn_sqlite__mode_t smode,
+                        svn_boolean_t exclusive,
                         const char *const *my_statements,
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool);
@@ -207,6 +208,50 @@ svn_wc__db_read_info_internal(svn_wc__db
                               apr_pool_t *result_pool,
                               apr_pool_t *scratch_pool);
 
+/* Like svn_wc__db_scan_deletion(), but with WCROOT+LOCAL_RELPATH instead of
+   DB+LOCAL_ABSPATH, and outputting relpaths instead of abspaths. */
+svn_error_t *
+svn_wc__db_scan_deletion_internal(const char **base_del_relpath,
+                                  const char **moved_to_relpath,
+                                  const char **work_del_relpath,
+                                  const char **moved_to_op_root_relpath,
+                                  svn_wc__db_wcroot_t *wcroot,
+                                  const char *local_relpath,
+                                  apr_pool_t *result_pool,
+                                  apr_pool_t *scratch_pool);
+
+/* Like svn_wc__db_base_get_info(), but taking WCROOT+LOCAL_RELPATH instead of
+   DB+LOCAL_ABSPATH and outputting REPOS_ID instead of URL+UUID. */
+svn_error_t *
+svn_wc__db_base_get_info_internal(svn_wc__db_status_t *status,
+                                  svn_kind_t *kind,
+                                  svn_revnum_t *revision,
+                                  const char **repos_relpath,
+                                  apr_int64_t *repos_id,
+                                  svn_revnum_t *changed_rev,
+                                  apr_time_t *changed_date,
+                                  const char **changed_author,
+                                  svn_depth_t *depth,
+                                  const svn_checksum_t **checksum,
+                                  const char **target,
+                                  svn_wc__db_lock_t **lock,
+                                  svn_boolean_t *had_props,
+                                  svn_boolean_t *update_root,
+                                  svn_wc__db_wcroot_t *wcroot,
+                                  const char *local_relpath,
+                                  apr_pool_t *result_pool,
+                                  apr_pool_t *scratch_pool);
+
+
+/* Like svn_wc__db_read_conflict(), but with WCROOT+LOCAL_RELPATH instead of
+   DB+LOCAL_ABSPATH, and outputting relpaths instead of abspaths. */
+svn_error_t *
+svn_wc__db_read_conflict_internal(svn_skel_t **conflict,
+                                  svn_wc__db_wcroot_t *wcroot,
+                                  const char *local_relpath,
+                                  apr_pool_t *result_pool,
+                                  apr_pool_t *scratch_pool);
+
 
 /* Transaction handling */
 

Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db_util.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db_util.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db_util.c Tue Oct 30 20:03:28 2012
@@ -114,6 +114,7 @@ svn_wc__db_util_open_db(svn_sqlite__db_t
                         const char *dir_abspath,
                         const char *sdb_fname,
                         svn_sqlite__mode_t smode,
+                        svn_boolean_t exclusive,
                         const char *const *my_statements,
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool)
@@ -140,6 +141,9 @@ svn_wc__db_util_open_db(svn_sqlite__db_t
                            my_statements ? my_statements : statements,
                            0, NULL, result_pool, scratch_pool));
 
+  if (exclusive)
+    SVN_ERR(svn_sqlite__exec_statements(*sdb, STMT_PRAGMA_LOCKING_MODE));
+
   SVN_ERR(svn_sqlite__create_scalar_function(*sdb, "relpath_depth", 1,
                                              relpath_depth, NULL));
 

Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db_wcroot.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db_wcroot.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db_wcroot.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db_wcroot.c Tue Oct 30 20:03:28 2012
@@ -26,6 +26,7 @@
 #include <assert.h>
 
 #include "svn_dirent_uri.h"
+#include "svn_path.h"
 
 #include "wc.h"
 #include "adm_files.h"
@@ -185,7 +186,7 @@ close_wcroot(void *data)
 
 svn_error_t *
 svn_wc__db_open(svn_wc__db_t **db,
-                const svn_config_t *config,
+                svn_config_t *config,
                 svn_boolean_t auto_upgrade,
                 svn_boolean_t enforce_empty_wq,
                 apr_pool_t *result_pool,
@@ -353,6 +354,40 @@ compute_relpath(const svn_wc__db_wcroot_
 }
 
 
+/* Return in *LINK_TARGET_ABSPATH the absolute path the symlink at
+ * LOCAL_ABSPATH is pointing to. Perform all allocations in POOL. */
+static svn_error_t *
+read_link_target(const char **link_target_abspath,
+                 const char *local_abspath,
+                 apr_pool_t *pool)
+{
+  svn_string_t *link_target;
+  const char *canon_link_target;
+
+  SVN_ERR(svn_io_read_link(&link_target, local_abspath, pool));
+  if (link_target->len == 0)
+    return svn_error_createf(SVN_ERR_WC_NOT_SYMLINK, NULL,
+                             _("The symlink at '%s' points nowhere"),
+                             svn_dirent_local_style(local_abspath, pool));
+
+  canon_link_target = svn_dirent_canonicalize(link_target->data, pool);
+                
+  /* Treat relative symlinks as relative to LOCAL_ABSPATH's parent. */
+  if (!svn_dirent_is_absolute(canon_link_target))
+    canon_link_target = svn_dirent_join(svn_dirent_dirname(local_abspath,
+                                                           pool),
+                                        canon_link_target, pool);
+
+  /* Collapse any .. in the symlink part of the path. */
+  if (svn_path_is_backpath_present(canon_link_target))
+    SVN_ERR(svn_dirent_get_absolute(link_target_abspath, canon_link_target,
+                                    pool));
+  else
+    *link_target_abspath = canon_link_target;
+
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *
 svn_wc__db_wcroot_parse_local_abspath(svn_wc__db_wcroot_t **wcroot,
                                       const char **local_relpath,
@@ -473,6 +508,18 @@ svn_wc__db_wcroot_parse_local_abspath(sv
 
       if (adm_subdir_kind == svn_node_dir)
         {
+          svn_boolean_t sqlite_exclusive = FALSE;
+
+          err = svn_config_get_bool(db->config, &sqlite_exclusive,
+                                    SVN_CONFIG_SECTION_WORKING_COPY,
+                                    SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE,
+                                    FALSE);
+          if (err)
+            {
+              svn_error_clear(err);
+              sqlite_exclusive = FALSE;
+            }
+
           /* We always open the database in read/write mode.  If the database
              isn't writable in the filesystem, SQLite will internally open
              it as read-only, and we'll get an error if we try to do a write
@@ -482,7 +529,8 @@ svn_wc__db_wcroot_parse_local_abspath(sv
              we're caching database handles, it make sense to be as permissive
              as the filesystem allows. */
           err = svn_wc__db_util_open_db(&sdb, local_abspath, SDB_FILE,
-                                        svn_sqlite__mode_readwrite, NULL,
+                                        svn_sqlite__mode_readwrite,
+                                        sqlite_exclusive, NULL,
                                         db->state_pool, scratch_pool);
           if (err == NULL)
             {
@@ -543,6 +591,8 @@ svn_wc__db_wcroot_parse_local_abspath(sv
                   if (found_wcroot)
                     break;
 
+                  SVN_ERR(read_link_target(&local_abspath, local_abspath,
+                                           scratch_pool));
 try_symlink_as_dir:
                   kind = svn_kind_dir;
                   moved_upwards = FALSE;
@@ -692,7 +742,11 @@ try_symlink_as_dir:
                                              scratch_pool));
           if (resolved_kind == svn_node_dir)
             {
-              local_abspath = original_abspath;
+              SVN_ERR(read_link_target(&local_abspath, original_abspath,
+                                       scratch_pool));
+              /* This handle was opened in this function but is not going
+                 to be used further so close it. */
+              SVN_ERR(svn_sqlite__close(sdb));
               goto try_symlink_as_dir;
             }
         }

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/dav_svn.h?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/dav_svn.h Tue Oct 30 20:03:28 2012
@@ -304,9 +304,6 @@ svn_boolean_t dav_svn__get_autoversionin
 /* for the repository referred to by this request, are bulk updates allowed? */
 svn_boolean_t dav_svn__get_bulk_updates_flag(request_rec *r);
 
-/* for the repository referred to by this request, should httpv2 be advertised? */
-svn_boolean_t dav_svn__get_v2_protocol_flag(request_rec *r);
-
 /* for the repository referred to by this request, are subrequests active? */
 svn_boolean_t dav_svn__get_pathauthz_flag(request_rec *r);
 
@@ -328,6 +325,17 @@ authz_svn__subreq_bypass_func_t dav_svn_
    SVNParentPath allowed? */
 svn_boolean_t dav_svn__get_list_parentpath_flag(request_rec *r);
 
+/* For the repository referred to by this request, should HTTPv2
+   protocol support be advertised?  Note that this also takes into
+   account the support level expected of based on the specified
+   master server version (if provided via SVNMasterVersion).  */
+svn_boolean_t dav_svn__check_httpv2_support(request_rec *r);
+
+/* For the repository referred to by this request, should ephemeral
+   txnprop support be advertised?  */
+svn_boolean_t dav_svn__check_ephemeral_txnprops_support(request_rec *r);
+
+
 
 /* SPECIAL URI
 
@@ -376,6 +384,11 @@ const char *dav_svn__get_xslt_uri(reques
 /* ### Is this assumed to be URI-encoded? */
 const char *dav_svn__get_master_uri(request_rec *r);
 
+/* Return the version of the master server (used for mirroring) iff a
+   master URI is in place for this location; otherwise, return NULL.
+   Comes from the <SVNMasterVersion> directive. */
+svn_version_t *dav_svn__get_master_version(request_rec *r);
+
 /* Return the disk path to the activities db.
    Comes from the <SVNActivitiesDB> directive. */
 const char *dav_svn__get_activities_db(request_rec *r);
@@ -386,7 +399,7 @@ const char *dav_svn__get_activities_db(r
 const char *dav_svn__get_root_dir(request_rec *r);
 
 /* Return the data compression level to be used over the wire. */
-int dav_svn__get_compression_level(void);
+int dav_svn__get_compression_level(request_rec *r);
 
 /* Return the hook script environment parsed from the configuration. */
 const char *dav_svn__get_hooks_env(request_rec *r);
@@ -627,6 +640,7 @@ static const dav_report_elem dav_svn__re
   { SVN_XML_NAMESPACE, "replay-report" },
   { SVN_XML_NAMESPACE, "get-deleted-rev-report" },
   { SVN_XML_NAMESPACE, SVN_DAV__MERGEINFO_REPORT },
+  { SVN_XML_NAMESPACE, SVN_DAV__INHERITED_PROPS_REPORT },
   { NULL, NULL },
 };
 
@@ -674,6 +688,10 @@ dav_svn__get_deleted_rev_report(const da
                                 const apr_xml_doc *doc,
                                 ap_filter_t *output);
 
+dav_error *
+dav_svn__get_inherited_props_report(const dav_resource *resource,
+                                    const apr_xml_doc *doc,
+                                    ap_filter_t *output);
 
 /*** posts/ ***/
 
@@ -741,7 +759,11 @@ dav_svn__authz_read_func(dav_svn__authz_
    processing.  See dav_new_error_tag for parameter documentation.
    Note that DESC may be null (it's hard to track this down from
    dav_new_error_tag()'s documentation, but see the dav_error type,
-   which says that its desc field may be NULL). */
+   which says that its desc field may be NULL).
+
+   If ERROR_ID is 0, SVN_ERR_RA_DAV_REQUEST_FAILED will be used as a
+   default value for the error code.
+*/
 dav_error *
 dav_svn__new_error_tag(apr_pool_t *pool,
                        int status,
@@ -756,7 +778,11 @@ dav_svn__new_error_tag(apr_pool_t *pool,
    processing.  See dav_new_error for parameter documentation.
    Note that DESC may be null (it's hard to track this down from
    dav_new_error()'s documentation, but see the dav_error type,
-   which says that its desc field may be NULL). */
+   which says that its desc field may be NULL).
+
+   If ERROR_ID is 0, SVN_ERR_RA_DAV_REQUEST_FAILED will be used as a
+   default value for the error code.
+*/
 dav_error *
 dav_svn__new_error(apr_pool_t *pool,
                    int status,

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/deadprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/deadprops.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/deadprops.c (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/deadprops.c Tue Oct 30 20:03:28 2012
@@ -1,5 +1,7 @@
 /*
- * deadprops.c: mod_dav_svn dead property provider functions for Subversion
+ * deadprops.c: mod_dav_svn provider functions for "dead properties"
+ *              (properties implemented by Subversion or its users,
+ *              not as part of the WebDAV specification).
  *
  * ====================================================================
  *    Licensed to the Apache Software Foundation (ASF) under one
@@ -512,10 +514,6 @@ db_store(dav_db *db,
   /* ### namespace check? */
   if (elem->first_child && !strcmp(elem->first_child->name, SVN_DAV__OLD_VALUE))
     {
-      const char *propname;
-
-      get_repos_propname(db, name, &propname);
-
       /* Parse OLD_PROPVAL. */
       old_propval = svn_string_create(dav_xml_get_cdata(elem->first_child, pool,
                                                         0 /* strip_white */),

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/liveprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/liveprops.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/liveprops.c Tue Oct 30 20:03:28 2012
@@ -1,5 +1,7 @@
 /*
- * liveprops.c: mod_dav_svn live property provider functions for Subversion
+ * liveprops.c: mod_dav_svn provider functions for "live properties"
+ *              (properties implemented by the WebDAV specification
+ *              itself, not unique to Subversion or its users).
  *
  * ====================================================================
  *    Licensed to the Apache Software Foundation (ASF) under one
@@ -275,8 +277,8 @@ insert_prop_internal(const dav_resource 
                      int propid,
                      dav_prop_insert what,
                      apr_text_header *phdr,
-                     apr_pool_t *scratch_pool,
-                     apr_pool_t *result_pool)
+                     apr_pool_t *result_pool,
+                     apr_pool_t *scratch_pool)
 {
   const char *value = NULL;
   const char *s;
@@ -820,7 +822,7 @@ insert_prop(const dav_resource *resource
   scratch_pool = svn_pool_create(result_pool);
 
   rv = insert_prop_internal(resource, propid, what, phdr,
-                              scratch_pool, result_pool);
+                            result_pool, scratch_pool);
 
   svn_pool_destroy(scratch_pool);
   return rv;
@@ -958,7 +960,7 @@ dav_svn__insert_all_liveprops(request_re
     {
       svn_pool_clear(iterpool);
       (void) insert_prop_internal(resource, spec->propid, what, phdr,
-                                  iterpool, resource->pool);
+                                  resource->pool, iterpool);
     }
   svn_pool_destroy(iterpool);
 

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/mod_dav_svn.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/mod_dav_svn.c Tue Oct 30 20:03:28 2012
@@ -42,6 +42,7 @@
 #include "mod_dav_svn.h"
 
 #include "private/svn_fspath.h"
+#include "private/svn_subr_private.h"
 
 #include "dav_svn.h"
 #include "mod_authz_svn.h"
@@ -59,6 +60,12 @@
 typedef struct server_conf_t {
   const char *special_uri;
   svn_boolean_t use_utf8;
+
+  /* The compression level we will pass to svn_txdelta_to_svndiff3()
+   * for wire-compression. Negative value used to specify default
+     compression level. */
+  int compression_level;
+
 } server_conf_t;
 
 
@@ -92,6 +99,7 @@ typedef struct dir_conf_t {
   enum conf_flag list_parentpath;    /* whether to allow GET of parentpath */
   const char *root_dir;              /* our top-level directory */
   const char *master_uri;            /* URI to the master SVN repos */
+  svn_version_t *master_version;     /* version of master server */
   const char *activities_db;         /* path to activities database(s) */
   enum conf_flag txdelta_cache;      /* whether to enable txdelta caching */
   enum conf_flag fulltext_cache;     /* whether to enable fulltext caching */
@@ -109,10 +117,6 @@ extern module AP_MODULE_DECLARE_DATA dav
 /* The authz_svn provider for bypassing path authz. */
 static authz_svn__subreq_bypass_func_t pathauthz_bypass_func = NULL;
 
-/* The compression level we will pass to svn_txdelta_to_svndiff3()
- * for wire-compression */
-static int svn__compression_level = SVN_DELTA_COMPRESSION_LEVEL_DEFAULT;
-
 static int
 init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 {
@@ -163,7 +167,11 @@ init_dso(apr_pool_t *pconf, apr_pool_t *
 static void *
 create_server_config(apr_pool_t *p, server_rec *s)
 {
-  return apr_pcalloc(p, sizeof(server_conf_t));
+  server_conf_t *conf = apr_pcalloc(p, sizeof(server_conf_t));
+
+  conf->compression_level = -1;
+
+  return conf;
 }
 
 
@@ -179,6 +187,17 @@ merge_server_config(apr_pool_t *p, void 
 
   newconf->special_uri = INHERIT_VALUE(parent, child, special_uri);
 
+  if (child->compression_level < 0)
+    {
+      /* Inherit compression level from parent if not configured for this
+         VirtualHost. */
+      newconf->compression_level = parent->compression_level;
+    }
+  else
+    {
+      newconf->compression_level = child->compression_level;
+    }
+
   return newconf;
 }
 
@@ -214,6 +233,7 @@ merge_dir_config(apr_pool_t *p, void *ba
 
   newconf->fs_path = INHERIT_VALUE(parent, child, fs_path);
   newconf->master_uri = INHERIT_VALUE(parent, child, master_uri);
+  newconf->master_version = INHERIT_VALUE(parent, child, master_version);
   newconf->activities_db = INHERIT_VALUE(parent, child, activities_db);
   newconf->repo_name = INHERIT_VALUE(parent, child, repo_name);
   newconf->xslt_uri = INHERIT_VALUE(parent, child, xslt_uri);
@@ -282,6 +302,25 @@ SVNMasterURI_cmd(cmd_parms *cmd, void *c
 
 
 static const char *
+SVNMasterVersion_cmd(cmd_parms *cmd, void *config, const char *arg1)
+{
+  dir_conf_t *conf = config;
+  svn_error_t *err;
+  svn_version_t *version;
+
+  err = svn_version__parse_version_string(&version, arg1, cmd->pool);
+  if (err)
+    {
+      svn_error_clear(err);
+      return "Malformed master server version string.";
+    }
+  
+  conf->master_version = version;
+  return NULL;
+}
+
+
+static const char *
 SVNActivitiesDB_cmd(cmd_parms *cmd, void *config, const char *arg1)
 {
   dir_conf_t *conf = config;
@@ -513,6 +552,7 @@ SVNInMemoryCacheSize_cmd(cmd_parms *cmd,
 static const char *
 SVNCompressionLevel_cmd(cmd_parms *cmd, void *config, const char *arg1)
 {
+  server_conf_t *conf;
   int value = 0;
   svn_error_t *err = svn_cstring_atoi(&value, arg1);
   if (err)
@@ -530,7 +570,9 @@ SVNCompressionLevel_cmd(cmd_parms *cmd, 
                         (int)SVN_DELTA_COMPRESSION_LEVEL_NONE,
                         (int)SVN_DELTA_COMPRESSION_LEVEL_MAX);
 
-  svn__compression_level = value;
+  conf = ap_get_module_config(cmd->server->module_config,
+                              &dav_svn_module);
+  conf->compression_level = value;
 
   return NULL;
 }
@@ -655,6 +697,16 @@ dav_svn__get_master_uri(request_rec *r)
 }
 
 
+svn_version_t *
+dav_svn__get_master_version(request_rec *r)
+{
+  dir_conf_t *conf;
+
+  conf = ap_get_module_config(r->per_dir_config, &dav_svn_module);
+  return conf->master_uri ? conf->master_version : NULL;
+}
+
+
 const char *
 dav_svn__get_xslt_uri(request_rec *r)
 {
@@ -752,12 +804,39 @@ dav_svn__get_bulk_updates_flag(request_r
 
 
 svn_boolean_t
-dav_svn__get_v2_protocol_flag(request_rec *r)
+dav_svn__check_httpv2_support(request_rec *r)
 {
   dir_conf_t *conf;
+  svn_boolean_t available;
 
   conf = ap_get_module_config(r->per_dir_config, &dav_svn_module);
-  return conf->v2_protocol == CONF_FLAG_ON;
+  available = conf->v2_protocol == CONF_FLAG_ON;
+
+  /* If our configuration says that HTTPv2 is available, but we are
+     proxying requests to a master Subversion server which lacks
+     support for HTTPv2, we dumb ourselves down. */
+  if (available)
+    {
+      svn_version_t *version = dav_svn__get_master_version(r);
+      if (version && (! svn_version__at_least(version, 1, 7, 0)))
+        available = FALSE;
+    }
+  return available;
+}
+
+
+svn_boolean_t
+dav_svn__check_ephemeral_txnprops_support(request_rec *r)
+{
+  svn_version_t *version = dav_svn__get_master_version(r);
+
+  /* We know this server supports ephemeral txnprops.  But if we're
+     proxying requests to a master server, we need to see if it
+     supports them, too.  */
+  if (version && (! svn_version__at_least(version, 1, 8, 0)))
+    return FALSE;
+
+  return TRUE;
 }
 
 
@@ -839,9 +918,21 @@ dav_svn__get_revprop_cache_flag(request_
 
 
 int
-dav_svn__get_compression_level(void)
+dav_svn__get_compression_level(request_rec *r)
 {
-  return svn__compression_level;
+  server_conf_t *conf;
+
+  conf = ap_get_module_config(r->server->module_config,
+                              &dav_svn_module);
+
+  if (conf->compression_level < 0)
+    {
+      return SVN_DELTA_COMPRESSION_LEVEL_DEFAULT;
+    }
+  else
+    {
+      return conf->compression_level;
+    }
 }
 
 const char *
@@ -1043,6 +1134,11 @@ static const command_rec cmds[] =
                 "specifies a URI to access a master Subversion repository"),
 
   /* per directory/location */
+  AP_INIT_TAKE1("SVNMasterVersion", SVNMasterVersion_cmd, NULL, ACCESS_CONF,
+                "specifies the Subversion release version of a master "
+                "Subversion server "),
+  
+  /* per directory/location */
   AP_INIT_TAKE1("SVNActivitiesDB", SVNActivitiesDB_cmd, NULL, ACCESS_CONF,
                 "specifies the location in the filesystem in which the "
                 "activities database(s) should be stored"),

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/file-revs.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/file-revs.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/file-revs.c (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/file-revs.c Tue Oct 30 20:03:28 2012
@@ -52,6 +52,9 @@ struct file_rev_baton {
   /* SVNDIFF version to use when sending to client.  */
   int svndiff_version;
 
+  /* Compression level to use for SVNDIFF. */
+  int compression_level;
+
   /* Used by the delta iwndow handler. */
   svn_txdelta_window_handler_t window_handler;
   void *window_baton;
@@ -208,7 +211,7 @@ file_rev_handler(void *baton,
                                                          pool);
       svn_txdelta_to_svndiff3(&frb->window_handler, &frb->window_baton,
                               base64_stream, frb->svndiff_version,
-                              dav_svn__get_compression_level(), pool);
+                              frb->compression_level, pool);
       *window_handler = delta_window_handler;
       *window_baton = frb;
       /* Start the txdelta element wich will be terminated by the window
@@ -306,6 +309,7 @@ dav_svn__file_revs_report(const dav_reso
   frb.output = output;
   frb.needs_header = TRUE;
   frb.svndiff_version = resource->info->svndiff_version;
+  frb.compression_level = dav_svn__get_compression_level(resource->info->r);
 
   /* file_rev_handler will send header first time it is called. */
 

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/replay.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/replay.c (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/replay.c Tue Oct 30 20:03:28 2012
@@ -47,6 +47,7 @@ typedef struct edit_baton_t {
   ap_filter_t *output;
   svn_boolean_t started;
   svn_boolean_t sending_textdelta;
+  int compression_level;
 } edit_baton_t;
 
 
@@ -326,7 +327,7 @@ apply_textdelta(void *file_baton,
                                                              eb->output,
                                                              pool),
                           0,
-                          dav_svn__get_compression_level(),
+                          eb->compression_level,
                           pool);
 
   eb->sending_textdelta = TRUE;
@@ -367,6 +368,7 @@ make_editor(const svn_delta_editor_t **e
             void **edit_baton,
             apr_bucket_brigade *bb,
             ap_filter_t *output,
+            int compression_level,
             apr_pool_t *pool)
 {
   edit_baton_t *eb = apr_pcalloc(pool, sizeof(*eb));
@@ -376,6 +378,7 @@ make_editor(const svn_delta_editor_t **e
   eb->output = output;
   eb->started = FALSE;
   eb->sending_textdelta = FALSE;
+  eb->compression_level = compression_level;
 
   e->set_target_revision = set_target_revision;
   e->open_root = open_root;
@@ -506,7 +509,9 @@ dav_svn__replay_report(const dav_resourc
       goto cleanup;
     }
 
-  make_editor(&editor, &edit_baton, bb, output, resource->pool);
+  make_editor(&editor, &edit_baton, bb, output,
+              dav_svn__get_compression_level(resource->info->r),
+              resource->pool);
 
   if ((err = svn_repos_replay2(root, base_dir, low_water_mark,
                                send_deltas, editor, edit_baton,

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/update.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/update.c Tue Oct 30 20:03:28 2012
@@ -88,6 +88,9 @@ typedef struct update_ctx_t {
   /* SVNDIFF version to send to client.  */
   int svndiff_version;
 
+  /* Compression level of SVNDIFF deltas. */
+  int compression_level;
+
   /* Did the client submit this REPORT request via the HTTPv2 "me
      resource" and are we advertising support for as much? */
   svn_boolean_t enable_v2_response;
@@ -840,7 +843,7 @@ upd_apply_textdelta(void *file_baton,
 
   svn_txdelta_to_svndiff3(&(wb->handler), &(wb->handler_baton),
                           base64_stream, file->uc->svndiff_version,
-                          dav_svn__get_compression_level(), file->pool);
+                          file->uc->compression_level, file->pool);
 
   *handler = window_handler;
   *handler_baton = wb;
@@ -919,6 +922,49 @@ malformed_element_error(const char *tagn
 }
 
 
+/* Validate that REVISION is a valid revision number for repository in
+   which YOUNGEST is the latest revision.  Use RESOURCE as a
+   convenient way to access the request record and a pool for error
+   messaging.   (It's okay if REVISION is SVN_INVALID_REVNUM, as in
+   the related contexts that just means "the youngest revision".)
+
+   REVTYPE is just a string describing the type/purpose of REVISION,
+   used in the generated error string.  */
+static dav_error *
+validate_input_revision(svn_revnum_t revision,
+                        svn_revnum_t youngest,
+                        const char *revtype,
+                        const dav_resource *resource)
+{
+  if (! SVN_IS_VALID_REVNUM(revision))
+    return SVN_NO_ERROR;
+    
+  if (revision > youngest)
+    {
+      svn_error_t *serr;
+
+      if (dav_svn__get_master_uri(resource->info->r))
+        {
+          serr = svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, 0,
+                                   "No such %s '%ld' found in the repository.  "
+                                   "Perhaps the repository is out of date with "
+                                   "respect to the master repository?",
+                                   revtype, revision);
+        }
+      else
+        {
+          serr = svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, 0,
+                                   "No such %s '%ld' found in the repository.",
+                                   revtype, revision);
+        }
+      return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
+                                  "Invalid revision found in update report "
+                                  "request.", resource->pool);
+    }
+  return SVN_NO_ERROR;
+}
+
+
 dav_error *
 dav_svn__update_report(const dav_resource *resource,
                        const apr_xml_doc *doc,
@@ -928,8 +974,7 @@ dav_svn__update_report(const dav_resourc
   apr_xml_elem *child;
   void *rbaton = NULL;
   update_ctx_t uc = { 0 };
-  svn_revnum_t revnum = SVN_INVALID_REVNUM;
-  svn_boolean_t revnum_is_head = FALSE;
+  svn_revnum_t youngest, revnum = SVN_INVALID_REVNUM;
   svn_revnum_t from_revnum = SVN_INVALID_REVNUM;
   int ns;
   /* entry_counter and entry_is_empty are for operational logging. */
@@ -995,6 +1040,14 @@ dav_svn__update_report(const dav_resourc
         }
     }
 
+  /* Ask the repository about its youngest revision (which we'll need
+     for some input validation later). */
+  if ((serr = svn_fs_youngest_rev(&youngest, repos->fs, resource->pool)))
+    return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
+                                "Could not determine the youngest "
+                                "revision for the update process.",
+                                resource->pool);
+
   for (child = doc->root->first_child; child != NULL; child = child->next)
     {
       /* Note that child->name might not match any of the cases below.
@@ -1122,6 +1175,23 @@ dav_svn__update_report(const dav_resourc
         }
     }
 
+  /* If a target revision wasn't requested, or the requested target
+     revision was invalid, just update to HEAD as of the moment we
+     queried the youngest revision.  Otherwise, at least make sure the
+     request makes sense in light of that youngest revision
+     number.  */
+  if (! SVN_IS_VALID_REVNUM(revnum))
+    {
+      revnum = youngest;
+    }
+  else
+    {
+      derr = validate_input_revision(revnum, youngest, "target revision",
+                                     resource);
+      if (derr)
+        return derr;
+    }
+
   if (!saw_depth && !saw_recursive && (requested_depth == svn_depth_unknown))
     requested_depth = svn_depth_infinity;
 
@@ -1137,19 +1207,8 @@ dav_svn__update_report(const dav_resourc
          SVN_DAV_ERROR_TAG);
     }
 
-  /* If a revision for this operation was not dictated to us, this
-     means "update to whatever the current HEAD is now". */
-  if (revnum == SVN_INVALID_REVNUM)
-    {
-      if ((serr = svn_fs_youngest_rev(&revnum, repos->fs, resource->pool)))
-        return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
-                                    "Could not determine the youngest "
-                                    "revision for the update process.",
-                                    resource->pool);
-      revnum_is_head = TRUE;
-    }
-
   uc.svndiff_version = resource->info->svndiff_version;
+  uc.compression_level = dav_svn__get_compression_level(resource->info->r);
   uc.resource = resource;
   uc.output = output;
   uc.anchor = src_path;
@@ -1219,7 +1278,7 @@ dav_svn__update_report(const dav_resourc
   editor->close_file = upd_close_file;
   editor->absent_file = upd_absent_file;
   editor->close_edit = upd_close_edit;
-  if ((serr = svn_repos_begin_report2(&rbaton, revnum,
+  if ((serr = svn_repos_begin_report3(&rbaton, revnum,
                                       repos->repos,
                                       src_path, target,
                                       dst_path,
@@ -1230,6 +1289,7 @@ dav_svn__update_report(const dav_resourc
                                       editor, &uc,
                                       dav_svn__authz_read_func(&arb),
                                       &arb,
+                                      0,  /* disable zero-copy for now */
                                       resource->pool)))
     {
       return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
@@ -1265,27 +1325,10 @@ dav_svn__update_report(const dav_resourc
                   {
                     rev = SVN_STR_TO_REV(this_attr->value);
                     saw_rev = TRUE;
-                    if (revnum_is_head && rev > revnum)
-                      {
-                        if (dav_svn__get_master_uri(resource->info->r))
-                          return dav_svn__new_error_tag(
-                                     resource->pool,
-                                     HTTP_INTERNAL_SERVER_ERROR, 0,
-                                     "A reported revision is higher than the "
-                                     "current repository HEAD revision.  "
-                                     "Perhaps the repository is out of date "
-                                     "with respect to the master repository?",
-                                     SVN_DAV_ERROR_NAMESPACE,
-                                     SVN_DAV_ERROR_TAG);
-                        else
-                          return dav_svn__new_error_tag(
-                                     resource->pool,
-                                     HTTP_INTERNAL_SERVER_ERROR, 0,
-                                     "A reported revision is higher than the "
-                                     "current repository HEAD revision.",
-                                     SVN_DAV_ERROR_NAMESPACE,
-                                     SVN_DAV_ERROR_TAG);
-                      }
+                    if ((derr = validate_input_revision(rev, youngest,
+                                                        "reported revision",
+                                                        resource)))
+                      return derr;
                   }
                 else if (strcmp(this_attr->name, "depth") == 0)
                   depth = svn_depth_from_word(this_attr->value);

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/repos.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/repos.c Tue Oct 30 20:03:28 2012
@@ -1502,7 +1502,7 @@ get_parentpath_resource(request_rec *r,
   repos->xslt_uri = dav_svn__get_xslt_uri(r);
   repos->autoversioning = dav_svn__get_autoversioning_flag(r);
   repos->bulk_updates = dav_svn__get_bulk_updates_flag(r);
-  repos->v2_protocol = dav_svn__get_v2_protocol_flag(r);
+  repos->v2_protocol = dav_svn__check_httpv2_support(r);
   repos->base_url = ap_construct_url(r->pool, "", r);
   repos->special_uri = dav_svn__get_special_uri(r);
   repos->username = r->user;
@@ -2082,7 +2082,7 @@ get_resource(request_rec *r,
   repos->bulk_updates = dav_svn__get_bulk_updates_flag(r);
 
   /* Are we advertising HTTP v2 protocol support? */
-  repos->v2_protocol = dav_svn__get_v2_protocol_flag(r);
+  repos->v2_protocol = dav_svn__check_httpv2_support(r);
 
   /* Path to activities database */
   repos->activities_db = dav_svn__get_activities_db(r);
@@ -2223,8 +2223,12 @@ get_resource(request_rec *r,
         }
 
       /* Configure hook script environment variables. */
-      svn_repos_hooks_setenv(repos->repos, dav_svn__get_hooks_env(r),
-                             r->connection->pool, r->pool);
+      serr = svn_repos_hooks_setenv(repos->repos, dav_svn__get_hooks_env(r),
+                                    r->connection->pool, r->pool);
+      if (serr)
+        return dav_svn__sanitize_error(serr,
+                                       "Error settings hooks environment",
+                                       HTTP_INTERNAL_SERVER_ERROR, r);
     }
 
   /* cache the filesystem object */
@@ -3083,6 +3087,13 @@ set_headers(request_rec *r, const dav_re
       if ((serr == NULL) && (info.rev != SVN_INVALID_REVNUM))
         {
           mimetype = SVN_SVNDIFF_MIME_TYPE;
+
+          /* Note the base that this svndiff is based on, and tell any
+             intermediate caching proxies that this header is
+             significant.  */
+          apr_table_setn(r->headers_out, "Vary", SVN_DAV_DELTA_BASE_HEADER);
+          apr_table_setn(r->headers_out, SVN_DAV_DELTA_BASE_HEADER,
+                         resource->info->delta_base);
         }
       svn_error_clear(serr);
     }
@@ -3164,7 +3175,7 @@ typedef struct diff_ctx_t {
 } diff_ctx_t;
 
 
-static svn_error_t *
+static svn_error_t *  __attribute__((warn_unused_result))
 write_to_filter(void *baton, const char *buffer, apr_size_t *len)
 {
   diff_ctx_t *dc = baton;
@@ -3185,7 +3196,7 @@ write_to_filter(void *baton, const char 
 }
 
 
-static svn_error_t *
+static svn_error_t *  __attribute__((warn_unused_result))
 close_filter(void *baton)
 {
   diff_ctx_t *dc = baton;
@@ -3635,7 +3646,7 @@ deliver(const dav_resource *resource, ap
           /* get a handler/baton for writing into the output stream */
           svn_txdelta_to_svndiff3(&handler, &h_baton,
                                   o_stream, resource->info->svndiff_version,
-                                  dav_svn__get_compression_level(),
+                                  dav_svn__get_compression_level(resource->info->r),
                                   resource->pool);
 
           /* got everything set up. read in delta windows and shove them into

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/util.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/util.c (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/util.c Tue Oct 30 20:03:28 2012
@@ -45,6 +45,9 @@ dav_svn__new_error(apr_pool_t *pool,
                    int error_id,
                    const char *desc)
 {
+  if (error_id == 0)
+    error_id = SVN_ERR_RA_DAV_REQUEST_FAILED;
+
 /*
  * Note: dav_new_error() in httpd 2.0/2.2 always treated
  * the errno field in dav_error as an apr_status_t when
@@ -70,6 +73,9 @@ dav_svn__new_error_tag(apr_pool_t *pool,
                        const char *namespace,
                        const char *tagname)
 {
+  if (error_id == 0)
+    error_id = SVN_ERR_RA_DAV_REQUEST_FAILED;
+
 #if AP_MODULE_MAGIC_AT_LEAST(20091119,0)
   return dav_new_error_tag(pool, status, error_id, 0,
                            desc, namespace, tagname);

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/version.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/version.c Tue Oct 30 20:03:28 2012
@@ -37,7 +37,9 @@
 #include "svn_props.h"
 #include "svn_dav.h"
 #include "svn_base64.h"
+#include "svn_version.h"
 #include "private/svn_repos_private.h"
+#include "private/svn_subr_private.h"
 #include "private/svn_dav_protocol.h"
 #include "private/svn_log.h"
 #include "private/svn_fspath.h"
@@ -146,6 +148,7 @@ get_vsn_options(apr_pool_t *p, apr_text_
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_LOG_REVPROPS);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_ATOMIC_REVPROPS);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_PARTIAL_REPLAY);
+  apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_INHERITED_PROPS);
   /* Mergeinfo is a special case: here we merely say that the server
    * knows how to handle mergeinfo -- whether the repository does too
    * is a separate matter.
@@ -192,6 +195,14 @@ get_option(const dav_resource *resource,
         }
     }
 
+  /* If we're allowed (by configuration) to do so, advertise support
+     for ephemeral transaction properties. */
+  if (dav_svn__check_ephemeral_txnprops_support(r))
+    {
+      apr_table_addn(r->headers_out, "DAV",
+                     SVN_DAV_NS_DAV_SVN_EPHEMERAL_TXNPROPS);
+    }
+
   if (resource->info->repos->fs)
     {
       svn_error_t *serr;
@@ -234,15 +245,24 @@ get_option(const dav_resource *resource,
      DeltaV-free!  If we're configured to advise this support, do so.  */
   if (resource->info->repos->v2_protocol)
     {
-      /* The list of Subversion's custom POSTs.  You'll want to keep
-         this in sync with the handling of these suckers in
-         handle_post_request().  */
-      static const char * posts_list[] = {
-        "create-txn",
-        "create-txn-with-props",
-        NULL
+      int i;
+      svn_version_t *master_version = dav_svn__get_master_version(r);
+
+      /* The list of Subversion's custom POSTs and which versions of
+         Subversion support them.  We need this latter information
+         when acting as a WebDAV slave -- we don't want to claim
+         support for a POST type if the master server which will
+         actually have to handle it won't recognize it.
+
+         Keep this in sync with what's handled in handle_post_request().
+      */
+      struct posts_versions_t {
+        const char *post_name;
+        svn_version_t min_version;
+      } posts_versions[] = {
+        { "create-txn",             { 1, 7, 0, "" } },
+        { "create-txn-with-props",  { 1, 8, 0, "" } },
       };
-      const char **this_post = posts_list;
 
       apr_table_set(r->headers_out, SVN_DAV_ROOT_URI_HEADER, repos_root_uri);
       apr_table_set(r->headers_out, SVN_DAV_ME_RESOURCE_HEADER,
@@ -268,12 +288,20 @@ get_option(const dav_resource *resource,
                                 dav_svn__get_vtxn_stub(r), (char *)NULL));
 
       /* Report the supported POST types. */
-      while (*this_post)
+      for (i = 0; i < sizeof(posts_versions)/sizeof(posts_versions[0]); ++i)
         {
+          /* If we're proxying to a master server and its version
+             number is declared, we can selectively filter out POST
+             types that it doesn't support. */
+          if (master_version
+              && (! svn_version__at_least(master_version,
+                                          posts_versions[i].min_version.major,
+                                          posts_versions[i].min_version.minor,
+                                          posts_versions[i].min_version.patch)))
+            continue;
+
           apr_table_addn(r->headers_out, SVN_DAV_SUPPORTED_POSTS_HEADER,
-                         apr_pstrcat(resource->pool, *this_post,
-                                     (char *)NULL));
-          this_post++;
+                         apr_pstrdup(resource->pool, posts_versions[i].post_name));
         }
     }
 
@@ -1112,6 +1140,10 @@ deliver_report(request_rec *r,
         {
           return dav_svn__get_deleted_rev_report(resource, doc, output);
         }
+      else if (strcmp(doc->root->name, SVN_DAV__INHERITED_PROPS_REPORT) == 0)
+        {
+          return dav_svn__get_inherited_props_report(resource, doc, output);
+        }
       /* NOTE: if you add a report, don't forget to add it to the
        *       dav_svn__reports_list[] array.
        */

Modified: subversion/branches/master-passphrase/subversion/po/es.po
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/po/es.po?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/po/es.po [UTF-8] (original)
+++ subversion/branches/master-passphrase/subversion/po/es.po [UTF-8] Tue Oct 30 20:03:28 2012
@@ -13565,7 +13565,7 @@ msgstr ""
 #~ "                               'HEAD'        lo último del repositorio\n"
 #~ "                               'BASE'        rev base del ítem de la c. de trab.\n"
 #~ "                               'COMMITTED'   último commit en o antes de BASE\n"
-#~ "                               'PREV'        revisión justo antes de COMMITED"
+#~ "                               'PREV'        revisión justo antes de COMMITTED"
 
 #~ msgid "Can't open file '%s' for reading"
 #~ msgstr "No se pudo abrir el archivo '%s' para leer"

Modified: subversion/branches/master-passphrase/subversion/po/pl.po
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/po/pl.po?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/po/pl.po [UTF-8] (original)
+++ subversion/branches/master-passphrase/subversion/po/pl.po [UTF-8] Tue Oct 30 20:03:28 2012
@@ -2225,7 +2225,7 @@ msgstr "Nieznany typ systemu plików: '%
 #: ../libsvn_fs/fs-loader.c:313
 #, c-format
 msgid "Can't allocate FS mutex"
-msgstr "Nie udało się utworzyć semefora FS"
+msgstr "Nie udało się utworzyć semafora FS"
 
 #: ../libsvn_fs/fs-loader.c:348
 #, c-format
@@ -3675,7 +3675,7 @@ msgstr "Uzyskano nierozpoznane kodowanie
 #: ../libsvn_ra_neon/get_locks.c:425 ../libsvn_ra_neon/get_locks.c:429
 #: ../libsvn_ra_serf/locks.c:566
 msgid "Server does not support locking features"
-msgstr "Serwer nie obsługuje blokowania zatwiedzeń"
+msgstr "Serwer nie obsługuje blokowania zatwierdzeń"
 
 #: ../libsvn_ra_neon/lock.c:196
 msgid "Invalid creation date header value in response."
@@ -3703,7 +3703,7 @@ msgstr "'%s' nie jest zablokowane w repo
 
 #: ../libsvn_ra_neon/lock.c:553
 msgid "Failed to fetch lock information"
-msgstr "Nieudało się pobrać informacji o blokadzie"
+msgstr "Nie udało się pobrać informacji o blokadzie"
 
 #: ../libsvn_ra_neon/log.c:169 ../libsvn_ra_serf/log.c:228
 #, c-format
@@ -4751,7 +4751,7 @@ msgstr "Błąd podczas zamykania pliku n
 #: ../libsvn_repos/hooks.c:379
 #, c-format
 msgid "Failed to run '%s' hook; broken symlink"
-msgstr "Niepowiodło się uruchomienie skryptu hook '%s'; uszkodzone dowiązanie symboliczne"
+msgstr "Nie powiodło się uruchomienie skryptu hook '%s'; uszkodzone dowiązanie symboliczne"
 
 #: ../libsvn_repos/hooks.c:589
 msgid ""
@@ -4863,7 +4863,7 @@ msgstr "Brak uprawnień do otwarcia kata
 #: ../libsvn_repos/reporter.c:1234
 #, c-format
 msgid "Target path '%s' does not exist"
-msgstr "Docelowa śieżka '%s' nie istnieje"
+msgstr "Docelowa ścieżka '%s' nie istnieje"
 
 #: ../libsvn_repos/reporter.c:1242
 msgid "Cannot replace a directory from within"
@@ -5215,7 +5215,7 @@ msgstr "W pliku '%s' w linii %d: asercja
 #: ../libsvn_subr/error.c:602
 #, c-format
 msgid "In file '%s' line %d: internal malfunction"
-msgstr "W pliku '%s' w linii %d: wewnątrzne niepoprawne funkcjonowanie"
+msgstr "W pliku '%s' w linii %d: wewnętrzne niepoprawne funkcjonowanie"
 
 #: ../libsvn_subr/io.c:169
 #, c-format
@@ -5230,7 +5230,7 @@ msgstr "Nie można sprawdzić ścieżki 
 #: ../libsvn_subr/io.c:457 ../libsvn_subr/io.c:3771
 #, c-format
 msgid "Can't open '%s'"
-msgstr "Nie mozna otworzyć '%s'"
+msgstr "Nie można otworzyć '%s'"
 
 #: ../libsvn_subr/io.c:483 ../libsvn_subr/io.c:569
 #, c-format
@@ -6280,7 +6280,7 @@ msgstr "Format logów zbyt stary. Prosz�
 
 #: ../libsvn_wc/conflicts.c:299
 msgid "Invalid 'conflict_result' argument"
-msgstr "Błądny argument 'conflict_result'"
+msgstr "Błędny argument 'conflict_result'"
 
 #: ../libsvn_wc/conflicts.c:409
 #, c-format
@@ -6731,7 +6731,7 @@ msgstr "Nieprawidłowy atrybut %s dla '%
 #: ../libsvn_wc/props.c:2643
 #, c-format
 msgid "Invalid %s property on '%s': target '%s' is an absolute path or involves '..'"
-msgstr "Błędny atrybut %s dla '%s': cel '%s' jest ścieżką bezwględną albo wykorzystuje '..'"
+msgstr "Błędny atrybut %s dla '%s': cel '%s' jest ścieżką bezwzględną albo wykorzystuje '..'"
 
 #: ../libsvn_wc/questions.c:203
 #, fuzzy, c-format
@@ -8245,7 +8245,7 @@ msgstr ""
 "\n"
 "OSTRZEŻENIE: Dla kompatybilności z poprzednimi wersjami Subversion kopiowania\n"
 "wykonywane pomiędzy dwoma ścieżkami kopii roboczej (KR -> KR) nie kontaktują\n"
-"się z reporytorium. W związku z tym nie mogą domyślnie propagować informacji\n"
+"się z repozytorium. W związku z tym nie mogą domyślnie propagować informacji\n"
 "o łączeniach zmian ze źródła kopii do celu.\n"
 
 #: ../svn/main.c:505
@@ -8673,7 +8673,7 @@ msgstr ""
 "    E  Istniały (Existed)\n"
 "    R  Zastąpiony (Replaced)\n"
 "\n"
-"  Znaki w pierwszej kolumnia informują o samym obiekcie. Znaki w drugiej\n"
+"  Znaki w pierwszej kolumnie informują o samym obiekcie. Znaki w drugiej\n"
 "  kolumnie informują o atrybutach obiektu. 'C' w trzeciej kolumnie wskazuje\n"
 "  na konflikt drzewny, podczas gdy 'C' w pierwszej i drugiej kolumnie\n"
 "  wskazuje odpowiednio na konflikt tekstowy w plikach i w atrybutach plików.\n"
@@ -9663,7 +9663,7 @@ msgstr "Opis zmian jest ścieżką (chci
 
 #: ../svn/main.c:2065
 msgid "The lock comment is a pathname (was -F intended?); use '--force-log' to override"
-msgstr "Opis blokady jest ścieżką (chciano użyć -F?); użyj --force-log, bywymusić użycie takiego opisu"
+msgstr "Opis blokady jest ścieżką (chciano użyć -F?); użyj --force-log, by wymusić użycie takiego opisu"
 
 #: ../svn/main.c:2079
 msgid "--relocate and --depth are mutually exclusive"

Modified: subversion/branches/master-passphrase/subversion/po/pt_BR.po
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/po/pt_BR.po?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/po/pt_BR.po [UTF-8] (original)
+++ subversion/branches/master-passphrase/subversion/po/pt_BR.po [UTF-8] Tue Oct 30 20:03:28 2012
@@ -12663,8 +12663,8 @@ msgstr ""
 #~ "                                '{' DATA '}' revisão no início da data\n"
 #~ "                                'HEAD'       último no repositório\n"
 #~ "                                'BASE'       revisão base do item da cópia de trabalho\n"
-#~ "                                'COMMITED'   último commit em ou antes de BASE\n"
-#~ "                                'PREV'       revisão exatamente antes de COMMITED"
+#~ "                                'COMMITTED'  último commit em ou antes de BASE\n"
+#~ "                                'PREV'       revisão exatamente antes de COMMITTED"
 
 #~ msgid "Can't get user name"
 #~ msgstr "Não foi possível obter o nome do usuário"

Modified: subversion/branches/master-passphrase/subversion/po/zh_TW.po
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/po/zh_TW.po?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/po/zh_TW.po [UTF-8] (original)
+++ subversion/branches/master-passphrase/subversion/po/zh_TW.po [UTF-8] Tue Oct 30 20:03:28 2012
@@ -12810,7 +12810,7 @@ msgstr ""
 #~ "                                '{' DATE '}' 該日開始的修訂版\n"
 #~ "                                'HEAD'       檔案庫最新版本\n"
 #~ "                                'BASE'       該項目工作複本的基礎修訂版\n"
-#~ "                                'COMMITED'   位於或早於 BASE 的最後送交\n"
+#~ "                                'COMMITTED'  位於或早於 BASE 的最後送交\n"
 #~ "                                'PREV'       COMMITTED 之前的修訂版"
 
 #~ msgid "Error reading administrative log file in '%s'"

Modified: subversion/branches/master-passphrase/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/cl.h?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/cl.h (original)
+++ subversion/branches/master-passphrase/subversion/svn/cl.h Tue Oct 30 20:03:28 2012
@@ -236,10 +236,8 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t show_diff;        /* produce diff output (maps to --diff) */
   svn_boolean_t allow_mixed_rev; /* Allow operation on mixed-revision WC */
   svn_boolean_t include_externals; /* Recurses (in)to file & dir externals */
+  svn_boolean_t show_inherited_props; /* get inherited properties */
   apr_array_header_t* search_patterns; /* pattern arguments for --search */
-
-  svn_wc_conflict_resolver_func2_t conflict_func;
-  void *conflict_baton;
 } svn_cl__opt_state_t;
 
 
@@ -332,37 +330,58 @@ svn_cl__check_cancel(void *baton);
 
 /* Various conflict-resolution callbacks. */
 
-typedef struct svn_cl__conflict_baton_t {
-  svn_cl__accept_t accept_which;
-  apr_hash_t *config;
-  const char *editor_cmd;
-  svn_boolean_t external_failed;
-  svn_cmdline_prompt_baton_t *pb;
-  const char *path_prefix;
-} svn_cl__conflict_baton_t;
-
-/* Create and return a conflict baton in *B, allocated from POOL, with the
- * values ACCEPT_WHICH, CONFIG, EDITOR_CMD and PB placed in the same-named
- * fields of the baton, and its 'external_failed' field initialised to FALSE. */
-svn_error_t *
-svn_cl__conflict_baton_make(svn_cl__conflict_baton_t **b,
-                            svn_cl__accept_t accept_which,
-                            apr_hash_t *config,
-                            const char *editor_cmd,
-                            svn_cmdline_prompt_baton_t *pb,
-                            apr_pool_t *pool);
+/* Opaque baton type for svn_cl__conflict_func_interactive(). */
+typedef struct svn_cl__interactive_conflict_baton_t
+  svn_cl__interactive_conflict_baton_t;
+
+/* Create and return an baton for use with svn_cl__conflict_func_interactive
+ * in *B, allocated from RESULT_POOL, and initialised with the values
+ * ACCEPT_WHICH, CONFIG, EDITOR_CMD, CANCEL_FUNC and CANCEL_BATON. */
+svn_error_t *
+svn_cl__get_conflict_func_interactive_baton(
+  svn_cl__interactive_conflict_baton_t **b,
+  svn_cl__accept_t accept_which,
+  apr_hash_t *config,
+  const char *editor_cmd,
+  svn_cancel_func_t cancel_func,
+  void *cancel_baton,
+  apr_pool_t *result_pool);
 
 /* A conflict-resolution callback which prompts the user to choose
    one of the 3 fulltexts, edit the merged file on the spot, or just
    skip the conflict (to be resolved later).
    Implements @c svn_wc_conflict_resolver_func_t. */
 svn_error_t *
-svn_cl__conflict_handler(svn_wc_conflict_result_t **result,
-                         const svn_wc_conflict_description2_t *desc,
-                         void *baton,
-                         apr_pool_t *result_pool,
-                         apr_pool_t *scratch_pool);
-
+svn_cl__conflict_func_interactive(svn_wc_conflict_result_t **result,
+                                  const svn_wc_conflict_description2_t *desc,
+                                  void *baton,
+                                  apr_pool_t *result_pool,
+                                  apr_pool_t *scratch_pool);
+
+/* Create an return a baton for use with svn_cl__conflict_func_postpone(),
+ * allocated in RESULT_POOL. */
+void *
+svn_cl__get_conflict_func_postpone_baton(apr_pool_t *result_pool);
+
+/* A conflict-resolution callback which postpones all conflicts and
+ * remembers conflicted paths in BATON. */
+svn_error_t *
+svn_cl__conflict_func_postpone(svn_wc_conflict_result_t **result,
+                               const svn_wc_conflict_description2_t *desc,
+                               void *baton,
+                               apr_pool_t *result_pool,
+                               apr_pool_t *scratch_pool);
+
+/* Run the interactive conflict resolver, obtained internally from
+ * svn_cl__get_conflict_func_interactive(), on any conflicted paths
+ * stored in the BATON obtained from svn_cl__get_conflict_func_postpone(). */
+svn_error_t *
+svn_cl__resolve_postponed_conflicts(void *baton,
+                                    svn_depth_t depth,
+                                    svn_cl__accept_t accept_which,
+                                    const char *editor_cmd,
+                                    svn_client_ctx_t *ctx,
+                                    apr_pool_t *scratch_pool);
 
 
 /*** Command-line output functions -- printing to the user. ***/
@@ -459,12 +478,15 @@ svn_cl__print_prop_hash(svn_stream_t *ou
                         svn_boolean_t names_only,
                         apr_pool_t *pool);
 
-/* Same as svn_cl__print_prop_hash(), only output xml to *OUTSTR.  If *OUTSTR is
-   NULL, allocate it first from POOL, otherwise append to it. */
+/* Similar to svn_cl__print_prop_hash(), only output xml to *OUTSTR.
+   If INHERITED_PROPS is true, then PROP_HASH contains inherited properties,
+   otherwise PROP_HASH contains explicit properties.  If *OUTSTR is NULL,
+   allocate it first from POOL, otherwise append to it. */
 svn_error_t *
 svn_cl__print_xml_prop_hash(svn_stringbuf_t **outstr,
                             apr_hash_t *prop_hash,
                             svn_boolean_t names_only,
+                            svn_boolean_t inherited_props,
                             apr_pool_t *pool);
 
 /* Output a commit xml element to *OUTSTR.  If *OUTSTR is NULL, allocate it
@@ -617,14 +639,6 @@ svn_cl__notifier_mark_export(void *baton
 svn_error_t *
 svn_cl__notifier_mark_wc_to_repos_copy(void *baton);
 
-/* Return TRUE if any conflicts were detected during notification. */
-svn_boolean_t
-svn_cl__notifier_check_conflicts(void *baton);
-
-/* Return a sorted array of conflicted paths detected during notification. */
-apr_array_header_t *
-svn_cl__notifier_get_conflicted_paths(void *baton, apr_pool_t *result_pool);
-
 /* Baton for use with svn_cl__check_externals_failed_notify_wrapper(). */
 struct svn_cl__check_externals_failed_notify_baton
 {
@@ -872,15 +886,6 @@ svn_cl__check_related_source_and_target(
                                         svn_client_ctx_t *ctx,
                                         apr_pool_t *pool);
 
-/* Run the conflict resolver for all targets in the TARGETS list with
- * the specified DEPTH. */
-svn_error_t *
-svn_cl__resolve_conflicts(apr_array_header_t *targets,
-                          svn_depth_t depth,
-                          const svn_cl__opt_state_t *opt_state,
-                          svn_client_ctx_t *ctx,
-                          apr_pool_t *scratch_pool);
-
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/master-passphrase/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/conflict-callbacks.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/conflict-callbacks.c Tue Oct 30 20:03:28 2012
@@ -33,6 +33,7 @@
 #include "svn_dirent_uri.h"
 #include "svn_types.h"
 #include "svn_pools.h"
+#include "svn_sorts.h"
 
 #include "cl.h"
 #include "tree-conflicts.h"
@@ -41,22 +42,37 @@
 
 
 
+struct svn_cl__interactive_conflict_baton_t {
+  svn_cl__accept_t accept_which;
+  apr_hash_t *config;
+  const char *editor_cmd;
+  svn_boolean_t external_failed;
+  svn_cmdline_prompt_baton_t *pb;
+  const char *path_prefix;
+};
 
 svn_error_t *
-svn_cl__conflict_baton_make(svn_cl__conflict_baton_t **b,
-                            svn_cl__accept_t accept_which,
-                            apr_hash_t *config,
-                            const char *editor_cmd,
-                            svn_cmdline_prompt_baton_t *pb,
-                            apr_pool_t *pool)
+svn_cl__get_conflict_func_interactive_baton(
+  svn_cl__interactive_conflict_baton_t **b,
+  svn_cl__accept_t accept_which,
+  apr_hash_t *config,
+  const char *editor_cmd,
+  svn_cancel_func_t cancel_func,
+  void *cancel_baton,
+  apr_pool_t *result_pool)
 {
-  *b = apr_palloc(pool, sizeof(**b));
+  svn_cmdline_prompt_baton_t *pb = apr_palloc(result_pool, sizeof(*pb));
+  pb->cancel_func = cancel_func;
+  pb->cancel_baton = cancel_baton;
+
+  *b = apr_palloc(result_pool, sizeof(**b));
   (*b)->accept_which = accept_which;
   (*b)->config = config;
   (*b)->editor_cmd = editor_cmd;
   (*b)->external_failed = FALSE;
   (*b)->pb = pb;
-  SVN_ERR(svn_dirent_get_absolute(&(*b)->path_prefix, "", pool));
+  SVN_ERR(svn_dirent_get_absolute(&(*b)->path_prefix, "", result_pool));
+
   return SVN_NO_ERROR;
 }
 
@@ -180,7 +196,7 @@ show_conflicts(const svn_wc_conflict_des
 static svn_error_t *
 open_editor(svn_boolean_t *performed_edit,
             const svn_wc_conflict_description2_t *desc,
-            svn_cl__conflict_baton_t *b,
+            svn_cl__interactive_conflict_baton_t *b,
             apr_pool_t *pool)
 {
   svn_error_t *err;
@@ -232,7 +248,7 @@ open_editor(svn_boolean_t *performed_edi
 static svn_error_t *
 launch_resolver(svn_boolean_t *performed_edit,
                 const svn_wc_conflict_description2_t *desc,
-                svn_cl__conflict_baton_t *b,
+                svn_cl__interactive_conflict_baton_t *b,
                 apr_pool_t *pool)
 {
   svn_error_t *err;
@@ -272,7 +288,7 @@ launch_resolver(svn_boolean_t *performed
 static svn_error_t *
 handle_text_conflict(svn_wc_conflict_result_t *result,
                      const svn_wc_conflict_description2_t *desc,
-                     svn_cl__conflict_baton_t *b,
+                     svn_cl__interactive_conflict_baton_t *b,
                      apr_pool_t *scratch_pool)
 {
   const char *answer;
@@ -461,7 +477,8 @@ handle_text_conflict(svn_wc_conflict_res
           if (performed_edit)
             knows_something = TRUE;
         }
-      else if (strcmp(answer, "m") == 0 || strcmp(answer, ":-M") == 0)
+      else if (strcmp(answer, "m") == 0 || strcmp(answer, ":-g") == 0 ||
+               strcmp(answer, "=>-") == 0 || strcmp(answer, ":>.") == 0)
         {
           if (desc->kind != svn_wc_conflict_kind_text)
             {
@@ -533,7 +550,7 @@ handle_text_conflict(svn_wc_conflict_res
 static svn_error_t *
 handle_prop_conflict(svn_wc_conflict_result_t *result,
                      const svn_wc_conflict_description2_t *desc,
-                     svn_cl__conflict_baton_t *b,
+                     svn_cl__interactive_conflict_baton_t *b,
                      apr_pool_t *scratch_pool)
 {
   const char *answer;
@@ -610,13 +627,13 @@ handle_prop_conflict(svn_wc_conflict_res
 /* Implement svn_wc_conflict_resolver_func2_t; resolves based on
    --accept option if given, else by prompting. */
 svn_error_t *
-svn_cl__conflict_handler(svn_wc_conflict_result_t **result,
-                         const svn_wc_conflict_description2_t *desc,
-                         void *baton,
-                         apr_pool_t *result_pool,
-                         apr_pool_t *scratch_pool)
+svn_cl__conflict_func_interactive(svn_wc_conflict_result_t **result,
+                                  const svn_wc_conflict_description2_t *desc,
+                                  void *baton,
+                                  apr_pool_t *result_pool,
+                                  apr_pool_t *scratch_pool)
 {
-  svn_cl__conflict_baton_t *b = baton;
+  svn_cl__interactive_conflict_baton_t *b = baton;
   svn_error_t *err;
   apr_pool_t *subpool;
 
@@ -787,7 +804,7 @@ svn_cl__conflict_handler(svn_wc_conflict
                                                      desc->local_abspath,
                                                      subpool)));
       prompt = _("Select: (p) postpone, (mf) mine-full, "
-                 "(tf) theirs-full, (h) help:");
+                 "(tf) theirs-full, (h) help: ");
 
       while (1)
         {
@@ -839,7 +856,9 @@ svn_cl__conflict_handler(svn_wc_conflict
                                                      scratch_pool),
                    readable_desc));
 
-      prompt = _("Select: (p) postpone, (r) mark-resolved, (h) help: ");
+      prompt = _("Select: (p) postpone, (r) mark-resolved, "
+                 "(mc) mine-conflict,\n"
+                 "        (tc) theirs-conflict, (h) help: ");
 
       while (1)
         {
@@ -850,8 +869,10 @@ svn_cl__conflict_handler(svn_wc_conflict
           if (strcmp(answer, "h") == 0 || strcmp(answer, "?") == 0)
             {
               SVN_ERR(svn_cmdline_fprintf(stderr, subpool,
-              _("  (p) postpone      - resolve the conflict later\n"
-                "  (r) resolved      - accept current working tree\n")));
+              _("  (p) postpone         - resolve the conflict later\n"
+                "  (r) resolved         - accept current working copy state\n"
+                "  (mc) mine-conflict   - prefer local change\n"
+                "  (tc) theirs-conflict - prefer incoming change\n")));
             }
           if (strcmp(answer, "p") == 0 || strcmp(answer, ":-p") == 0)
             {
@@ -863,6 +884,16 @@ svn_cl__conflict_handler(svn_wc_conflict
               (*result)->choice = svn_wc_conflict_choose_merged;
               break;
             }
+          else if (strcmp(answer, "mc") == 0)
+            {
+              (*result)->choice = svn_wc_conflict_choose_mine_conflict;
+              break;
+            }
+          else if (strcmp(answer, "tc") == 0)
+            {
+              (*result)->choice = svn_wc_conflict_choose_theirs_conflict;
+              break;
+            }
         }
     }
 
@@ -875,16 +906,77 @@ svn_cl__conflict_handler(svn_wc_conflict
   return SVN_NO_ERROR;
 }
 
+/* Implement svn_wc_conflict_resolver_func2_t; postpones all conflicts
+ * and remembers conflicted paths in BATON. */
 svn_error_t *
-svn_cl__resolve_conflicts(apr_array_header_t *targets,
-                          svn_depth_t depth,
-                          const svn_cl__opt_state_t *opt_state,
-                          svn_client_ctx_t *ctx,
-                          apr_pool_t *scratch_pool)
+svn_cl__conflict_func_postpone(svn_wc_conflict_result_t **result,
+                               const svn_wc_conflict_description2_t *desc,
+                               void *baton,
+                               apr_pool_t *result_pool,
+                               apr_pool_t *scratch_pool)
+{
+  apr_hash_t *conflicted_paths = baton;
+  
+  apr_hash_set(conflicted_paths,
+               apr_pstrdup(apr_hash_pool_get(conflicted_paths),
+                           desc->local_abspath),
+               APR_HASH_KEY_STRING, "");
+
+  *result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone,
+                                          NULL, result_pool);
+  return SVN_NO_ERROR;
+}
+
+void *
+svn_cl__get_conflict_func_postpone_baton(apr_pool_t *result_pool)
 {
+  return apr_hash_make(result_pool);
+}
+
+static apr_array_header_t *
+get_postponed_conflicted_paths(void *baton, apr_pool_t *result_pool)
+{
+  apr_hash_t *conflicted_paths = baton;
+  apr_array_header_t *sorted_array;
+  apr_array_header_t *result_array;
+  int i;
+
+  if (apr_hash_count(conflicted_paths) == 0)
+    return NULL;
+
+  sorted_array = svn_sort__hash(conflicted_paths,
+                                svn_sort_compare_items_as_paths,
+                                apr_hash_pool_get(conflicted_paths));
+  result_array = apr_array_make(result_pool, sorted_array->nelts,
+                                sizeof(const char *));
+  for (i = 0; i < sorted_array->nelts; i++)
+    {
+      svn_sort__item_t item;
+      
+      item = APR_ARRAY_IDX(sorted_array, i, svn_sort__item_t);
+      APR_ARRAY_PUSH(result_array, const char *) = apr_pstrdup(result_pool,
+                                                               item.key);
+    }
+
+  return result_array;
+}
+
+svn_error_t *
+svn_cl__resolve_postponed_conflicts(void *baton,
+                                    svn_depth_t depth,
+                                    svn_cl__accept_t accept_which,
+                                    const char *editor_cmd,
+                                    svn_client_ctx_t *ctx,
+                                    apr_pool_t *scratch_pool)
+{
+  apr_array_header_t *targets;
   int i;
   apr_pool_t *iterpool;
 
+  targets = get_postponed_conflicted_paths(baton, scratch_pool);
+  if (targets == NULL)
+    return SVN_NO_ERROR;
+
   iterpool = svn_pool_create(scratch_pool);
   for (i = 0; i < targets->nelts; i++)
     {
@@ -893,19 +985,25 @@ svn_cl__resolve_conflicts(apr_array_head
       const char *local_abspath;
       svn_wc_conflict_resolver_func2_t conflict_func2;
       void *conflict_baton2;
+      svn_cl__interactive_conflict_baton_t *b;
 
       svn_pool_clear(iterpool);
 
       SVN_ERR(svn_dirent_get_absolute(&local_abspath, target, iterpool));
 
-
       /* Store old state */
       conflict_func2 = ctx->conflict_func2;
       conflict_baton2 = ctx->conflict_baton2;
 
-      /* Store interactive resolver */
-      ctx->conflict_func2 = opt_state->conflict_func;
-      ctx->conflict_baton2 = opt_state->conflict_baton;
+      /* Set up the interactive resolver. */
+      ctx->conflict_func2 = svn_cl__conflict_func_interactive;
+      SVN_ERR(svn_cl__get_conflict_func_interactive_baton(&b, accept_which,
+                                                          ctx->config,
+                                                          editor_cmd,
+                                                          ctx->cancel_func,
+                                                          ctx->cancel_baton,
+                                                          scratch_pool));
+      ctx->conflict_baton2 = b;
 
       err = svn_client_resolve(local_abspath, depth,
                                svn_wc_conflict_choose_unspecified,

Modified: subversion/branches/master-passphrase/subversion/svn/file-merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/file-merge.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/file-merge.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/file-merge.c Tue Oct 30 20:03:28 2012
@@ -365,7 +365,7 @@ static const char *
 prepare_line_for_display(const char *line, apr_pool_t *pool)
 {
   svn_stringbuf_t *buf = svn_stringbuf_create(line, pool);
-  int width;
+  size_t width;
   int line_width = LINE_DISPLAY_WIDTH;
   apr_pool_t *iterpool;
 

Modified: subversion/branches/master-passphrase/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/log-cmd.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/log-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/log-cmd.c Tue Oct 30 20:03:28 2012
@@ -626,7 +626,13 @@ log_entry_receiver_xml(void *baton,
               /* <path action="X"> */
               svn_xml_make_open_tag(&sb, pool, svn_xml_protect_pcdata, "path",
                                     "action", action,
-                                    "kind", svn_cl__node_kind_str_xml(log_item->node_kind), NULL);
+                                    "kind", svn_cl__node_kind_str_xml(
+                                                     log_item->node_kind),
+                                    "text-mods", svn_tristate__to_word(
+                                                     log_item->text_modified),
+                                    "prop-mods", svn_tristate__to_word(
+                                                     log_item->props_modified),
+                                    NULL);
             }
           /* xxx</path> */
           svn_xml_escape_cdata_cstring(&sb, path, pool);
@@ -649,7 +655,7 @@ log_entry_receiver_xml(void *baton,
       svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "revprops", NULL);
       SVN_ERR(svn_cl__print_xml_prop_hash(&sb, log_entry->revprops,
                                           FALSE, /* name_only */
-                                          pool));
+                                          FALSE, pool));
       svn_xml_make_close_tag(&sb, pool, "revprops");
     }