You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pr...@apache.org on 2013/06/24 07:52:36 UTC

svn commit: r1495930 [2/3] - in /subversion/branches/verify-keep-going: ./ notes/tree-conflicts/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/src/org/apache/subversion/javahl...

Modified: subversion/branches/verify-keep-going/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/include/svn_wc.h?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/include/svn_wc.h (original)
+++ subversion/branches/verify-keep-going/subversion/include/svn_wc.h Mon Jun 24 05:52:34 2013
@@ -1745,11 +1745,116 @@ svn_wc_conflict_version_dup(const svn_wc
  * @note Fields may be added to the end of this structure in future
  * versions.  Therefore, to preserve binary compatibility, users
  * should not directly allocate structures of this type but should use
+ * svn_wc_conflict_description_create_text3() or
+ * svn_wc_conflict_description_create_prop3() or
+ * svn_wc_conflict_description_create_tree3() instead.
+ *
+ * @since New in 1.9.
+ */
+typedef struct svn_wc_conflict_description3_t
+{
+  /** The path that is in conflict (for a tree conflict, it is the victim) */
+  const char *local_abspath;
+
+  /** The node type of the path being operated on (for a tree conflict,
+   *  ### which version?) */
+  svn_node_kind_t node_kind;
+
+  /** What sort of conflict are we describing? */
+  svn_wc_conflict_kind_t kind;
+
+  /** The name of the property whose conflict is being described.
+   *  (Only if @a kind is 'property'; else undefined.) */
+  const char *property_name;
+
+  /** Whether svn thinks ('my' version of) @c path is a 'binary' file.
+   *  (Only if @c kind is 'text', else undefined.) */
+  svn_boolean_t is_binary;
+
+  /** The svn:mime-type property of ('my' version of) @c path, if available,
+   *  else NULL.
+   *  (Only if @c kind is 'text', else undefined.) */
+  const char *mime_type;
+
+  /** The action being attempted on the conflicted node or property.
+   *  (When @c kind is 'text', this action must be 'edit'.) */
+  svn_wc_conflict_action_t action;
+
+  /** The state of the target node or property, relative to its merge-left
+   *  source, that is the reason for the conflict.
+   *  (When @c kind is 'text', this reason must be 'edited'.) */
+  svn_wc_conflict_reason_t reason;
+
+  /** If this is text-conflict and involves the merging of two files
+   * descended from a common ancestor, here are the paths of up to
+   * four fulltext files that can be used to interactively resolve the
+   * conflict.
+   *
+   * @a base_abspath, @a their_abspath and @a my_abspath are absolute
+   * paths.
+   *
+   * ### Is @a merged_file relative to some directory, or absolute?
+   *
+   * All four files will be in repository-normal form -- LF
+   * line endings and contracted keywords.  (If any of these files are
+   * not available, they default to NULL.)
+   *
+   * On the other hand, if this is a property-conflict, then these
+   * paths represent temporary files that contain the three different
+   * property-values in conflict.  The fourth path (@c merged_file)
+   * may or may not be NULL;  if set, it represents libsvn_wc's
+   * attempt to merge the property values together.  (Remember that
+   * property values are technically binary values, and thus can't
+   * always be merged.)
+   */
+  const char *base_abspath;  /* common ancestor of the two files being merged */
+
+  /** their version of the file */
+  /* ### BH: For properties this field contains the reference to
+             the property rejection (.prej) file */
+  const char *their_abspath;
+
+  /** my locally-edited version of the file */
+  const char *my_abspath;
+
+  /** merged version; may contain conflict markers */
+  const char *merged_file;
+
+  /** The operation that exposed the conflict.
+   * Used only for tree conflicts.
+   */
+  svn_wc_operation_t operation;
+
+  /** Info on the "merge-left source" or "older" version of incoming change. */
+  const svn_wc_conflict_version_t *src_left_version;
+
+  /** Info on the "merge-right source" or "their" version of incoming change. */
+  const svn_wc_conflict_version_t *src_right_version;
+
+  /* Remember to adjust svn_wc__conflict_description3_dup()
+   * if you add new fields to this struct. */
+} svn_wc_conflict_description3_t;
+
+
+/** A struct that describes a conflict that has occurred in the
+ * working copy.
+ *
+ * The conflict described by this structure is one of:
+ *   - a conflict on the content of the file node @a local_abspath
+ *   - a conflict on the property @a property_name of @a local_abspath
+ *   - a tree conflict, of which @a local_abspath is the victim
+ * Be aware that the victim of a tree conflict can be a non-existent node.
+ * The three kinds of conflict are distinguished by @a kind.
+ *
+ * @note Fields may be added to the end of this structure in future
+ * versions.  Therefore, to preserve binary compatibility, users
+ * should not directly allocate structures of this type but should use
  * svn_wc_conflict_description_create_text2() or
  * svn_wc_conflict_description_create_prop2() or
  * svn_wc_conflict_description_create_tree2() instead.
  *
  * @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.8 API.
  */
 typedef struct svn_wc_conflict_description2_t
 {
@@ -1928,7 +2033,7 @@ typedef struct svn_wc_conflict_descripti
 } svn_wc_conflict_description_t;
 
 /**
- * Allocate an #svn_wc_conflict_description_t structure in @a result_pool,
+ * Allocate an #svn_wc_conflict_description3_t structure in @a result_pool,
  * initialize to represent a text conflict, and return it.
  *
  * Set the @c local_abspath field of the created struct to @a local_abspath
@@ -1940,8 +2045,19 @@ typedef struct svn_wc_conflict_descripti
  * @note It is the caller's responsibility to set the other required fields
  * (such as the four file names and @c mime_type and @c is_binary).
  *
+ * @since New in 1.9.
+ */
+svn_wc_conflict_description3_t *
+svn_wc_conflict_description_create_text3(const char *local_abspath,
+                                         apr_pool_t *result_pool);
+
+/* Similar to #svn_wc_conflict_description_create_text3, but returns
+ * an svn_wc_conflict_description2_t *.
+ * 
  * @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.8 API.
  */
+SVN_DEPRECATED
 svn_wc_conflict_description2_t *
 svn_wc_conflict_description_create_text2(const char *local_abspath,
                                          apr_pool_t *result_pool);
@@ -1960,7 +2076,7 @@ svn_wc_conflict_description_create_text(
                                         apr_pool_t *pool);
 
 /**
- * Allocate an #svn_wc_conflict_description_t structure in @a result_pool,
+ * Allocate an #svn_wc_conflict_description3_t structure in @a result_pool,
  * initialize to represent a property conflict, and return it.
  *
  * Set the @c local_abspath field of the created struct to @a local_abspath
@@ -1971,8 +2087,21 @@ svn_wc_conflict_description_create_text(
  * @note: It is the caller's responsibility to set the other required fields
  * (such as the four file names and @c action and @c reason).
  *
+ * @since New in 1.9.
+ */
+svn_wc_conflict_description3_t *
+svn_wc_conflict_description_create_prop3(const char *local_abspath,
+                                         svn_node_kind_t node_kind,
+                                         const char *property_name,
+                                         apr_pool_t *result_pool);
+
+/* Similar to #svn_wc_conflict_description_create_prop3, but returns
+ * an svn_wc_conflict_description2_t *.
+ * 
  * @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.8 API.
  */
+SVN_DEPRECATED
 svn_wc_conflict_description2_t *
 svn_wc_conflict_description_create_prop2(const char *local_abspath,
                                          svn_node_kind_t node_kind,
@@ -2007,8 +2136,24 @@ svn_wc_conflict_description_create_prop(
  * @note: It is the caller's responsibility to set the other required fields
  * (such as the four file names and @c action and @c reason).
  *
+ * @since New in 1.9.
+ */
+svn_wc_conflict_description3_t *
+svn_wc_conflict_description_create_tree3(
+  const char *local_abspath,
+  svn_node_kind_t node_kind,
+  svn_wc_operation_t operation,
+  const svn_wc_conflict_version_t *src_left_version,
+  const svn_wc_conflict_version_t *src_right_version,
+  apr_pool_t *result_pool);
+
+/* Similar to #svn_wc_conflict_description_create_tree3, but returns
+ * an svn_wc_conflict_description2_t *.
+ * 
  * @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.8 API.
  */
+SVN_DEPRECATED
 svn_wc_conflict_description2_t *
 svn_wc_conflict_description_create_tree2(
   const char *local_abspath,
@@ -2040,8 +2185,21 @@ svn_wc_conflict_description_create_tree(
 /** Return a duplicate of @a conflict, allocated in @a result_pool.
  * A deep copy of all members will be made.
  *
+ * @since New in 1.9.
+ */
+svn_wc_conflict_description3_t *
+svn_wc__conflict_description3_dup(
+  const svn_wc_conflict_description3_t *conflict,
+  apr_pool_t *result_pool);
+
+
+/** Like svn_wc__conflict_description3_dup(), but duplicates objects
+ * of type svn_wc_conflict_description2_t.
+ *
  * @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.8 API.
  */
+SVN_DEPRECATED
 svn_wc_conflict_description2_t *
 svn_wc__conflict_description2_dup(
   const svn_wc_conflict_description2_t *conflict,
@@ -2145,7 +2303,21 @@ svn_wc_create_conflict_result(svn_wc_con
  * of conflicts are automatically resolvable and which require user
  * interaction.
  *
+ * @since New in 1.9.
+ */
+typedef svn_error_t *(*svn_wc_conflict_resolver_func3_t)(
+  svn_wc_conflict_result_t **result,
+  const svn_wc_conflict_description3_t *description,
+  void *baton,
+  apr_pool_t *result_pool,
+  apr_pool_t *scratch_pool);
+
+
+/* Similar to #svn_wc_conflict_resolver_func3_t, but expects an
+ * svn_wc_conflict_description2_t description.
+ *
  * @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.8 API.
  */
 typedef svn_error_t *(*svn_wc_conflict_resolver_func2_t)(
   svn_wc_conflict_result_t **result,

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/blame.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/blame.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/blame.c Mon Jun 24 05:52:34 2013
@@ -73,7 +73,7 @@ struct diff_baton {
   const struct rev *rev;
 };
 
-/* The baton used for a file revision. */
+/* The baton used for a file revision. Lives the entire operation */
 struct file_rev_baton {
   svn_revnum_t start_rev, end_rev;
   const char *target;
@@ -81,8 +81,7 @@ struct file_rev_baton {
   const svn_diff_file_options_t *diff_options;
   /* name of file containing the previous revision of the file */
   const char *last_filename;
-  struct rev *rev;     /* the rev for which blame is being assigned
-                          during a diff */
+  struct rev *last_rev;   /* the rev of the last modification */
   struct blame_chain *chain;      /* the original blame chain. */
   const char *repos_root_url;    /* To construct a url */
   apr_pool_t *mainpool;  /* lives during the whole sequence of calls */
@@ -91,7 +90,6 @@ struct file_rev_baton {
 
   /* These are used for tracking merged revisions. */
   svn_boolean_t include_merged_revisions;
-  svn_boolean_t merged_revision;
   struct blame_chain *merged_chain;  /* the merged blame chain. */
   /* name of file containing the previous merged revision of the file */
   const char *last_original_filename;
@@ -100,13 +98,16 @@ struct file_rev_baton {
   apr_pool_t *prevfilepool;
 };
 
-/* The baton used by the txdelta window handler. */
+/* The baton used by the txdelta window handler. Allocated per revision */
 struct delta_baton {
   /* Our underlying handler/baton that we wrap */
   svn_txdelta_window_handler_t wrapped_handler;
   void *wrapped_baton;
   struct file_rev_baton *file_rev_baton;
+  svn_stream_t *source_stream;  /* the delta source */
   const char *filename;
+  svn_boolean_t is_merged_revision;
+  struct rev *rev;     /* the rev struct for the current revision */
 };
 
 
@@ -325,6 +326,13 @@ window_handler(svn_txdelta_window_t *win
   if (window)
     return SVN_NO_ERROR;
 
+  /* Close the source file used for the delta.
+     It is important to do this early, since otherwise, they will be deleted
+     before all handles are closed, which leads to failures on some platforms
+     when new tempfiles are to be created. */
+  if (dbaton->source_stream)
+    SVN_ERR(svn_stream_close(dbaton->source_stream));
+
   /* If we are including merged revisions, we need to add each rev to the
      merged chain. */
   if (frb->include_merged_revisions)
@@ -334,18 +342,18 @@ window_handler(svn_txdelta_window_t *win
 
   /* Process this file. */
   SVN_ERR(add_file_blame(frb->last_filename,
-                         dbaton->filename, chain, frb->rev,
+                         dbaton->filename, chain, dbaton->rev,
                          frb->diff_options, frb->currpool));
 
   /* If we are including merged revisions, and the current revision is not a
      merged one, we need to add its blame info to the chain for the original
      line of history. */
-  if (frb->include_merged_revisions && ! frb->merged_revision)
+  if (frb->include_merged_revisions && ! dbaton->is_merged_revision)
     {
       apr_pool_t *tmppool;
 
       SVN_ERR(add_file_blame(frb->last_original_filename,
-                             dbaton->filename, frb->chain, frb->rev,
+                             dbaton->filename, frb->chain, dbaton->rev,
                              frb->diff_options, frb->currpool));
 
       /* This filename could be around for a while, potentially, so
@@ -431,26 +439,26 @@ file_rev_handler(void *baton, const char
   if (!content_delta_handler)
     return SVN_NO_ERROR;
 
-  frb->merged_revision = merged_revision;
-
   /* Create delta baton. */
   delta_baton = apr_palloc(frb->currpool, sizeof(*delta_baton));
 
   /* Prepare the text delta window handler. */
   if (frb->last_filename)
-    SVN_ERR(svn_stream_open_readonly(&last_stream, frb->last_filename,
+    SVN_ERR(svn_stream_open_readonly(&delta_baton->source_stream, frb->last_filename,
                                      frb->currpool, pool));
   else
-    last_stream = svn_stream_empty(frb->currpool);
+    /* Means empty stream below. */
+    delta_baton->source_stream = NULL;
+  last_stream = svn_stream_disown(delta_baton->source_stream, pool);
 
-  if (frb->include_merged_revisions && !frb->merged_revision)
+  if (frb->include_merged_revisions && !merged_revision)
     filepool = frb->filepool;
   else
     filepool = frb->currpool;
 
   SVN_ERR(svn_stream_open_unique(&cur_stream, &delta_baton->filename, NULL,
                                  svn_io_file_del_on_pool_cleanup,
-                                 filepool, pool));
+                                 filepool, filepool));
 
   /* Get window handler for applying delta. */
   svn_txdelta_apply(last_stream, cur_stream, NULL, NULL,
@@ -460,13 +468,14 @@ file_rev_handler(void *baton, const char
 
   /* Wrap the window handler with our own. */
   delta_baton->file_rev_baton = frb;
+  delta_baton->is_merged_revision = merged_revision;
   *content_delta_handler = window_handler;
   *content_delta_baton = delta_baton;
 
   /* Create the rev structure. */
-  frb->rev = apr_pcalloc(frb->mainpool, sizeof(struct rev));
+  delta_baton->rev = apr_pcalloc(frb->mainpool, sizeof(struct rev));
 
-  if (revnum < frb->start_rev)
+  if (revnum < MIN(frb->start_rev, frb->end_rev))
     {
       /* We shouldn't get more than one revision before the starting
          revision (unless of including merged revisions). */
@@ -475,19 +484,23 @@ file_rev_handler(void *baton, const char
 
       /* The file existed before start_rev; generate no blame info for
          lines from this revision (or before). */
-      frb->rev->revision = SVN_INVALID_REVNUM;
+      delta_baton->rev->revision = SVN_INVALID_REVNUM;
     }
   else
     {
-      SVN_ERR_ASSERT(revnum <= frb->end_rev);
+      /* 1+ for the "youngest to oldest" blame */
+      SVN_ERR_ASSERT(revnum <= 1 + MAX(frb->end_rev, frb->start_rev));
 
       /* Set values from revision props. */
-      frb->rev->revision = revnum;
-      frb->rev->rev_props = svn_prop_hash_dup(rev_props, frb->mainpool);
+      delta_baton->rev->revision = revnum;
+      delta_baton->rev->rev_props = svn_prop_hash_dup(rev_props, frb->mainpool);
     }
 
   if (frb->include_merged_revisions)
-    frb->rev->path = apr_pstrdup(frb->mainpool, path);
+    delta_baton->rev->path = apr_pstrdup(frb->mainpool, path);
+
+  /* Keep last revision for postprocessing after all changes */
+  frb->last_rev = delta_baton->rev;
 
   return SVN_NO_ERROR;
 }
@@ -578,6 +591,7 @@ svn_client_blame5(const char *target,
   svn_stream_t *last_stream;
   svn_stream_t *stream;
   const char *target_abspath_or_url;
+  svn_revnum_t youngest;
 
   if (start->kind == svn_opt_revision_unspecified
       || end->kind == svn_opt_revision_unspecified)
@@ -599,10 +613,23 @@ svn_client_blame5(const char *target,
                                           target_abspath_or_url, ra_session,
                                           start, pool));
 
-  if (end_revnum < start_revnum)
-    return svn_error_create
-      (SVN_ERR_CLIENT_BAD_REVISION, NULL,
-       _("Start revision must precede end revision"));
+  if (start_revnum > end_revnum)
+    {
+      /* Repeat the last bit of svn_client__ra_session_from_path2(), to end
+         up where we would have ended up if we had passed 'start' rather than
+         'end' to it.
+         ### Should we try calling 
+         ###   svn_client__open_ra_session_internal(peg_revision, start)
+         ### if calling it with (peg_revision, end) fails?
+       */
+      svn_client__pathrev_t *start_loc;
+      SVN_ERR(svn_client__resolve_rev_and_url(&start_loc, ra_session,
+                                              target, peg_revision, start,
+                                              ctx, pool));
+    
+      /* Make the session point to the real URL. */
+      SVN_ERR(svn_ra_reparent(ra_session, start_loc->url, pool));
+    }
 
   /* We check the mime-type of the yougest revision before getting all
      the older revisions. */
@@ -643,6 +670,7 @@ svn_client_blame5(const char *target,
   frb.diff_options = diff_options;
   frb.include_merged_revisions = include_merged_revisions;
   frb.last_filename = NULL;
+  frb.last_rev = NULL;
   frb.last_original_filename = NULL;
   frb.chain = apr_palloc(pool, sizeof(*frb.chain));
   frb.chain->blame = NULL;
@@ -674,8 +702,11 @@ svn_client_blame5(const char *target,
      We need to ensure that we get one revision before the start_rev,
      if available so that we can know what was actually changed in the start
      revision. */
+  SVN_ERR(svn_ra_get_latest_revnum(ra_session, &youngest, frb.currpool));
   SVN_ERR(svn_ra_get_file_revs2(ra_session, "",
-                                start_revnum - (start_revnum > 0 ? 1 : 0),
+                                start_revnum 
+                                - (0 < start_revnum && start_revnum <= end_revnum ? 1 : 0)
+                                + (youngest > start_revnum && start_revnum > end_revnum ? 1 : 0),
                                 end_revnum, include_merged_revisions,
                                 file_rev_handler, &frb, pool));
 
@@ -762,7 +793,7 @@ svn_client_blame5(const char *target,
          the most recently changed revision.  ### Is this really what we want
          to do here?  Do the sematics of copy change? */
       if (!frb.chain->blame)
-        frb.chain->blame = blame_create(frb.chain, frb.rev, 0);
+        frb.chain->blame = blame_create(frb.chain, frb.last_rev, 0);
 
       normalize_blames(frb.chain, frb.merged_chain, pool);
       walk_merged = frb.merged_chain->blame;

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/client.h?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/client.h (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/client.h Mon Jun 24 05:52:34 2013
@@ -20,7 +20,8 @@
  *    under the License.
  * ====================================================================
  */
-
+
+
 
 #ifndef SVN_LIBSVN_CLIENT_H
 #define SVN_LIBSVN_CLIENT_H
@@ -208,7 +209,9 @@ svn_client__repos_location_segments(apr_
    Use the authentication baton cached in CTX to authenticate against
    the repository.  Use POOL for all allocations.
 
-   See also svn_client__youngest_common_ancestor().
+   See also svn_client__calc_youngest_common_ancestor() to find youngest
+   common ancestor for already fetched history-as-mergeinfo information.
+
 */
 svn_error_t *
 svn_client__get_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p,
@@ -219,6 +222,34 @@ svn_client__get_youngest_common_ancestor
                                          apr_pool_t *result_pool,
                                          apr_pool_t *scratch_pool);
 
+/* Find the common ancestor of two locations in a repository using already
+   fetched history-as-mergeinfo information.
+
+   Ancestry is determined by the 'copy-from' relationship and the normal
+   successor relationship.
+
+   Set *ANCESTOR_P to the location of the youngest common ancestor of
+   LOC1 and LOC2.  If the locations have no common ancestor (including if
+   they don't have the same repository root URL), set *ANCESTOR_P to NULL.
+
+   HISTORY1, HAS_REV_ZERO_HISTORY1, HISTORY2, HAS_REV_ZERO_HISTORY2 are
+   history-as-mergeinfo information as returned by
+   svn_client__get_history_as_mergeinfo() for LOC1 and LOC2 respectively.
+
+   See also svn_client__get_youngest_common_ancestor().
+
+*/
+svn_error_t *
+svn_client__calc_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p,
+                                          const svn_client__pathrev_t *loc1,
+                                          apr_hash_t *history1,
+                                          svn_boolean_t has_rev_zero_history1,
+                                          const svn_client__pathrev_t *loc2,
+                                          apr_hash_t *history2,
+                                          svn_boolean_t has_rev_zero_history2,
+                                          apr_pool_t *result_pool,
+                                          apr_pool_t *scratch_pool);
+
 /* Ensure that RA_SESSION's session URL matches SESSION_URL,
    reparenting that session if necessary.
    Store the previous session URL in *OLD_SESSION_URL (so that if the
@@ -247,7 +278,8 @@ svn_client__ensure_ra_session_url(const 
                                   apr_pool_t *pool);
 
 /* ---------------------------------------------------------------- */
-
+
+
 /*** RA callbacks ***/
 
 
@@ -329,7 +361,8 @@ svn_client__ra_make_cb_baton(svn_wc_cont
                              apr_pool_t *result_pool);
 
 /* ---------------------------------------------------------------- */
-
+
+
 /*** Add/delete ***/
 
 /* If AUTOPROPS is not null: Then read automatic properties matching PATH
@@ -442,7 +475,8 @@ svn_client__make_local_parents(const cha
                                apr_pool_t *pool);
 
 /* ---------------------------------------------------------------- */
-
+
+
 /*** Checkout, update and switch ***/
 
 /* Update a working copy LOCAL_ABSPATH to REVISION, and (if not NULL) set
@@ -581,7 +615,8 @@ svn_client__switch_internal(svn_revnum_t
                             apr_pool_t *pool);
 
 /* ---------------------------------------------------------------- */
-
+
+
 /*** Inheritable Properties ***/
 
 /* Convert any svn_prop_inherited_item_t elements in INHERITED_PROPS which
@@ -626,7 +661,8 @@ svn_client__get_inheritable_props(apr_ha
                                   apr_pool_t *scratch_pool);
 
 /* ---------------------------------------------------------------- */
-
+
+
 /*** Editor for repository diff ***/
 
 /* Create an editor for a pure repository comparison, i.e. comparing one
@@ -666,7 +702,8 @@ svn_client__get_diff_editor2(const svn_d
                              apr_pool_t *result_pool);
 
 /* ---------------------------------------------------------------- */
-
+
+
 /*** Editor for diff summary ***/
 
 /* Set *CALLBACKS and *CALLBACK_BATON to a set of diff callbacks that will
@@ -689,7 +726,8 @@ svn_client__get_diff_summarize_callbacks
                         apr_pool_t *pool);
 
 /* ---------------------------------------------------------------- */
-
+
+
 /*** Copy Stuff ***/
 
 /* This structure is used to associate a specific copy or move SRC with a
@@ -730,7 +768,8 @@ typedef struct svn_client__copy_pair_t
 } svn_client__copy_pair_t;
 
 /* ---------------------------------------------------------------- */
-
+
+
 /*** Commit Stuff ***/
 
 /* WARNING: This is all new, untested, un-peer-reviewed conceptual
@@ -944,7 +983,8 @@ svn_client__do_commit(const char *base_u
                       apr_pool_t *scratch_pool);
 
 
-
+
+
 /*** Externals (Modules) ***/
 
 /* Handle changes to the svn:externals property described by EXTERNALS_NEW,
@@ -1116,7 +1156,8 @@ svn_client__resolve_conflicts(svn_boolea
                               svn_client_ctx_t *ctx,
                               apr_pool_t *scratch_pool);
 
-
+
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/merge.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/merge.c Mon Jun 24 05:52:34 2013
@@ -12031,7 +12031,7 @@ operative_rev_receiver(void *baton,
 /* Wrapper around svn_client__mergeinfo_log. All arguments are as per
    that private API.  The discover_changed_paths, depth, and revprops args to
    svn_client__mergeinfo_log are always TRUE, svn_depth_infinity_t,
-   and NULL respectively.
+   and empty array respectively.
 
    If RECEIVER raises a SVN_ERR_CEASE_INVOCATION error, but still sets
    *REVISION to a valid revnum, then clear the error.  Otherwise return
@@ -12051,18 +12051,22 @@ short_circuit_mergeinfo_log(svn_mergeinf
                             apr_pool_t *result_pool,
                             apr_pool_t *scratch_pool)
 {
-  svn_error_t *err = svn_client__mergeinfo_log(finding_merged,
-                                               target_path_or_url,
-                                               target_peg_revision,
-                                               target_mergeinfo_cat,
-                                               source_path_or_url,
-                                               source_peg_revision,
-                                               source_start_revision,
-                                               source_end_revision,
-                                               receiver, revision,
-                                               TRUE, svn_depth_infinity,
-                                               NULL, ctx, result_pool,
-                                               scratch_pool);
+  apr_array_header_t *revprops;
+  svn_error_t *err;
+
+  revprops = apr_array_make(scratch_pool, 0, sizeof(const char *));
+  err = svn_client__mergeinfo_log(finding_merged,
+                                  target_path_or_url,
+                                  target_peg_revision,
+                                  target_mergeinfo_cat,
+                                  source_path_or_url,
+                                  source_peg_revision,
+                                  source_start_revision,
+                                  source_end_revision,
+                                  receiver, revision,
+                                  TRUE, svn_depth_infinity,
+                                  revprops, ctx, result_pool,
+                                  scratch_pool);
 
   if (err)
     {
@@ -12304,9 +12308,13 @@ find_automatic_merge(svn_client__pathrev
             &s_t->target->loc, SVN_INVALID_REVNUM, SVN_INVALID_REVNUM,
             s_t->target_ra_session, ctx, scratch_pool));
 
-  SVN_ERR(svn_client__get_youngest_common_ancestor(
-            &s_t->yca, s_t->source, &s_t->target->loc, s_t->source_ra_session,
-            ctx, result_pool, result_pool));
+  SVN_ERR(svn_client__calc_youngest_common_ancestor(
+            &s_t->yca, s_t->source, s_t->source_branch.history,
+            s_t->source_branch.has_r0_history,
+            &s_t->target->loc, s_t->target_branch.history,
+            s_t->target_branch.has_r0_history,
+            result_pool, scratch_pool));
+
   if (! s_t->yca)
     return svn_error_createf(SVN_ERR_CLIENT_NOT_READY_TO_MERGE, NULL,
                              _("'%s@%ld' must be ancestrally related to "

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/ra.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/ra.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/ra.c Mon Jun 24 05:52:34 2013
@@ -601,8 +601,32 @@ svn_client__repos_location_segments(apr_
   struct gls_receiver_baton_t gls_receiver_baton;
   const char *old_session_url;
   svn_error_t *err;
+  const char *rel_path;
 
   *segments = apr_array_make(pool, 8, sizeof(svn_location_segment_t *));
+
+  /* Save us an RA layer round trip if we are on the repository root and
+     know the result in advance.  It's fair to assume that the repo root
+     has already been cached in ra_session.
+
+     We also assume that all parameters are valid and reivisons properly
+     ordered.  Otherwise, the error behavior might differ.
+   */
+  SVN_ERR(svn_ra_get_path_relative_to_root(ra_session, &rel_path, url, pool));
+  if (rel_path && rel_path[0] == 0)
+    {
+      svn_location_segment_t *segment = apr_pcalloc(pool, sizeof(*segment));
+      segment->range_start
+        = end_revision <= start_revision ? end_revision : 0;
+      segment->range_end
+        = end_revision <= start_revision ? start_revision : 0;
+      segment->path = rel_path;
+      APR_ARRAY_PUSH(*segments, svn_location_segment_t *) = segment;
+
+      return SVN_NO_ERROR;
+    }
+
+  /* Do it the hard way and ask the repository layer. */
   gls_receiver_baton.segments = *segments;
   gls_receiver_baton.ctx = ctx;
   gls_receiver_baton.pool = pool;
@@ -862,23 +886,20 @@ svn_client__repos_locations(const char *
   return SVN_NO_ERROR;
 }
 
-
 svn_error_t *
-svn_client__get_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p,
-                                         const svn_client__pathrev_t *loc1,
-                                         const svn_client__pathrev_t *loc2,
-                                         svn_ra_session_t *session,
-                                         svn_client_ctx_t *ctx,
-                                         apr_pool_t *result_pool,
-                                         apr_pool_t *scratch_pool)
+svn_client__calc_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p,
+                                          const svn_client__pathrev_t *loc1,
+                                          apr_hash_t *history1,
+                                          svn_boolean_t has_rev_zero_history1,
+                                          const svn_client__pathrev_t *loc2,
+                                          apr_hash_t *history2,
+                                          svn_boolean_t has_rev_zero_history2,
+                                          apr_pool_t *result_pool,
+                                          apr_pool_t *scratch_pool)
 {
-  apr_pool_t *sesspool = NULL;
-  apr_hash_t *history1, *history2;
   apr_hash_index_t *hi;
   svn_revnum_t yc_revision = SVN_INVALID_REVNUM;
   const char *yc_relpath = NULL;
-  svn_boolean_t has_rev_zero_history1;
-  svn_boolean_t has_rev_zero_history2;
 
   if (strcmp(loc1->repos_root_url, loc2->repos_root_url) != 0)
     {
@@ -886,32 +907,6 @@ svn_client__get_youngest_common_ancestor
       return SVN_NO_ERROR;
     }
 
-  /* Open an RA session for the two locations. */
-  if (session == NULL)
-    {
-      sesspool = svn_pool_create(scratch_pool);
-      SVN_ERR(svn_client_open_ra_session2(&session, loc1->url, NULL, ctx,
-                                          sesspool, sesspool));
-    }
-
-  /* We're going to cheat and use history-as-mergeinfo because it
-     saves us a bunch of annoying custom data comparisons and such. */
-  SVN_ERR(svn_client__get_history_as_mergeinfo(&history1,
-                                               &has_rev_zero_history1,
-                                               loc1,
-                                               SVN_INVALID_REVNUM,
-                                               SVN_INVALID_REVNUM,
-                                               session, ctx, scratch_pool));
-  SVN_ERR(svn_client__get_history_as_mergeinfo(&history2,
-                                               &has_rev_zero_history2,
-                                               loc2,
-                                               SVN_INVALID_REVNUM,
-                                               SVN_INVALID_REVNUM,
-                                               session, ctx, scratch_pool));
-  /* Close the ra session if we opened one. */
-  if (sesspool)
-    svn_pool_destroy(sesspool);
-
   /* Loop through the first location's history, check for overlapping
      paths and ranges in the second location's history, and
      remembering the youngest matching location. */
@@ -965,47 +960,62 @@ svn_client__get_youngest_common_ancestor
 }
 
 svn_error_t *
-svn_client__youngest_common_ancestor(const char **ancestor_url,
-                                     svn_revnum_t *ancestor_rev,
-                                     const char *path_or_url1,
-                                     const svn_opt_revision_t *revision1,
-                                     const char *path_or_url2,
-                                     const svn_opt_revision_t *revision2,
-                                     svn_client_ctx_t *ctx,
-                                     apr_pool_t *result_pool,
-                                     apr_pool_t *scratch_pool)
+svn_client__get_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p,
+                                         const svn_client__pathrev_t *loc1,
+                                         const svn_client__pathrev_t *loc2,
+                                         svn_ra_session_t *session,
+                                         svn_client_ctx_t *ctx,
+                                         apr_pool_t *result_pool,
+                                         apr_pool_t *scratch_pool)
 {
-  apr_pool_t *sesspool = svn_pool_create(scratch_pool);
-  svn_ra_session_t *session;
-  svn_client__pathrev_t *loc1, *loc2, *ancestor;
-
-  /* Resolve the two locations */
-  SVN_ERR(svn_client__ra_session_from_path2(&session, &loc1,
-                                            path_or_url1, NULL,
-                                            revision1, revision1,
-                                            ctx, sesspool));
-  SVN_ERR(svn_client__resolve_rev_and_url(&loc2, session,
-                                          path_or_url2, revision2, revision2,
-                                          ctx, scratch_pool));
-
-  SVN_ERR(svn_client__get_youngest_common_ancestor(
-            &ancestor, loc1, loc2, session, ctx, result_pool, scratch_pool));
+  apr_pool_t *sesspool = NULL;
+  apr_hash_t *history1, *history2;
+  svn_boolean_t has_rev_zero_history1;
+  svn_boolean_t has_rev_zero_history2;
 
-  if (ancestor)
+  if (strcmp(loc1->repos_root_url, loc2->repos_root_url) != 0)
     {
-      *ancestor_url = ancestor->url;
-      *ancestor_rev = ancestor->rev;
+      *ancestor_p = NULL;
+      return SVN_NO_ERROR;
     }
-  else
+
+  /* Open an RA session for the two locations. */
+  if (session == NULL)
     {
-      *ancestor_url = NULL;
-      *ancestor_rev = SVN_INVALID_REVNUM;
+      sesspool = svn_pool_create(scratch_pool);
+      SVN_ERR(svn_client_open_ra_session2(&session, loc1->url, NULL, ctx,
+                                          sesspool, sesspool));
     }
-  svn_pool_destroy(sesspool);
+
+  /* We're going to cheat and use history-as-mergeinfo because it
+     saves us a bunch of annoying custom data comparisons and such. */
+  SVN_ERR(svn_client__get_history_as_mergeinfo(&history1,
+                                               &has_rev_zero_history1,
+                                               loc1,
+                                               SVN_INVALID_REVNUM,
+                                               SVN_INVALID_REVNUM,
+                                               session, ctx, scratch_pool));
+  SVN_ERR(svn_client__get_history_as_mergeinfo(&history2,
+                                               &has_rev_zero_history2,
+                                               loc2,
+                                               SVN_INVALID_REVNUM,
+                                               SVN_INVALID_REVNUM,
+                                               session, ctx, scratch_pool));
+  /* Close the ra session if we opened one. */
+  if (sesspool)
+    svn_pool_destroy(sesspool);
+
+  SVN_ERR(svn_client__calc_youngest_common_ancestor(ancestor_p,
+                                                    loc1, history1,
+                                                    has_rev_zero_history1,
+                                                    loc2, history2,
+                                                    has_rev_zero_history2,
+                                                    result_pool,
+                                                    scratch_pool));
+
   return SVN_NO_ERROR;
 }
 
-
 struct ra_ev2_baton {
   /* The working copy context, from the client context.  */
   svn_wc_context_t *wc_ctx;

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/switch.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/switch.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/switch.c Mon Jun 24 05:52:34 2013
@@ -231,8 +231,6 @@ switch_internal(svn_revnum_t *result_rev
         yca = NULL; /* Not versioned */
       else
         {
-          /* ### It would be nice if this function could reuse the existing
-             ra session instead of opening two for its own use. */
           SVN_ERR(svn_client__get_youngest_common_ancestor(
                   &yca, switch_loc, target_base_loc, ra_session, ctx,
                   pool, pool));

Modified: subversion/branches/verify-keep-going/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_delta/compat.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_delta/compat.c Mon Jun 24 05:52:34 2013
@@ -439,8 +439,8 @@ process_actions(struct ev2_edit_baton *e
                                            change->changing, NULL, props));
       else
         SVN_ERR(svn_editor_alter_file(eb->editor, repos_relpath,
-                                      change->changing, props,
-                                      checksum, contents));
+                                      change->changing,
+                                      checksum, contents, props));
     }
 
   return SVN_NO_ERROR;
@@ -1182,9 +1182,9 @@ static svn_error_t *
 alter_file_cb(void *baton,
               const char *relpath,
               svn_revnum_t revision,
-              apr_hash_t *props,
               const svn_checksum_t *checksum,
               svn_stream_t *contents,
+              apr_hash_t *props,
               apr_pool_t *scratch_pool)
 {
   struct editor_baton *eb = baton;
@@ -1234,8 +1234,8 @@ static svn_error_t *
 alter_symlink_cb(void *baton,
                  const char *relpath,
                  svn_revnum_t revision,
-                 apr_hash_t *props,
                  const char *target,
+                 apr_hash_t *props,
                  apr_pool_t *scratch_pool)
 {
   /* ### should we verify the kind is truly a symlink?  */

Modified: subversion/branches/verify-keep-going/subversion/libsvn_delta/editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_delta/editor.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_delta/editor.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_delta/editor.c Mon Jun 24 05:52:34 2013
@@ -683,9 +683,9 @@ svn_error_t *
 svn_editor_alter_file(svn_editor_t *editor,
                       const char *relpath,
                       svn_revnum_t revision,
-                      apr_hash_t *props,
                       const svn_checksum_t *checksum,
-                      svn_stream_t *contents)
+                      svn_stream_t *contents,
+                      apr_hash_t *props)
 {
   svn_error_t *err = SVN_NO_ERROR;
 
@@ -705,8 +705,8 @@ svn_editor_alter_file(svn_editor_t *edit
     {
       START_CALLBACK(editor);
       err = editor->funcs.cb_alter_file(editor->baton,
-                                        relpath, revision, props,
-                                        checksum, contents,
+                                        relpath, revision,
+                                        checksum, contents, props,
                                         editor->scratch_pool);
       END_CALLBACK(editor);
     }
@@ -723,8 +723,8 @@ svn_error_t *
 svn_editor_alter_symlink(svn_editor_t *editor,
                          const char *relpath,
                          svn_revnum_t revision,
-                         apr_hash_t *props,
-                         const char *target)
+                         const char *target,
+                         apr_hash_t *props)
 {
   svn_error_t *err = SVN_NO_ERROR;
 
@@ -740,8 +740,8 @@ svn_editor_alter_symlink(svn_editor_t *e
     {
       START_CALLBACK(editor);
       err = editor->funcs.cb_alter_symlink(editor->baton,
-                                           relpath, revision, props,
-                                           target,
+                                           relpath, revision,
+                                           target, props,
                                            editor->scratch_pool);
       END_CALLBACK(editor);
     }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs/editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs/editor.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs/editor.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs/editor.c Mon Jun 24 05:52:34 2013
@@ -488,9 +488,9 @@ static svn_error_t *
 alter_file_cb(void *baton,
               const char *relpath,
               svn_revnum_t revision,
-              apr_hash_t *props,
               const svn_checksum_t *checksum,
               svn_stream_t *contents,
+              apr_hash_t *props,
               apr_pool_t *scratch_pool)
 {
   struct edit_baton *eb = baton;
@@ -521,8 +521,8 @@ static svn_error_t *
 alter_symlink_cb(void *baton,
                  const char *relpath,
                  svn_revnum_t revision,
-                 apr_hash_t *props,
                  const char *target,
+                 apr_hash_t *props,
                  apr_pool_t *scratch_pool)
 {
   struct edit_baton *eb = baton;

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_base/tree.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_base/tree.c Mon Jun 24 05:52:34 2013
@@ -4811,6 +4811,13 @@ base_node_origin_rev(svn_revnum_t *revis
      prev_location() does below will work. */
   path = svn_fs__canonicalize_abspath(path, pool);
 
+  /* Special-case the root node (for performance reasons) */
+  if (strcmp(path, "/") == 0)
+    {
+      *revision = 0;
+      return SVN_NO_ERROR;
+    }
+
   /* If we have support for the node-origins table, we'll try to use
      it. */
   if (bfd->format >= SVN_FS_BASE__MIN_NODE_ORIGINS_FORMAT)

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c Mon Jun 24 05:52:34 2013
@@ -1461,6 +1461,12 @@ delete_revprops_shard(const char *shard_
                       apr_pool_t *scratch_pool);
 
 /* In the filesystem FS, pack all revprop shards up to min_unpacked_rev.
+ * 
+ * NOTE: Keep the old non-packed shards around until after the format bump.
+ * Otherwise, re-running upgrade will drop the packed revprop shard but
+ * have no unpacked data anymore.  Call upgrade_cleanup_pack_revprops after
+ * the bump.
+ * 
  * Use SCRATCH_POOL for temporary allocations.
  */
 static svn_error_t *
@@ -1501,6 +1507,29 @@ upgrade_pack_revprops(svn_fs_t *fs,
       svn_pool_clear(iterpool);
     }
 
+  svn_pool_destroy(iterpool);
+
+  return SVN_NO_ERROR;
+}
+
+/* In the filesystem FS, remove all non-packed revprop shards up to
+ * min_unpacked_rev.  Use SCRATCH_POOL for temporary allocations.
+ * See upgrade_pack_revprops for more info.
+ */
+static svn_error_t *
+upgrade_cleanup_pack_revprops(svn_fs_t *fs,
+                              apr_pool_t *scratch_pool)
+{
+  fs_fs_data_t *ffd = fs->fsap_data;
+  const char *revprops_shard_path;
+  apr_int64_t shard;
+  apr_int64_t first_unpacked_shard
+    =  ffd->min_unpacked_rev / ffd->max_files_per_dir;
+
+  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+  const char *revsprops_dir = svn_dirent_join(fs->path, PATH_REVPROPS_DIR,
+                                              scratch_pool);
+  
   /* delete the non-packed revprops shards afterwards */
   for (shard = 0; shard < first_unpacked_shard; ++shard)
     {
@@ -1525,6 +1554,7 @@ upgrade_body(void *baton, apr_pool_t *po
   int format, max_files_per_dir;
   const char *format_path = path_format(fs, pool);
   svn_node_kind_t kind;
+  svn_boolean_t needs_revprop_shard_cleanup = FALSE;
 
   /* Read the FS format number and max-files-per-dir setting. */
   SVN_ERR(read_format(&format, &max_files_per_dir, format_path, pool));
@@ -1576,15 +1606,28 @@ upgrade_body(void *baton, apr_pool_t *po
   if (format < SVN_FS_FS__MIN_PACKED_FORMAT)
     SVN_ERR(svn_io_file_create(path_min_unpacked_rev(fs, pool), "0\n", pool));
 
-  /* If the file system supports revision packing but not revprop packing,
-     pack the revprops up to the point that revision data has been packed. */
+  /* If the file system supports revision packing but not revprop packing
+     *and* the FS has been sharded, pack the revprops up to the point that
+     revision data has been packed.  However, keep the non-packed revprop
+     files around until after the format bump */
   if (   format >= SVN_FS_FS__MIN_PACKED_FORMAT
-      && format < SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
-    SVN_ERR(upgrade_pack_revprops(fs, pool));
+      && format < SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT
+      && max_files_per_dir > 0)
+    {
+      needs_revprop_shard_cleanup = TRUE;
+      SVN_ERR(upgrade_pack_revprops(fs, pool));
+    }
 
   /* Bump the format file. */
-  return write_format(format_path, SVN_FS_FS__FORMAT_NUMBER, max_files_per_dir,
-                      TRUE, pool);
+  SVN_ERR(write_format(format_path, SVN_FS_FS__FORMAT_NUMBER,
+                       max_files_per_dir, TRUE, pool));
+
+  /* Now, it is safe to remove the redundant revprop files. */
+  if (needs_revprop_shard_cleanup)
+    SVN_ERR(upgrade_cleanup_pack_revprops(fs, pool));
+
+  /* Done */
+  return SVN_NO_ERROR;
 }
 
 
@@ -3247,11 +3290,13 @@ ensure_revprop_timeout(svn_fs_t *fs)
 static void
 log_revprop_cache_init_warning(svn_fs_t *fs,
                                svn_error_t *underlying_err,
-                               const char *message)
+                               const char *message,
+                               apr_pool_t *pool)
 {
-  svn_error_t *err = svn_error_createf(SVN_ERR_FS_REVPROP_CACHE_INIT_FAILURE,
-                                       underlying_err,
-                                       message, fs->path);
+  svn_error_t *err = svn_error_createf(
+                       SVN_ERR_FS_REVPROP_CACHE_INIT_FAILURE,
+                       underlying_err, message,
+                       svn_dirent_local_style(fs->path, pool));
 
   if (fs->warning)
     (fs->warning)(fs->warning_baton, err);
@@ -3280,7 +3325,8 @@ has_revprop_cache(svn_fs_t *fs, apr_pool
       ffd->revprop_cache = NULL;
       log_revprop_cache_init_warning(fs, NULL,
                                      "Revprop caching for '%s' disabled"
-                                     " because it would be inefficient.");
+                                     " because it would be inefficient.",
+                                     pool);
 
       return FALSE;
     }
@@ -3295,7 +3341,8 @@ has_revprop_cache(svn_fs_t *fs, apr_pool
       log_revprop_cache_init_warning(fs, error,
                                      "Revprop caching for '%s' disabled "
                                      "because SHM infrastructure for revprop "
-                                     "caching failed to initialize.");
+                                     "caching failed to initialize.",
+                                     pool);
 
       return FALSE;
     }
@@ -7151,6 +7198,8 @@ choose_delta_base(representation_t **rep
        * Please note that copied nodes - such as branch directories - will
        * look the same (false positive) while reps shared within the same
        * revision will not be caught (false negative).
+       *
+       * Message-ID: <CA...@mail.gmail.com>
        */
       if (props)
         {
@@ -10002,6 +10051,9 @@ pack_revprops_shard(const char *pack_fil
   end_rev = (svn_revnum_t) ((shard + 1) * (max_files_per_dir) - 1);
   if (start_rev == 0)
     ++start_rev;
+    /* Special special case: if max_files_per_dir is 1, then at this point
+       start_rev == 1 and end_rev == 0 (!).  Fortunately, everything just
+       works. */
 
   /* initialize the revprop size info */
   sizes = apr_array_make(scratch_pool, max_files_per_dir, sizeof(apr_off_t));

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/tree.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/tree.c Mon Jun 24 05:52:34 2013
@@ -342,6 +342,9 @@ cache_lookup( fs_fs_dag_cache_t *cache
   apr_size_t path_len = strlen(path);
   long int hash_value = revision;
 
+  /* "randomizing" / distributing factor used in our hash function */
+  enum { factor = 0xd1f3da69 };
+
   /* optimistic lookup: hit the same bucket again? */
   cache_entry_t *result = &cache->buckets[cache->last_hit];
   if (   (result->revision == revision)
@@ -353,11 +356,40 @@ cache_lookup( fs_fs_dag_cache_t *cache
 
   /* need to do a full lookup.  Calculate the hash value
      (HASH_VALUE has been initialized to REVISION). */
-  for (i = 0; i + 4 <= path_len; i += 4)
-    hash_value = hash_value * 0xd1f3da69 + *(const apr_uint32_t*)(path + i);
+  i = 0;
+#if SVN_UNALIGNED_ACCESS_IS_OK
+  /* We relax the dependency chain between iterations by processing
+     two chunks from the input per hash_value self-multiplication.
+     The HASH_VALUE update latency is now 1 MUL latency + 1 ADD latency
+     per 2 chunks instead of 1 chunk.
+   */
+  for (; i + 8 <= path_len; i += 8)
+    hash_value = hash_value * factor * factor
+               + (  (long int)*(const apr_uint32_t*)(path + i) * factor
+                  + (long int)*(const apr_uint32_t*)(path + i + 4));
+#else
+  for (; i + 4 <= path_len; i += 4)
+    {
+      /* read the data in BIG-ENDIAN order
+         (it's just simpler code and most of the machines in question are
+          actually big endian) */
+      apr_uint32_t val = 0;
+      int j;
+
+      /* most compilers will unroll this loop: */
+      for (j = 0; j < 4; j++)
+        val = (val << 8) + (unsigned char)path[i + j];
+
+      hash_value = hash_value * factor + val;
+    }
+#endif
 
   for (; i < path_len; ++i)
-    hash_value = hash_value * 33 + path[i];
+    /* Help GCC to minimize the HASH_VALUE update latency by splitting the
+       MUL 33 of the naive implementation: h = h * 33 + path[i].  This
+       shortens the dependency chain from 1 shift + 2 ADDs to 1 shift + 1 ADD.
+     */
+    hash_value = hash_value * 32 + (hash_value + (unsigned char)path[i]);
 
   bucket_index = hash_value + (hash_value >> 16);
   bucket_index = (bucket_index + (bucket_index >> 8)) % BUCKET_COUNT;
@@ -3375,6 +3407,14 @@ fs_node_origin_rev(svn_revnum_t *revisio
       return SVN_NO_ERROR;
     }
 
+  /* The root node always has ID 0, created in revision 0 and will never
+     use the new-style ID format. */
+  if (strcmp(node_id, "0") == 0)
+    {
+      *revision = 0;
+      return SVN_NO_ERROR;
+    }
+
   /* OK, it's an old-style ID?  Maybe it's cached. */
   SVN_ERR(svn_fs_fs__get_node_origin(&cached_origin_id,
                                      fs,

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra/ra_loader.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra/ra_loader.c Mon Jun 24 05:52:34 2013
@@ -1030,6 +1030,13 @@ svn_error_t *svn_ra_get_file_revs2(svn_r
   if (include_merged_revisions)
     SVN_ERR(svn_ra__assert_mergeinfo_capable_server(session, NULL, pool));
 
+  if (start > end)
+    SVN_ERR(
+     svn_ra__assert_capable_server(session,
+                                   SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE,
+                                   NULL,
+                                   pool));
+
   err = session->vtable->get_file_revs(session, path, start, end,
                                        include_merged_revisions,
                                        handler, handler_baton, pool);

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra/util.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra/util.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra/util.c Mon Jun 24 05:52:34 2013
@@ -69,6 +69,31 @@ svn_ra__assert_mergeinfo_capable_server(
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_ra__assert_capable_server(svn_ra_session_t *ra_session,
+                              const char *capability,
+                              const char *path_or_url,
+                              apr_pool_t *pool)
+{
+  if (!strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO))
+    return svn_ra__assert_mergeinfo_capable_server(ra_session, path_or_url,
+                                                   pool);
+
+  else
+    {
+      svn_boolean_t has;
+      SVN_ERR(svn_ra_has_capability(ra_session, &has, capability, pool));
+      if (! has)
+        return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+                               _("The '%s' feature is not supported by '%s'"),
+                               capability,
+                               svn_path_is_url(path_or_url)
+                                  ? path_or_url
+                                  : svn_dirent_local_style(path_or_url, pool));
+    }
+  return SVN_NO_ERROR;
+}
+
 /* Does ERR mean "the current value of the revprop isn't equal to
    the *OLD_VALUE_P you gave me"?
  */

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/blame.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/blame.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/blame.c Mon Jun 24 05:52:34 2013
@@ -366,7 +366,7 @@ svn_ra_serf__get_file_revs(svn_ra_sessio
   err = svn_ra_serf__context_run_one(handler, pool);
 
   err = svn_error_compose_create(
-            svn_ra_serf__error_on_status(handler->sline.code,
+            svn_ra_serf__error_on_status(handler->sline,
                                          handler->path,
                                          handler->location),
             err);

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/commit.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/commit.c Mon Jun 24 05:52:34 2013
@@ -223,7 +223,7 @@ return_response_err(svn_ra_serf__handler
   /* Try to return one of the standard errors for 301, 404, etc.,
      then look for an error embedded in the response.  */
   return svn_error_compose_create(svn_ra_serf__error_on_status(
-                                    handler->sline.code,
+                                    handler->sline,
                                     handler->path,
                                     handler->location),
                                   err);

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getdate.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getdate.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getdate.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getdate.c Mon Jun 24 05:52:34 2013
@@ -131,6 +131,7 @@ svn_ra_serf__get_dated_revision(svn_ra_s
   svn_ra_serf__handler_t *handler;
   svn_ra_serf__xml_context_t *xmlctx;
   const char *report_target;
+  svn_error_t *err;
 
   date_ctx = apr_palloc(pool, sizeof(*date_ctx));
   date_ctx->time = tm;
@@ -155,7 +156,15 @@ svn_ra_serf__get_dated_revision(svn_ra_s
 
   *date_ctx->revision = SVN_INVALID_REVNUM;
 
-  /* ### use svn_ra_serf__error_on_status() ?  */
+  err = svn_ra_serf__context_run_one(handler, pool);
 
-  return svn_error_trace(svn_ra_serf__context_run_one(handler, pool));
+  SVN_ERR(svn_error_compose_create(
+              svn_ra_serf__error_on_status(handler->sline,
+                                           report_target,
+                                           handler->location),
+              err));
+
+  SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(*revision));
+
+  return SVN_NO_ERROR;
 }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocations.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocations.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocations.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocations.c Mon Jun 24 05:52:34 2013
@@ -192,7 +192,7 @@ svn_ra_serf__get_locations(svn_ra_sessio
   err = svn_ra_serf__context_run_one(handler, pool);
 
   SVN_ERR(svn_error_compose_create(
-              svn_ra_serf__error_on_status(handler->sline.code,
+              svn_ra_serf__error_on_status(handler->sline,
                                            req_url,
                                            handler->location),
               err));

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocationsegments.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocationsegments.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocationsegments.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocationsegments.c Mon Jun 24 05:52:34 2013
@@ -194,7 +194,7 @@ svn_ra_serf__get_location_segments(svn_r
   err = svn_ra_serf__context_run_one(handler, pool);
 
   err = svn_error_compose_create(
-         svn_ra_serf__error_on_status(handler->sline.code,
+         svn_ra_serf__error_on_status(handler->sline,
                                       handler->path,
                                       handler->location),
          err);

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocks.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocks.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocks.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocks.c Mon Jun 24 05:52:34 2013
@@ -266,7 +266,7 @@ svn_ra_serf__get_locks(svn_ra_session_t 
      have existed earlier (E.g. 'svn ls http://s/svn/trunk/file@1' */
   if (handler->sline.code != 404)
     {
-      SVN_ERR(svn_ra_serf__error_on_status(handler->sline.code,
+      SVN_ERR(svn_ra_serf__error_on_status(handler->sline,
                                            handler->path,
                                            handler->location));
     }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/inherited_props.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/inherited_props.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/inherited_props.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/inherited_props.c Mon Jun 24 05:52:34 2013
@@ -332,7 +332,7 @@ svn_ra_serf__get_inherited_props(svn_ra_
 
   err = svn_ra_serf__context_run_one(handler, scratch_pool);
   SVN_ERR(svn_error_compose_create(
-                    svn_ra_serf__error_on_status(handler->sline.code,
+                    svn_ra_serf__error_on_status(handler->sline,
                                                  handler->path,
                                                  handler->location),
                     err));

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/log.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/log.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/log.c Mon Jun 24 05:52:34 2013
@@ -595,7 +595,7 @@ svn_ra_serf__get_log(svn_ra_session_t *r
   err = svn_ra_serf__context_run_one(handler, pool);
 
   SVN_ERR(svn_error_compose_create(
-              svn_ra_serf__error_on_status(handler->sline.code,
+              svn_ra_serf__error_on_status(handler->sline,
                                            req_url,
                                            handler->location),
               err));

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/mergeinfo.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/mergeinfo.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/mergeinfo.c Mon Jun 24 05:52:34 2013
@@ -191,7 +191,7 @@ svn_ra_serf__get_mergeinfo(svn_ra_sessio
                            svn_boolean_t include_descendants,
                            apr_pool_t *pool)
 {
-  svn_error_t *err, *err2;
+  svn_error_t *err;
   mergeinfo_context_t *mergeinfo_ctx;
   svn_ra_serf__session_t *session = ra_session->priv;
   svn_ra_serf__handler_t *handler;
@@ -229,15 +229,10 @@ svn_ra_serf__get_mergeinfo(svn_ra_sessio
 
   err = svn_ra_serf__context_run_one(handler, pool);
 
-  err2 = svn_ra_serf__error_on_status(handler->sline.code, handler->path,
-                                      handler->location);
-  if (err2)
-    {
-      svn_error_clear(err);
-      return err2;
-    }
-
-  SVN_ERR(err);
+  SVN_ERR(svn_error_compose_create(
+                svn_ra_serf__error_on_status(handler->sline, handler->path,
+                                             handler->location),
+                err));
 
   if (handler->done && apr_hash_count(mergeinfo_ctx->result_catalog))
     *catalog = mergeinfo_ctx->result_catalog;

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/options.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/options.c Mon Jun 24 05:52:34 2013
@@ -436,11 +436,12 @@ svn_ra_serf__v2_get_youngest_revnum(svn_
 
   SVN_ERR(create_options_req(&opt_ctx, session, conn, scratch_pool));
   SVN_ERR(svn_ra_serf__context_run_one(opt_ctx->handler, scratch_pool));
-  SVN_ERR(svn_ra_serf__error_on_status(opt_ctx->handler->sline.code,
+  SVN_ERR(svn_ra_serf__error_on_status(opt_ctx->handler->sline,
                                        opt_ctx->handler->path,
                                        opt_ctx->handler->location));
 
   *youngest = opt_ctx->youngest_rev;
+  SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(*youngest));
 
   return SVN_NO_ERROR;
 }
@@ -460,7 +461,7 @@ svn_ra_serf__v1_get_activity_collection(
   SVN_ERR(create_options_req(&opt_ctx, session, conn, scratch_pool));
   SVN_ERR(svn_ra_serf__context_run_one(opt_ctx->handler, scratch_pool));
 
-  SVN_ERR(svn_ra_serf__error_on_status(opt_ctx->handler->sline.code,
+  SVN_ERR(svn_ra_serf__error_on_status(opt_ctx->handler->sline,
                                        opt_ctx->handler->path,
                                        opt_ctx->handler->location));
 
@@ -499,7 +500,7 @@ svn_ra_serf__exchange_capabilities(svn_r
     }
 
   SVN_ERR(svn_error_compose_create(
-              svn_ra_serf__error_on_status(opt_ctx->handler->sline.code,
+              svn_ra_serf__error_on_status(opt_ctx->handler->sline,
                                            serf_sess->session_url.path,
                                            opt_ctx->handler->location),
               err));

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/property.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/property.c Mon Jun 24 05:52:34 2013
@@ -635,7 +635,7 @@ svn_ra_serf__wait_for_props(svn_ra_serf_
 
   err = svn_ra_serf__context_run_one(handler, scratch_pool);
 
-  err2 = svn_ra_serf__error_on_status(handler->sline.code,
+  err2 = svn_ra_serf__error_on_status(handler->sline,
                                       handler->path,
                                       handler->location);
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/ra_serf.h?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/ra_serf.h Mon Jun 24 05:52:34 2013
@@ -1744,7 +1744,7 @@ svn_ra_serf__credentials_callback(char *
  * where it necessary.
  */
 svn_error_t *
-svn_ra_serf__error_on_status(int status_code,
+svn_ra_serf__error_on_status(serf_status_line sline,
                              const char *path,
                              const char *location);
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/replay.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/replay.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/replay.c Mon Jun 24 05:52:34 2013
@@ -696,7 +696,7 @@ svn_ra_serf__replay(svn_ra_session_t *ra
   err = svn_ra_serf__context_run_wait(&replay_ctx->done, session, pool);
 
   SVN_ERR(svn_error_compose_create(
-              svn_ra_serf__error_on_status(handler->sline.code,
+              svn_ra_serf__error_on_status(handler->sline,
                                            handler->path,
                                            handler->location),
               err));
@@ -905,7 +905,7 @@ svn_ra_serf__replay_range(svn_ra_session
           svn_ra_serf__handler_t *done_handler = ctx->report_handler;
 
           done_list = done_list->next;
-          SVN_ERR(svn_ra_serf__error_on_status(done_handler->sline.code,
+          SVN_ERR(svn_ra_serf__error_on_status(done_handler->sline,
                                                done_handler->path,
                                                done_handler->location));
           svn_pool_destroy(ctx->src_rev_pool);

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/update.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/update.c Mon Jun 24 05:52:34 2013
@@ -1268,7 +1268,7 @@ handle_stream(serf_request_t *request,
   /* ### new field. make sure we didn't miss some initialization.  */
   SVN_ERR_ASSERT(fetch_ctx->handler != NULL);
 
-  err = svn_ra_serf__error_on_status(fetch_ctx->handler->sline.code,
+  err = svn_ra_serf__error_on_status(fetch_ctx->handler->sline,
                                      fetch_ctx->info->name,
                                      fetch_ctx->handler->location);
   if (err)
@@ -2891,7 +2891,7 @@ finish_report(void *report_baton,
         {
           return svn_error_trace(
                     svn_error_compose_create(
-                        svn_ra_serf__error_on_status(handler->sline.code,
+                        svn_ra_serf__error_on_status(handler->sline,
                                                      handler->path,
                                                      handler->location),
                         err));
@@ -3250,6 +3250,14 @@ make_update_reporter(svn_ra_session_t *r
              supports inlining properties in update editor report. */
           if (sess->supports_inline_props)
             {
+              /* NOTE: both inlined properties and server->allows_bulk_update
+                 (flag SVN_DAV_ALLOW_BULK_UPDATES) were added in 1.8.0, so
+                 this code is never reached with a released version of
+                 mod_dav_svn.
+
+                 Basically by default a 1.8.0 client connecting to a 1.7.x or
+                 older server will always use bulk updates. */
+
               /* Inline props supported: do not use bulk updates. */
               use_bulk_updates = FALSE;
             }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/util.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/util.c Mon Jun 24 05:52:34 2013
@@ -2386,17 +2386,17 @@ svn_ra_serf__report_resource(const char 
 }
 
 svn_error_t *
-svn_ra_serf__error_on_status(int status_code,
+svn_ra_serf__error_on_status(serf_status_line sline,
                              const char *path,
                              const char *location)
 {
-  switch(status_code)
+  switch(sline.code)
     {
       case 301:
       case 302:
       case 307:
         return svn_error_createf(SVN_ERR_RA_DAV_RELOCATED, NULL,
-                                 (status_code == 301)
+                                 (sline.code == 301)
                                  ? _("Repository moved permanently to '%s';"
                                      " please relocate")
                                  : _("Repository moved temporarily to '%s';"
@@ -2411,8 +2411,18 @@ svn_ra_serf__error_on_status(int status_
       case 423:
         return svn_error_createf(SVN_ERR_FS_NO_LOCK_TOKEN, NULL,
                                  _("'%s': no lock token available"), path);
+
+      case 411:
+        return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
+                                _("DAV request failed: "
+                                  "Content length required"));
     }
 
+  if (sline.code >= 300)
+    return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
+                             _("Unexpected HTTP status %d '%s' on '%s'\n"),
+                             sline.code, sline.reason, path);
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_repos/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_repos/commit.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_repos/commit.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_repos/commit.c Mon Jun 24 05:52:34 2013
@@ -1120,15 +1120,15 @@ static svn_error_t *
 alter_file_cb(void *baton,
               const char *relpath,
               svn_revnum_t revision,
-              apr_hash_t *props,
               const svn_checksum_t *checksum,
               svn_stream_t *contents,
+              apr_hash_t *props,
               apr_pool_t *scratch_pool)
 {
   struct ev2_baton *eb = baton;
 
-  SVN_ERR(svn_editor_alter_file(eb->inner, relpath, revision, props,
-                                checksum, contents));
+  SVN_ERR(svn_editor_alter_file(eb->inner, relpath, revision,
+                                checksum, contents, props));
   return SVN_NO_ERROR;
 }
 
@@ -1138,14 +1138,14 @@ static svn_error_t *
 alter_symlink_cb(void *baton,
                  const char *relpath,
                  svn_revnum_t revision,
-                 apr_hash_t *props,
                  const char *target,
+                 apr_hash_t *props,
                  apr_pool_t *scratch_pool)
 {
   struct ev2_baton *eb = baton;
 
-  SVN_ERR(svn_editor_alter_symlink(eb->inner, relpath, revision, props,
-                                   target));
+  SVN_ERR(svn_editor_alter_symlink(eb->inner, relpath, revision,
+                                   target, props));
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_repos/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_repos/replay.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_repos/replay.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_repos/replay.c Mon Jun 24 05:52:34 2013
@@ -1457,8 +1457,8 @@ replay_node(svn_fs_root_t *root,
             }
 
           SVN_ERR(svn_editor_alter_file(editor, repos_relpath,
-                                        SVN_INVALID_REVNUM, props, checksum,
-                                        contents));
+                                        SVN_INVALID_REVNUM,
+                                        checksum, contents, props));
         }
 
       if (change->node_kind == svn_node_dir

Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/io.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/io.c Mon Jun 24 05:52:34 2013
@@ -3614,6 +3614,9 @@ svn_io_read_length_line(apr_file_t *file
       apr_size_t bytes_read = 0;
       char *eol;
 
+      if (to_read == 0)
+        break;
+
       /* read data block (or just a part of it) */
       SVN_ERR(svn_io_file_read_full2(file, buf, to_read,
                                      &bytes_read, &eof, pool));

Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/deprecated.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/deprecated.c Mon Jun 24 05:52:34 2013
@@ -4720,3 +4720,98 @@ svn_wc_read_kind(svn_node_kind_t *kind,
 
   return SVN_NO_ERROR;
 }
+
+svn_wc_conflict_description2_t *
+svn_wc_conflict_description_create_text2(const char *local_abspath,
+                                         apr_pool_t *result_pool)
+{
+  svn_wc_conflict_description2_t *conflict;
+
+  SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
+
+  conflict = apr_pcalloc(result_pool, sizeof(*conflict));
+  conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
+  conflict->node_kind = svn_node_file;
+  conflict->kind = svn_wc_conflict_kind_text;
+  conflict->action = svn_wc_conflict_action_edit;
+  conflict->reason = svn_wc_conflict_reason_edited;
+  return conflict;
+}
+
+svn_wc_conflict_description2_t *
+svn_wc_conflict_description_create_prop2(const char *local_abspath,
+                                         svn_node_kind_t node_kind,
+                                         const char *property_name,
+                                         apr_pool_t *result_pool)
+{
+  svn_wc_conflict_description2_t *conflict;
+
+  SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
+
+  conflict = apr_pcalloc(result_pool, sizeof(*conflict));
+  conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
+  conflict->node_kind = node_kind;
+  conflict->kind = svn_wc_conflict_kind_property;
+  conflict->property_name = apr_pstrdup(result_pool, property_name);
+  return conflict;
+}
+
+svn_wc_conflict_description2_t *
+svn_wc_conflict_description_create_tree2(
+  const char *local_abspath,
+  svn_node_kind_t node_kind,
+  svn_wc_operation_t operation,
+  const svn_wc_conflict_version_t *src_left_version,
+  const svn_wc_conflict_version_t *src_right_version,
+  apr_pool_t *result_pool)
+{
+  svn_wc_conflict_description2_t *conflict;
+
+  SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
+
+  conflict = apr_pcalloc(result_pool, sizeof(*conflict));
+  conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
+  conflict->node_kind = node_kind;
+  conflict->kind = svn_wc_conflict_kind_tree;
+  conflict->operation = operation;
+  conflict->src_left_version = svn_wc_conflict_version_dup(src_left_version,
+                                                           result_pool);
+  conflict->src_right_version = svn_wc_conflict_version_dup(src_right_version,
+                                                            result_pool);
+  return conflict;
+}
+
+svn_wc_conflict_description2_t *
+svn_wc__conflict_description2_dup(const svn_wc_conflict_description2_t *conflict,
+                                  apr_pool_t *pool)
+{
+  svn_wc_conflict_description2_t *new_conflict;
+
+  new_conflict = apr_pcalloc(pool, sizeof(*new_conflict));
+
+  /* Shallow copy all members. */
+  *new_conflict = *conflict;
+
+  if (conflict->local_abspath)
+    new_conflict->local_abspath = apr_pstrdup(pool, conflict->local_abspath);
+  if (conflict->property_name)
+    new_conflict->property_name = apr_pstrdup(pool, conflict->property_name);
+  if (conflict->mime_type)
+    new_conflict->mime_type = apr_pstrdup(pool, conflict->mime_type);
+  if (conflict->base_abspath)
+    new_conflict->base_abspath = apr_pstrdup(pool, conflict->base_abspath);
+  if (conflict->their_abspath)
+    new_conflict->their_abspath = apr_pstrdup(pool, conflict->their_abspath);
+  if (conflict->my_abspath)
+    new_conflict->my_abspath = apr_pstrdup(pool, conflict->my_abspath);
+  if (conflict->merged_file)
+    new_conflict->merged_file = apr_pstrdup(pool, conflict->merged_file);
+  if (conflict->src_left_version)
+    new_conflict->src_left_version =
+      svn_wc_conflict_version_dup(conflict->src_left_version, pool);
+  if (conflict->src_right_version)
+    new_conflict->src_right_version =
+      svn_wc_conflict_version_dup(conflict->src_right_version, pool);
+
+  return new_conflict;
+}

Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/update_editor.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/update_editor.c Mon Jun 24 05:52:34 2013
@@ -924,6 +924,7 @@ mark_directory_edited(struct dir_baton *
       do_notification(db->edit_baton, db->local_abspath, svn_node_dir,
                       svn_wc_notify_tree_conflict, scratch_pool);
       db->already_notified = TRUE;
+
     }
 
   return SVN_NO_ERROR;
@@ -1938,8 +1939,19 @@ delete_entry(const char *path,
 
   /* Notify. */
   if (tree_conflict)
-    do_notification(eb, local_abspath, svn_node_unknown,
-                    svn_wc_notify_tree_conflict, scratch_pool);
+    {
+      if (eb->conflict_func)
+        SVN_ERR(svn_wc__conflict_invoke_resolver(eb->db, local_abspath,
+                                                 tree_conflict,
+                                                 NULL /* merge_options */,
+                                                 eb->conflict_func,
+                                                 eb->conflict_baton,
+                                                 eb->cancel_func,
+                                                 eb->cancel_baton,
+                                                 scratch_pool));
+      do_notification(eb, local_abspath, svn_node_unknown,
+                      svn_wc_notify_tree_conflict, scratch_pool);
+    }
   else
     {
       svn_wc_notify_action_t action = svn_wc_notify_update_delete;
@@ -2288,6 +2300,16 @@ add_directory(const char *path,
 
   if (tree_conflict != NULL)
     {
+      if (eb->conflict_func)
+        SVN_ERR(svn_wc__conflict_invoke_resolver(eb->db, db->local_abspath,
+                                                 tree_conflict,
+                                                 NULL /* merge_options */,
+                                                 eb->conflict_func,
+                                                 eb->conflict_baton,
+                                                 eb->cancel_func,
+                                                 eb->cancel_baton,
+                                                 pool));
+
       db->already_notified = TRUE;
       do_notification(eb, db->local_abspath, svn_node_dir,
                       svn_wc_notify_tree_conflict, pool);
@@ -3379,6 +3401,16 @@ add_file(const char *path,
                                           tree_conflict, NULL,
                                           scratch_pool));
 
+      if (eb->conflict_func)
+        SVN_ERR(svn_wc__conflict_invoke_resolver(eb->db, fb->local_abspath,
+                                                 tree_conflict,
+                                                 NULL /* merge_options */,
+                                                 eb->conflict_func,
+                                                 eb->conflict_baton,
+                                                 eb->cancel_func,
+                                                 eb->cancel_baton,
+                                                 scratch_pool));
+
       fb->already_notified = TRUE;
       do_notification(eb, fb->local_abspath, svn_node_file,
                       svn_wc_notify_tree_conflict, scratch_pool);