You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ar...@apache.org on 2011/07/20 15:06:16 UTC

svn commit: r1148749 [6/11] - in /subversion/branches/svn-bisect: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/hook-scripts/ contrib/hook-scripts/enforcer/ contrib/server-side/ contrib/server-side/fsfsfixer/fixer/ note...

Modified: subversion/branches/svn-bisect/subversion/libsvn_repos/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_repos/deprecated.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_repos/deprecated.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_repos/deprecated.c Wed Jul 20 13:06:00 2011
@@ -429,9 +429,9 @@ svn_repos_fs_get_locks(apr_hash_t **lock
                        apr_pool_t *pool)
 {
   return svn_error_trace(svn_repos_fs_get_locks2(locks, repos, path,
-                                                  svn_depth_infinity,
-                                                  authz_read_func,
-                                                  authz_read_baton, pool));
+                                                 svn_depth_infinity,
+                                                 authz_read_func,
+                                                 authz_read_baton, pool));
 }
 
 
@@ -677,18 +677,18 @@ svn_repos_dump_fs2(svn_repos_t *repos,
                    apr_pool_t *pool)
 {
   return svn_error_trace(svn_repos_dump_fs3(repos,
-                                             stream,
-                                             start_rev,
-                                             end_rev,
-                                             incremental,
-                                             use_deltas,
-                                             feedback_stream
-                                               ? repos_notify_handler
-                                               : NULL,
-                                             feedback_stream,
-                                             cancel_func,
-                                             cancel_baton,
-                                             pool));
+                                            stream,
+                                            start_rev,
+                                            end_rev,
+                                            incremental,
+                                            use_deltas,
+                                            feedback_stream
+                                              ? repos_notify_handler
+                                              : NULL,
+                                            feedback_stream,
+                                            cancel_func,
+                                            cancel_baton,
+                                            pool));
 }
 
 svn_error_t *
@@ -701,15 +701,15 @@ svn_repos_verify_fs(svn_repos_t *repos,
                     apr_pool_t *pool)
 {
   return svn_error_trace(svn_repos_verify_fs2(repos,
-                                               start_rev,
-                                               end_rev,
-                                               feedback_stream
-                                                 ? repos_notify_handler
-                                                 : NULL,
-                                               feedback_stream,
-                                               cancel_func,
-                                               cancel_baton,
-                                               pool));
+                                              start_rev,
+                                              end_rev,
+                                              feedback_stream
+                                                ? repos_notify_handler
+                                                : NULL,
+                                              feedback_stream,
+                                              cancel_func,
+                                              cancel_baton,
+                                              pool));
 }
 
 /*** From load.c ***/

Modified: subversion/branches/svn-bisect/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_repos/dump.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_repos/dump.c Wed Jul 20 13:06:00 2011
@@ -714,7 +714,7 @@ open_directory(const char *path,
 
   /* If the parent directory has explicit comparison path and rev,
      record the same for this one. */
-  if (pb && ARE_VALID_COPY_ARGS(pb->cmp_path, pb->cmp_rev))
+  if (ARE_VALID_COPY_ARGS(pb->cmp_path, pb->cmp_rev))
     {
       cmp_path = svn_relpath_join(pb->cmp_path,
                                   svn_relpath_basename(path, pool), pool);
@@ -811,7 +811,7 @@ open_file(const char *path,
 
   /* If the parent directory has explicit comparison path and rev,
      record the same for this one. */
-  if (pb && ARE_VALID_COPY_ARGS(pb->cmp_path, pb->cmp_rev))
+  if (ARE_VALID_COPY_ARGS(pb->cmp_path, pb->cmp_rev))
     {
       cmp_path = svn_relpath_join(pb->cmp_path,
                                   svn_relpath_basename(path, pool), pool);
@@ -1282,6 +1282,11 @@ svn_repos_verify_fs2(svn_repos_t *repos,
                                "(youngest revision is %ld)"),
                              end_rev, youngest);
 
+  /* Verify global/auxiliary data before verifying revisions. */
+  if (start_rev == 0)
+    SVN_ERR(svn_fs_verify(svn_fs_path(fs, pool), cancel_func, cancel_baton,
+                          pool));
+
   /* Create a notify object that we can reuse within the loop. */
   if (notify_func)
     notify = svn_repos_notify_create(svn_repos_notify_verify_rev_end,
@@ -1329,10 +1334,11 @@ svn_repos_verify_fs2(svn_repos_t *repos,
   /* We're done. */
   if (notify_func)
     {
-      notify = svn_repos_notify_create(svn_repos_notify_dump_end, iterpool);
+      notify = svn_repos_notify_create(svn_repos_notify_verify_end, iterpool);
       notify_func(notify_baton, notify, iterpool);
     }
 
+  /* Per-backend verification. */
   svn_pool_destroy(iterpool);
 
   return SVN_NO_ERROR;

Modified: subversion/branches/svn-bisect/subversion/libsvn_repos/fs-wrap.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_repos/fs-wrap.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_repos/fs-wrap.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_repos/fs-wrap.c Wed Jul 20 13:06:00 2011
@@ -215,6 +215,39 @@ svn_repos__validate_prop(const char *nam
 }
 
 
+/* Verify the mergeinfo property value VALUE and return an error if it
+ * is invalid. The PATH on which that property is set is used for error
+ * messages only.  Use SCRATCH_POOL for temporary allocations. */
+static svn_error_t *
+verify_mergeinfo(const svn_string_t *value,
+                 const char *path,
+                 apr_pool_t *scratch_pool)
+{
+  svn_error_t *err;
+  svn_mergeinfo_t mergeinfo;
+
+  /* It's okay to delete svn:mergeinfo. */
+  if (value == NULL)
+    return SVN_NO_ERROR;
+
+  /* Mergeinfo is UTF-8 encoded so the number of bytes returned by strlen()
+   * should match VALUE->LEN. Prevents trailing garbage in the property. */
+  if (strlen(value->data) != value->len)
+    return svn_error_createf(SVN_ERR_MERGEINFO_PARSE_ERROR, NULL,
+                             _("Commit rejected because mergeinfo on '%s' "
+                               "contains unexpected string terminator"),
+                             path);
+
+  err = svn_mergeinfo_parse(&mergeinfo, value->data, scratch_pool);
+  if (err)
+    return svn_error_createf(err->apr_err, err,
+                             _("Commit rejected because mergeinfo on '%s' "
+                               "is syntactically invalid"),
+                             path);
+  return SVN_NO_ERROR;
+}
+
+
 svn_error_t *
 svn_repos_fs_change_node_prop(svn_fs_root_t *root,
                               const char *path,
@@ -222,6 +255,9 @@ svn_repos_fs_change_node_prop(svn_fs_roo
                               const svn_string_t *value,
                               apr_pool_t *pool)
 {
+  if (value && strcmp(name, SVN_PROP_MERGEINFO) == 0)
+    SVN_ERR(verify_mergeinfo(value, path, pool));
+
   /* Validate the property, then call the wrapped function. */
   SVN_ERR(svn_repos__validate_prop(name, value, pool));
   return svn_fs_change_node_prop(root, path, name, value, pool);
@@ -676,12 +712,12 @@ svn_repos_fs_get_mergeinfo(svn_mergeinfo
                            apr_pool_t *pool)
 {
   return svn_error_trace(svn_repos_fs_get_mergeinfo2(mergeinfo, repos,
-                                                      paths, rev, inherit,
-                                                      FALSE,
-                                                      include_descendants,
-                                                      authz_read_func,
-                                                      authz_read_baton,
-                                                      pool));
+                                                     paths, rev, inherit,
+                                                     FALSE,
+                                                     include_descendants,
+                                                     authz_read_func,
+                                                     authz_read_baton,
+                                                     pool));
 }
 
 struct pack_notify_baton

Modified: subversion/branches/svn-bisect/subversion/libsvn_repos/hooks.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_repos/hooks.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_repos/hooks.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_repos/hooks.c Wed Jul 20 13:06:00 2011
@@ -616,8 +616,20 @@ svn_repos__hooks_pre_lock(svn_repos_t *r
 
       SVN_ERR(run_hook_cmd(&buf, SVN_REPOS__HOOK_PRE_LOCK, hook, args, NULL,
                            pool));
+
       if (token)
-        *token = buf->data;
+        {
+          svn_error_t *err;
+          /* Convert hook output from native encoding to UTF-8. */
+          err = svn_utf_cstring_to_utf8(token, buf->data, pool);
+          if (err)
+            {
+              return svn_error_create(SVN_ERR_REPOS_HOOK_FAILURE, err,
+                                      _("Output of pre-lock hook could not be "
+                                        "translated from the native locale to "
+                                        "UTF-8."));
+            }
+        }
     }
   else if (token)
     *token = "";

Modified: subversion/branches/svn-bisect/subversion/libsvn_repos/load-fs-vtable.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_repos/load-fs-vtable.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_repos/load-fs-vtable.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_repos/load-fs-vtable.c Wed Jul 20 13:06:00 2011
@@ -181,6 +181,8 @@ change_node_prop(svn_fs_root_t *txn_root
 
 /* Prepend the mergeinfo source paths in MERGEINFO_ORIG with PARENT_DIR, and
    return it in *MERGEINFO_VAL. */
+/* ### FIXME:  Consider somehow sharing code with
+   ### svnrdump/load_editor.c:prefix_mergeinfo_paths() */
 static svn_error_t *
 prefix_mergeinfo_paths(svn_string_t **mergeinfo_val,
                        const svn_string_t *mergeinfo_orig,
@@ -214,6 +216,8 @@ prefix_mergeinfo_paths(svn_string_t **me
 /* Examine the mergeinfo in INITIAL_VAL, renumber revisions in rangelists
    as appropriate, and return the (possibly new) mergeinfo in *FINAL_VAL
    (allocated from POOL). */
+/* ### FIXME:  Consider somehow sharing code with
+   ### svnrdump/load_editor.c:renumber_mergeinfo_revs() */
 static svn_error_t *
 renumber_mergeinfo_revs(svn_string_t **final_val,
                         const svn_string_t *initial_val,

Modified: subversion/branches/svn-bisect/subversion/libsvn_repos/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_repos/log.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_repos/log.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_repos/log.c Wed Jul 20 13:06:00 2011
@@ -522,41 +522,37 @@ fs_mergeinfo_changed(svn_mergeinfo_catal
                      svn_mergeinfo_catalog_t *added_mergeinfo_catalog,
                      svn_fs_t *fs,
                      svn_revnum_t rev,
-                     apr_pool_t *pool)
+                     apr_pool_t *result_pool,
+                     apr_pool_t *scratch_pool)
 
 {
   apr_hash_t *changes;
   svn_fs_root_t *root;
-  apr_pool_t *subpool = NULL, *iterpool;
+  apr_pool_t *iterpool;
   apr_hash_index_t *hi;
 
   /* Initialize return variables. */
-  *deleted_mergeinfo_catalog = apr_hash_make(pool);
-  *added_mergeinfo_catalog = apr_hash_make(pool);
+  *deleted_mergeinfo_catalog = apr_hash_make(result_pool);
+  *added_mergeinfo_catalog = apr_hash_make(result_pool);
 
   /* Revision 0 has no mergeinfo and no mergeinfo changes. */
   if (rev == 0)
     return SVN_NO_ERROR;
 
-  subpool = svn_pool_create(pool);
-
   /* We're going to use the changed-paths information for REV to
      narrow down our search. */
-  SVN_ERR(svn_fs_revision_root(&root, fs, rev, subpool));
-  SVN_ERR(svn_fs_paths_changed2(&changes, root, subpool));
+  SVN_ERR(svn_fs_revision_root(&root, fs, rev, scratch_pool));
+  SVN_ERR(svn_fs_paths_changed2(&changes, root, scratch_pool));
 
   /* No changed paths?  We're done. */
   if (apr_hash_count(changes) == 0)
-    {
-      svn_pool_destroy(subpool);
-      return SVN_NO_ERROR;
-    }
+    return SVN_NO_ERROR;
 
   /* Loop over changes, looking for anything that might carry an
      svn:mergeinfo change and is one of our paths of interest, or a
      child or [grand]parent directory thereof. */
-  iterpool = svn_pool_create(subpool);
-  for (hi = apr_hash_first(pool, changes); hi; hi = apr_hash_next(hi))
+  iterpool = svn_pool_create(scratch_pool);
+  for (hi = apr_hash_first(scratch_pool, changes); hi; hi = apr_hash_next(hi))
     {
       const void *key;
       void *val;
@@ -598,7 +594,7 @@ fs_mergeinfo_changed(svn_mergeinfo_catal
                                        root, changed_path, iterpool));
             if (copyfrom_path && SVN_IS_VALID_REVNUM(copyfrom_rev))
               {
-                base_path = apr_pstrdup(subpool, copyfrom_path);
+                base_path = apr_pstrdup(scratch_pool, copyfrom_path);
                 base_rev = copyfrom_rev;
               }
             break;
@@ -667,9 +663,9 @@ fs_mergeinfo_changed(svn_mergeinfo_catal
           svn_mergeinfo_catalog_t tmp_catalog;
 
           APR_ARRAY_PUSH(query_paths, const char *) = changed_path;
-          SVN_ERR(svn_fs_get_mergeinfo(&tmp_catalog, root,
-                                       query_paths, svn_mergeinfo_inherited,
-                                       FALSE, iterpool));
+          SVN_ERR(svn_fs_get_mergeinfo2(&tmp_catalog, root,
+                                        query_paths, svn_mergeinfo_inherited,
+                                        FALSE, FALSE, iterpool));
           tmp_mergeinfo = apr_hash_get(tmp_catalog, changed_path,
                                         APR_HASH_KEY_STRING);
           if (tmp_mergeinfo)
@@ -686,9 +682,9 @@ fs_mergeinfo_changed(svn_mergeinfo_catal
           svn_mergeinfo_catalog_t tmp_catalog;
 
           APR_ARRAY_PUSH(query_paths, const char *) = base_path;
-          SVN_ERR(svn_fs_get_mergeinfo(&tmp_catalog, base_root,
-                                       query_paths, svn_mergeinfo_inherited,
-                                       FALSE, iterpool));
+          SVN_ERR(svn_fs_get_mergeinfo2(&tmp_catalog, base_root,
+                                        query_paths, svn_mergeinfo_inherited,
+                                        FALSE, FALSE, iterpool));
           tmp_mergeinfo = apr_hash_get(tmp_catalog, base_path,
                                         APR_HASH_KEY_STRING);
           if (tmp_mergeinfo)
@@ -719,15 +715,17 @@ fs_mergeinfo_changed(svn_mergeinfo_catal
                                      mergeinfo, FALSE, iterpool));
 
           /* Toss interesting stuff into our return catalogs. */
-          hash_path = apr_pstrdup(pool, changed_path);
+          hash_path = apr_pstrdup(result_pool, changed_path);
           apr_hash_set(*deleted_mergeinfo_catalog, hash_path,
-                       APR_HASH_KEY_STRING, svn_mergeinfo_dup(deleted, pool));
+                       APR_HASH_KEY_STRING, svn_mergeinfo_dup(deleted,
+                                                              result_pool));
           apr_hash_set(*added_mergeinfo_catalog, hash_path,
-                       APR_HASH_KEY_STRING, svn_mergeinfo_dup(added, pool));
+                       APR_HASH_KEY_STRING, svn_mergeinfo_dup(added,
+                                                              result_pool));
         }
     }
-  /* ### UNNECESSARY ###: svn_pool_destroy(iterpool); */
-  svn_pool_destroy(subpool);
+
+  svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;
 }
 
@@ -742,18 +740,19 @@ get_combined_mergeinfo_changes(svn_merge
                                svn_fs_t *fs,
                                const apr_array_header_t *paths,
                                svn_revnum_t rev,
-                               apr_pool_t *pool)
+                               apr_pool_t *result_pool,
+                               apr_pool_t *scratch_pool)
 {
   svn_mergeinfo_catalog_t added_mergeinfo_catalog, deleted_mergeinfo_catalog;
   apr_hash_index_t *hi;
   svn_fs_root_t *root;
-  apr_pool_t *subpool, *iterpool;
+  apr_pool_t *iterpool;
   int i;
   svn_error_t *err;
 
   /* Initialize return value. */
-  *added_mergeinfo = apr_hash_make(pool);
-  *deleted_mergeinfo = apr_hash_make(pool);
+  *added_mergeinfo = apr_hash_make(result_pool);
+  *deleted_mergeinfo = apr_hash_make(result_pool);
 
   /* If we're asking about revision 0, there's no mergeinfo to be found. */
   if (rev == 0)
@@ -764,13 +763,12 @@ get_combined_mergeinfo_changes(svn_merge
     return SVN_NO_ERROR;
 
   /* Create a work subpool and get a root for REV. */
-  subpool = svn_pool_create(pool);
-  SVN_ERR(svn_fs_revision_root(&root, fs, rev, subpool));
+  SVN_ERR(svn_fs_revision_root(&root, fs, rev, scratch_pool));
 
   /* Fetch the mergeinfo changes for REV. */
   err = fs_mergeinfo_changed(&deleted_mergeinfo_catalog,
                              &added_mergeinfo_catalog,
-                             fs, rev, subpool);
+                             fs, rev, scratch_pool, scratch_pool);
   if (err)
     {
       if (err->apr_err == SVN_ERR_MERGEINFO_PARSE_ERROR)
@@ -779,7 +777,6 @@ get_combined_mergeinfo_changes(svn_merge
              best we can do is ignore it and act as if there were
              no mergeinfo modifications. */
           svn_error_clear(err);
-          svn_pool_destroy(subpool);
           return SVN_NO_ERROR;
         }
       else
@@ -791,7 +788,7 @@ get_combined_mergeinfo_changes(svn_merge
   /* Check our PATHS for any changes to their inherited mergeinfo.
      (We deal with changes to mergeinfo directly *on* the paths in the
      following loop.)  */
-  iterpool = svn_pool_create(subpool);
+  iterpool = svn_pool_create(scratch_pool);
   for (i = 0; i < paths->nelts; i++)
     {
       const char *path = APR_ARRAY_IDX(paths, i, const char *);
@@ -838,8 +835,9 @@ get_combined_mergeinfo_changes(svn_merge
       SVN_ERR(svn_fs_revision_root(&prev_root, fs, prev_rev, iterpool));
       query_paths = apr_array_make(iterpool, 1, sizeof(const char *));
       APR_ARRAY_PUSH(query_paths, const char *) = prev_path;
-      err = svn_fs_get_mergeinfo(&catalog, prev_root, query_paths,
-                                 svn_mergeinfo_inherited, FALSE, iterpool);
+      err = svn_fs_get_mergeinfo2(&catalog, prev_root, query_paths,
+                                  svn_mergeinfo_inherited, FALSE, FALSE,
+                                  iterpool);
       if (err && (err->apr_err == SVN_ERR_FS_NOT_FOUND ||
                   err->apr_err == SVN_ERR_FS_NOT_DIRECTORY ||
                   err->apr_err == SVN_ERR_MERGEINFO_PARSE_ERROR))
@@ -854,23 +852,26 @@ get_combined_mergeinfo_changes(svn_merge
       /* Fetch the current mergeinfo (as of REV, and including
          inherited stuff) for this path. */
       APR_ARRAY_IDX(query_paths, 0, const char *) = path;
-      SVN_ERR(svn_fs_get_mergeinfo(&catalog, root, query_paths,
-                                   svn_mergeinfo_inherited, FALSE, iterpool));
+      SVN_ERR(svn_fs_get_mergeinfo2(&catalog, root, query_paths,
+                                    svn_mergeinfo_inherited, FALSE, FALSE,
+                                    iterpool));
       mergeinfo = apr_hash_get(catalog, path, APR_HASH_KEY_STRING);
 
       /* Compare, constrast, and combine the results. */
       SVN_ERR(svn_mergeinfo_diff(&deleted, &added, prev_mergeinfo,
                                  mergeinfo, FALSE, iterpool));
       SVN_ERR(svn_mergeinfo_merge(*deleted_mergeinfo,
-                                  svn_mergeinfo_dup(deleted, pool), pool));
+                                  svn_mergeinfo_dup(deleted, result_pool),
+                                  result_pool));
       SVN_ERR(svn_mergeinfo_merge(*added_mergeinfo,
-                                  svn_mergeinfo_dup(added, pool), pool));
+                                  svn_mergeinfo_dup(added, result_pool),
+                                  result_pool));
      }
   svn_pool_destroy(iterpool);
 
   /* Merge all the mergeinfos which are, or are children of, one of
      our paths of interest into one giant delta mergeinfo.  */
-  for (hi = apr_hash_first(subpool, added_mergeinfo_catalog);
+  for (hi = apr_hash_first(scratch_pool, added_mergeinfo_catalog);
        hi; hi = apr_hash_next(hi))
     {
       const void *key;
@@ -891,16 +892,16 @@ get_combined_mergeinfo_changes(svn_merge
             continue;
           deleted = apr_hash_get(deleted_mergeinfo_catalog, key, klen);
           SVN_ERR(svn_mergeinfo_merge(*deleted_mergeinfo,
-                                      svn_mergeinfo_dup(deleted, pool),
-                                      pool));
+                                      svn_mergeinfo_dup(deleted, result_pool),
+                                      result_pool));
           SVN_ERR(svn_mergeinfo_merge(*added_mergeinfo,
-                                      svn_mergeinfo_dup(added, pool),
-                                      pool));
+                                      svn_mergeinfo_dup(added, result_pool),
+                                      result_pool));
 
           break;
         }
     }
-  svn_pool_clear(subpool);
+
   return SVN_NO_ERROR;
 }
 
@@ -1750,7 +1751,8 @@ do_logs(svn_fs_t *fs,
               SVN_ERR(get_combined_mergeinfo_changes(&added_mergeinfo,
                                                      &deleted_mergeinfo,
                                                      fs, cur_paths,
-                                                     current, iterpool));
+                                                     current, iterpool,
+                                                     iterpool));
               has_children = (apr_hash_count(added_mergeinfo) > 0
                               || apr_hash_count(deleted_mergeinfo) > 0);
             }

Modified: subversion/branches/svn-bisect/subversion/libsvn_repos/reporter.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_repos/reporter.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_repos/reporter.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_repos/reporter.c Wed Jul 20 13:06:00 2011
@@ -1331,9 +1331,12 @@ finish_report(report_baton_t *b, apr_poo
   {
     svn_error_t *err = drive(b, s_rev, info, pool);
     if (err == SVN_NO_ERROR)
-      return b->editor->close_edit(b->edit_baton, pool);
-    svn_error_clear(b->editor->abort_edit(b->edit_baton, pool));
-    return svn_error_trace(err);
+      return svn_error_trace(b->editor->close_edit(b->edit_baton, pool));
+
+    return svn_error_trace(
+                svn_error_compose_create(err,
+                                         b->editor->abort_edit(b->edit_baton,
+                                                               pool)));
   }
 }
 
@@ -1421,9 +1424,8 @@ svn_repos_finish_report(void *baton, apr
 
   finish_err = finish_report(b, pool);
   close_err = svn_io_file_close(b->tempfile, pool);
-  if (finish_err)
-    svn_error_clear(close_err);
-  return finish_err ? finish_err : close_err;
+
+  return svn_error_trace(svn_error_compose_create(finish_err, close_err));
 }
 
 svn_error_t *
@@ -1431,7 +1433,7 @@ svn_repos_abort_report(void *baton, apr_
 {
   report_baton_t *b = baton;
 
-  return svn_io_file_close(b->tempfile, pool);
+  return svn_error_trace(svn_io_file_close(b->tempfile, pool));
 }
 
 /* --- BEGINNING THE REPORT --- */

Modified: subversion/branches/svn-bisect/subversion/libsvn_repos/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_repos/repos.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_repos/repos.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_repos/repos.c Wed Jul 20 13:06:00 2011
@@ -477,7 +477,7 @@ PREWRITTEN_HOOKS_TEXT
 "# arguments:"                                                               NL
 "#"                                                                          NL
 "#   [1] REPOS-PATH   (the path to this repository)"                         NL
-"#   [2] REVISION     (the revision being tweaked)"                          NL
+"#   [2] REV          (the revision being tweaked)"                          NL
 "#   [3] USER         (the username of the person tweaking the property)"    NL
 "#   [4] PROPNAME     (the property being set on the revision)"              NL
 "#   [5] ACTION       (the property is being 'A'dded, 'M'odified, or 'D'eleted)"
@@ -1262,9 +1262,13 @@ svn_repos_create(svn_repos_t **repos_p,
       /* If there was an error making the filesytem, e.g. unknown/supported
        * filesystem type.  Clean up after ourselves.  Yes this is safe because
        * create_repos_structure will fail if the path existed before we started
-       * so we can't accidentally remove a directory that previously existed. */
-      svn_error_clear(svn_io_remove_dir2(path, FALSE, NULL, NULL, pool));
-      return svn_error_trace(err);
+       * so we can't accidentally remove a directory that previously existed.
+       */
+
+      return svn_error_trace(
+                   svn_error_compose_create(
+                        err,
+                        svn_io_remove_dir2(path, FALSE, NULL, NULL, pool)));
     }
 
   /* This repository is ready.  Stamp it with a format number. */

Modified: subversion/branches/svn-bisect/subversion/libsvn_repos/rev_hunt.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_repos/rev_hunt.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_repos/rev_hunt.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_repos/rev_hunt.c Wed Jul 20 13:06:00 2011
@@ -997,8 +997,9 @@ get_path_mergeinfo(apr_hash_t **mergeinf
   /* We do not need to call svn_repos_fs_get_mergeinfo() (which performs authz)
      because we will filter out unreadable revisions in
      find_interesting_revision(), above */
-  SVN_ERR(svn_fs_get_mergeinfo(&tmp_catalog, root, paths,
-                               svn_mergeinfo_inherited, FALSE, subpool));
+  SVN_ERR(svn_fs_get_mergeinfo2(&tmp_catalog, root, paths,
+                                svn_mergeinfo_inherited, FALSE, FALSE,
+                                subpool));
 
   *mergeinfo = apr_hash_get(tmp_catalog, path, APR_HASH_KEY_STRING);
   if (*mergeinfo)

Propchange: subversion/branches/svn-bisect/subversion/libsvn_subr/adler32.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 20 13:06:00 2011
@@ -1,3 +1,5 @@
 /subversion/branches/diff-optimizations/subversion/libsvn_subr/adler32.c:1031270-1037352
 /subversion/branches/diff-optimizations-bytes/subversion/libsvn_subr/adler32.c:1037353-1067789
 /subversion/branches/performance/subversion/libsvn_subr/adler32.c:1067697-1078365
+/subversion/branches/revprop-packing/subversion/libsvn_subr/adler32.c:1143907,1143971,1144017,1144568,1146145
+/subversion/trunk/subversion/libsvn_subr/adler32.c:1140046-1148712

Modified: subversion/branches/svn-bisect/subversion/libsvn_subr/cache-membuffer.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_subr/cache-membuffer.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_subr/cache-membuffer.c Wed Jul 20 13:06:00 2011
@@ -194,25 +194,25 @@ static void get_prefix_tail(const char *
 
 /* Initialize all members of TAG except for the content hash.
  */
-static svn_error_t* store_key_part(entry_tag_t *tag,
+static svn_error_t *store_key_part(entry_tag_t *tag,
                                    unsigned char *prefix_hash,
                                    char *prefix_tail,
                                    const void *key,
-                                   apr_size_t size,
+                                   apr_size_t key_len,
                                    apr_pool_t *pool)
 {
   svn_checksum_t *checksum;
   SVN_ERR(svn_checksum(&checksum,
                        svn_checksum_md5,
                        key,
-                       size,
+                       key_len,
                        pool));
 
   memcpy(tag->prefix_hash, prefix_hash, sizeof(tag->prefix_hash));
   memcpy(tag->key_hash, checksum->digest, sizeof(tag->key_hash));
   memcpy(tag->prefix_tail, prefix_tail, sizeof(tag->prefix_tail));
 
-  tag->key_len = size;
+  tag->key_len = key_len;
 
   return SVN_NO_ERROR;
 }
@@ -283,10 +283,10 @@ static svn_error_t* assert_equal_tags(co
 
 #endif /* SVN_DEBUG_CACHE_MEMBUFFER */
 
-/* A single dictionary entry. Since all entries will be allocated once 
- * during cache creation, those entries might be either used or unused. 
- * An entry is used if and only if it is contained in the doubly-linked 
- * list of used entries. An entry is unused if and only if its OFFSET 
+/* A single dictionary entry. Since all entries will be allocated once
+ * during cache creation, those entries might be either used or unused.
+ * An entry is used if and only if it is contained in the doubly-linked
+ * list of used entries. An entry is unused if and only if its OFFSET
  * member is NO_OFFSET.
  */
 typedef struct entry_t
@@ -396,7 +396,7 @@ struct svn_membuffer_t
 
 
   /* Number of used dictionary entries, i.e. number of cached items.
-   * In conjunction with hit_cout, this is used calculate the average
+   * In conjunction with hit_count, this is used calculate the average
    * hit count as part of the randomized LFU algorithm.
    */
   apr_uint32_t used_entries;

Modified: subversion/branches/svn-bisect/subversion/libsvn_subr/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_subr/deprecated.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_subr/deprecated.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_subr/deprecated.c Wed Jul 20 13:06:00 2011
@@ -129,7 +129,7 @@ svn_subst_translate_stream3(svn_stream_t
                                            keywords, expand, pool);
 
   return svn_error_trace(svn_stream_copy3(src_stream, dst_stream,
-                                           NULL, NULL, pool));
+                                          NULL, NULL, pool));
 }
 
 svn_error_t *
@@ -144,7 +144,7 @@ svn_subst_translate_stream2(svn_stream_t
   apr_hash_t *kh = kwstruct_to_kwhash(keywords, pool);
 
   return svn_error_trace(svn_subst_translate_stream3(s, d, eol_str, repair,
-                                                      kh, expand, pool));
+                                                     kh, expand, pool));
 }
 
 svn_error_t *
@@ -174,8 +174,8 @@ svn_subst_translate_cstring(const char *
   apr_hash_t *kh = kwstruct_to_kwhash(keywords, pool);
 
   return svn_error_trace(svn_subst_translate_cstring2(src, dst, eol_str,
-                                                       repair, kh, expand,
-                                                       pool));
+                                                      repair, kh, expand,
+                                                      pool));
 }
 
 svn_error_t *
@@ -188,8 +188,8 @@ svn_subst_copy_and_translate(const char 
                              apr_pool_t *pool)
 {
   return svn_error_trace(svn_subst_copy_and_translate2(src, dst, eol_str,
-                                                        repair, keywords,
-                                                        expand, FALSE, pool));
+                                                       repair, keywords,
+                                                       expand, FALSE, pool));
 }
 
 svn_error_t *
@@ -205,8 +205,8 @@ svn_subst_copy_and_translate2(const char
   apr_hash_t *kh = kwstruct_to_kwhash(keywords, pool);
 
   return svn_error_trace(svn_subst_copy_and_translate3(src, dst, eol_str,
-                                                        repair, kh, expand,
-                                                        special, pool));
+                                                       repair, kh, expand,
+                                                       special, pool));
 }
 
 svn_error_t *
@@ -220,10 +220,10 @@ svn_subst_copy_and_translate3(const char
                               apr_pool_t *pool)
 {
   return svn_error_trace(svn_subst_copy_and_translate4(src, dst, eol_str,
-                                                        repair, keywords,
-                                                        expand, special,
-                                                        NULL, NULL,
-                                                        pool));
+                                                       repair, keywords,
+                                                       expand, special,
+                                                       NULL, NULL,
+                                                       pool));
 }
 
 
@@ -280,10 +280,10 @@ svn_subst_stream_detranslated(svn_stream
   SVN_ERR(svn_stream_open_readonly(&src_stream, src, pool, pool));
 
   return svn_error_trace(svn_subst_stream_translated_to_normal_form(
-                            stream_p, src_stream,
-                            eol_style, eol_str,
-                            always_repair_eols,
-                            keywords, pool));
+                           stream_p, src_stream,
+                           eol_style, eol_str,
+                           always_repair_eols,
+                           keywords, pool));
 }
 
 svn_error_t *
@@ -304,13 +304,13 @@ svn_subst_translate_to_normal_form(const
     return svn_error_create(SVN_ERR_IO_UNKNOWN_EOL, NULL, NULL);
 
   return svn_error_trace(svn_subst_copy_and_translate3(
-                            src, dst, eol_str,
-                            eol_style == svn_subst_eol_style_fixed
-                              || always_repair_eols,
-                            keywords,
-                            FALSE /* contract keywords */,
-                            special,
-                            pool));
+                           src, dst, eol_str,
+                           eol_style == svn_subst_eol_style_fixed
+                             || always_repair_eols,
+                           keywords,
+                           FALSE /* contract keywords */,
+                           special,
+                           pool));
 }
 
 
@@ -454,7 +454,7 @@ svn_opt_args_to_target_array3(apr_array_
                               apr_pool_t *pool)
 {
   return svn_error_trace(svn_opt__args_to_target_array(targets_p, os,
-                                                        known_targets, pool));
+                                                       known_targets, pool));
 }
 
 svn_error_t *
@@ -535,16 +535,16 @@ svn_opt_print_help2(apr_getopt_t *os,
                     apr_pool_t *pool)
 {
   return svn_error_trace(svn_opt_print_help3(os,
-                                              pgm_name,
-                                              print_version,
-                                              quiet,
-                                              version_footer,
-                                              header,
-                                              cmd_table,
-                                              option_table,
-                                              NULL,
-                                              footer,
-                                              pool));
+                                             pgm_name,
+                                             print_version,
+                                             quiet,
+                                             version_footer,
+                                             header,
+                                             cmd_table,
+                                             option_table,
+                                             NULL,
+                                             footer,
+                                             pool));
 }
 
 svn_error_t *
@@ -643,9 +643,9 @@ svn_io_open_unique_file2(apr_file_t **fi
 
   svn_path_split(path, &dirpath, &filename, pool);
   return svn_error_trace(svn_io_open_uniquely_named(file, temp_path,
-                                                     dirpath, filename, suffix,
-                                                     delete_when,
-                                                     pool, pool));
+                                                    dirpath, filename, suffix,
+                                                    delete_when,
+                                                    pool, pool));
 }
 
 svn_error_t *
@@ -657,11 +657,11 @@ svn_io_open_unique_file(apr_file_t **fil
                         apr_pool_t *pool)
 {
   return svn_error_trace(svn_io_open_unique_file2(file, temp_path,
-                                                   path, suffix,
-                                                   delete_on_close
-                                                     ? svn_io_file_del_on_close
-                                                     : svn_io_file_del_none,
-                                                   pool));
+                                                  path, suffix,
+                                                  delete_on_close
+                                                    ? svn_io_file_del_on_close
+                                                    : svn_io_file_del_none,
+                                                  pool));
 }
 
 svn_error_t *
@@ -681,10 +681,10 @@ svn_io_run_diff(const char *dir,
   SVN_ERR(svn_path_cstring_to_utf8(&diff_cmd, diff_cmd, pool));
 
   return svn_error_trace(svn_io_run_diff2(dir, user_args, num_user_args,
-                                           label1, label2,
-                                           from, to, pexitcode,
-                                           outfile, errfile, diff_cmd,
-                                           pool));
+                                          label1, label2,
+                                          from, to, pexitcode,
+                                          outfile, errfile, diff_cmd,
+                                          pool));
 }
 
 svn_error_t *
@@ -704,10 +704,10 @@ svn_io_run_diff3_2(int *exitcode,
   SVN_ERR(svn_path_cstring_to_utf8(&diff3_cmd, diff3_cmd, pool));
 
   return svn_error_trace(svn_io_run_diff3_3(exitcode, dir,
-                                             mine, older, yours,
-                                             mine_label, older_label,
-                                             yours_label, merged,
-                                             diff3_cmd, user_args, pool));
+                                            mine, older, yours,
+                                            mine_label, older_label,
+                                            yours_label, merged,
+                                            diff3_cmd, user_args, pool));
 }
 
 svn_error_t *
@@ -724,9 +724,9 @@ svn_io_run_diff3(const char *dir,
                  apr_pool_t *pool)
 {
   return svn_error_trace(svn_io_run_diff3_2(exitcode, dir, mine, older, yours,
-                                             mine_label, older_label,
-                                             yours_label,
-                                             merged, diff3_cmd, NULL, pool));
+                                            mine_label, older_label,
+                                            yours_label,
+                                            merged, diff3_cmd, NULL, pool));
 }
 
 svn_error_t *
@@ -821,8 +821,8 @@ svn_io_dir_walk(const char *dirname,
   baton.walk_func = walk_func;
   baton.walk_baton = walk_baton;
   return svn_error_trace(svn_io_dir_walk2(dirname, wanted,
-                                           walk_func_filter_func,
-                                           &baton, pool));
+                                          walk_func_filter_func,
+                                          &baton, pool));
 }
 
 /*** From constructors.c ***/
@@ -849,7 +849,7 @@ svn_cmdline_prompt_user(const char **res
                         apr_pool_t *pool)
 {
   return svn_error_trace(svn_cmdline_prompt_user2(result, prompt_str, NULL,
-                                                   pool));
+                                                  pool));
 }
 
 svn_error_t *
@@ -865,10 +865,10 @@ svn_cmdline_setup_auth_baton(svn_auth_ba
                              apr_pool_t *pool)
 {
   return svn_error_trace(svn_cmdline_create_auth_baton(
-                            ab, non_interactive,
-                            auth_username, auth_password,
-                            config_dir, no_auth_cache, FALSE,
-                            cfg, cancel_func, cancel_baton, pool));
+                           ab, non_interactive,
+                           auth_username, auth_password,
+                           config_dir, no_auth_cache, FALSE,
+                           cfg, cancel_func, cancel_baton, pool));
 }
 
 /*** From dso.c ***/
@@ -973,18 +973,18 @@ svn_error_t *svn_stream_copy2(svn_stream
                               apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_stream_copy3(
-                            svn_stream_disown(from, scratch_pool),
-                            svn_stream_disown(to, scratch_pool),
-                            cancel_func, cancel_baton, scratch_pool));
+                           svn_stream_disown(from, scratch_pool),
+                           svn_stream_disown(to, scratch_pool),
+                           cancel_func, cancel_baton, scratch_pool));
 }
 
 svn_error_t *svn_stream_copy(svn_stream_t *from, svn_stream_t *to,
                              apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_stream_copy3(
-                            svn_stream_disown(from, scratch_pool),
-                            svn_stream_disown(to, scratch_pool),
-                            NULL, NULL, scratch_pool));
+                           svn_stream_disown(from, scratch_pool),
+                           svn_stream_disown(to, scratch_pool),
+                           NULL, NULL, scratch_pool));
 }
 
 svn_stream_t *
@@ -1000,10 +1000,10 @@ svn_stream_contents_same(svn_boolean_t *
                          apr_pool_t *pool)
 {
   return svn_error_trace(svn_stream_contents_same2(
-                            same,
-                            svn_stream_disown(stream1, pool),
-                            svn_stream_disown(stream2, pool),
-                            pool));
+                           same,
+                           svn_stream_disown(stream1, pool),
+                           svn_stream_disown(stream2, pool),
+                           pool));
 }
 
 /*** From path.c ***/
@@ -1056,8 +1056,8 @@ svn_mergeinfo_inheritable(svn_mergeinfo_
                           apr_pool_t *pool)
 {
   return svn_error_trace(svn_mergeinfo_inheritable2(output, mergeinfo, path,
-                                                     start, end,
-                                                     TRUE, pool, pool));
+                                                    start, end,
+                                                    TRUE, pool, pool));
 }
 
 svn_error_t *
@@ -1068,9 +1068,9 @@ svn_rangelist_inheritable(apr_array_head
                           apr_pool_t *pool)
 {
   return svn_error_trace(svn_rangelist_inheritable2(inheritable_rangelist,
-                                                     rangelist,
-                                                     start, end, TRUE,
-                                                     pool, pool));
+                                                    rangelist,
+                                                    start, end, TRUE,
+                                                    pool, pool));
 }
 
 /*** From config.c ***/
@@ -1081,9 +1081,9 @@ svn_config_read(svn_config_t **cfgp, con
                 apr_pool_t *pool)
 {
   return svn_error_trace(svn_config_read2(cfgp, file,
-                                           must_exist,
-                                           FALSE,
-                                           pool));
+                                          must_exist,
+                                          FALSE,
+                                          pool));
 }
 
 #ifdef SVN_DISABLE_FULL_VERSION_MATCH

Modified: subversion/branches/svn-bisect/subversion/libsvn_subr/dso.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_subr/dso.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_subr/dso.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_subr/dso.c Wed Jul 20 13:06:00 2011
@@ -105,7 +105,7 @@ svn_dso_load(apr_dso_handle_t **dso, con
       status = apr_dso_load(dso, fname, dso_pool);
       if (status)
         {
-#ifdef SVN_DEBUG
+#if 0
           char buf[1024];
           fprintf(stderr, "%s\n", apr_dso_error(*dso, buf, 1024));
 #endif

Modified: subversion/branches/svn-bisect/subversion/libsvn_subr/hash.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_subr/hash.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_subr/hash.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_subr/hash.c Wed Jul 20 13:06:00 2011
@@ -25,10 +25,12 @@
 
 #include <stdlib.h>
 #include <limits.h>
+
 #include <apr_version.h>
 #include <apr_pools.h>
 #include <apr_hash.h>
 #include <apr_file_io.h>
+
 #include "svn_types.h"
 #include "svn_string.h"
 #include "svn_error.h"
@@ -36,8 +38,12 @@
 #include "svn_sorts.h"
 #include "svn_io.h"
 #include "svn_pools.h"
+
 #include "private/svn_dep_compat.h"
 
+#include "svn_private_config.h"
+
+
 
 
 /*
@@ -106,14 +112,16 @@ hash_read(apr_hash_t *hash, svn_stream_t
 
       /* Check for unexpected end of stream */
       if (eof)
-        return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
+        return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
+                                _("Serialized hash missing terminator"));
 
       if ((buf->len >= 3) && (buf->data[0] == 'K') && (buf->data[1] == ' '))
         {
           /* Get the length of the key */
           keylen = (size_t) strtoul(buf->data + 2, &end, 10);
           if (keylen == (size_t) ULONG_MAX || *end != '\0')
-            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
+            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
+                                    _("Serialized hash malformed"));
 
           /* Now read that much into a buffer. */
           keybuf = apr_palloc(pool, keylen + 1);
@@ -124,7 +132,8 @@ hash_read(apr_hash_t *hash, svn_stream_t
           len = 1;
           SVN_ERR(svn_stream_read(stream, &c, &len));
           if (c != '\n')
-            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
+            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
+                                    _("Serialized hash malformed"));
 
           /* Read a val length line */
           SVN_ERR(svn_stream_readline(stream, &buf, "\n", &eof, iterpool));
@@ -133,7 +142,8 @@ hash_read(apr_hash_t *hash, svn_stream_t
             {
               vallen = (size_t) strtoul(buf->data + 2, &end, 10);
               if (vallen == (size_t) ULONG_MAX || *end != '\0')
-                return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
+                return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
+                                        _("Serialized hash malformed"));
 
               valbuf = apr_palloc(iterpool, vallen + 1);
               SVN_ERR(svn_stream_read(stream, valbuf, &vallen));
@@ -143,14 +153,16 @@ hash_read(apr_hash_t *hash, svn_stream_t
               len = 1;
               SVN_ERR(svn_stream_read(stream, &c, &len));
               if (c != '\n')
-                return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
+                return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
+                                        _("Serialized hash malformed"));
 
               /* Add a new hash entry. */
               apr_hash_set(hash, keybuf, keylen,
                            svn_string_ncreate(valbuf, vallen, pool));
             }
           else
-            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
+            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
+                                    _("Serialized hash malformed"));
         }
       else if (incremental && (buf->len >= 3)
                && (buf->data[0] == 'D') && (buf->data[1] == ' '))
@@ -158,7 +170,8 @@ hash_read(apr_hash_t *hash, svn_stream_t
           /* Get the length of the key */
           keylen = (size_t) strtoul(buf->data + 2, &end, 10);
           if (keylen == (size_t) ULONG_MAX || *end != '\0')
-            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
+            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
+                                    _("Serialized hash malformed"));
 
           /* Now read that much into a buffer. */
           keybuf = apr_palloc(iterpool, keylen + 1);
@@ -169,14 +182,16 @@ hash_read(apr_hash_t *hash, svn_stream_t
           len = 1;
           SVN_ERR(svn_stream_read(stream, &c, &len));
           if (c != '\n')
-            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
+            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
+                                    _("Serialized hash malformed"));
 
           /* Remove this hash entry. */
           apr_hash_set(hash, keybuf, keylen, NULL);
         }
       else
         {
-          return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
+          return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
+                                  _("Serialized hash malformed"));
         }
     }
 

Propchange: subversion/branches/svn-bisect/subversion/libsvn_subr/hash.c
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Wed Jul 20 13:06:00 2011
@@ -0,0 +1,56 @@
+/subversion/branches/1.5.x-r30215/subversion/libsvn_subr/hash.c:870312
+/subversion/branches/atomic-revprop/subversion/libsvn_subr/hash.c:965046-1000689
+/subversion/branches/bdb-reverse-deltas/subversion/libsvn_subr/hash.c:872050-872529
+/subversion/branches/diff-callbacks3/subversion/libsvn_subr/hash.c:870059-870761
+/subversion/branches/diff-optimizations/subversion/libsvn_subr/hash.c:1031270-1037352
+/subversion/branches/diff-optimizations-bytes/subversion/libsvn_subr/hash.c:1037353-1067789
+/subversion/branches/dont-save-plaintext-passwords-by-default/subversion/libsvn_subr/hash.c:870728-871118
+/subversion/branches/double-delete/subversion/libsvn_subr/hash.c:870511-872970
+/subversion/branches/explore-wc/subversion/libsvn_subr/hash.c:875486,875493,875497,875507,875511,875514,875559,875580-875581,875584,875587,875611,875627,875647,875667-875668,875711-875712,875733-875734,875736,875744-875748,875751,875758,875782,875795-875796,875830,875836,875838,875842,875852,875855,875864,875870,875873,875880,875885-875888,875890,875897-875898,875905,875907-875909,875935,875943-875944,875946,875979,875982-875983,875985-875986,875990,875997
+/subversion/branches/file-externals/subversion/libsvn_subr/hash.c:871779-873302
+/subversion/branches/fs-rep-sharing/subversion/libsvn_subr/hash.c:869036-873803
+/subversion/branches/fsfs-pack/subversion/libsvn_subr/hash.c:873717-874575
+/subversion/branches/gnome-keyring/subversion/libsvn_subr/hash.c:870558-871410
+/subversion/branches/http-protocol-v2/subversion/libsvn_subr/hash.c:874395-876041
+/subversion/branches/in-memory-cache/subversion/libsvn_subr/hash.c:869829-871452
+/subversion/branches/integrate-cache-item-serialization/subversion/libsvn_subr/hash.c:1068724-1068739
+/subversion/branches/integrate-cache-membuffer/subversion/libsvn_subr/hash.c:998649-998852
+/subversion/branches/integrate-compression-level/subversion/libsvn_subr/hash.c:1068651-1072287
+/subversion/branches/integrate-io-improvements/subversion/libsvn_subr/hash.c:1068684-1072297
+/subversion/branches/integrate-is-cachable/subversion/libsvn_subr/hash.c:1072568-1074082
+/subversion/branches/integrate-partial-getter/subversion/libsvn_subr/hash.c:1072558-1076552
+/subversion/branches/integrate-readline-speedup/subversion/libsvn_subr/hash.c:1072553-1072555
+/subversion/branches/integrate-stream-api-extensions/subversion/libsvn_subr/hash.c:1068695-1072516
+/subversion/branches/integrate-txdelta-caching/subversion/libsvn_subr/hash.c:1072541-1078213
+/subversion/branches/issue-2779-dev/subversion/libsvn_subr/hash.c:965496-984198
+/subversion/branches/issue-2843-dev/subversion/libsvn_subr/hash.c:871432-874179
+/subversion/branches/issue-3000/subversion/libsvn_subr/hash.c:871713,871716-871719,871721-871726,871728,871734
+/subversion/branches/issue-3067-deleted-subtrees/subversion/libsvn_subr/hash.c:873375-874084
+/subversion/branches/issue-3148-dev/subversion/libsvn_subr/hash.c:875193-875204
+/subversion/branches/issue-3220-dev/subversion/libsvn_subr/hash.c:872210-872226
+/subversion/branches/issue-3242-dev/subversion/libsvn_subr/hash.c:879653-896436
+/subversion/branches/issue-3334-dirs/subversion/libsvn_subr/hash.c:875156-875867
+/subversion/branches/issue-3668-3669/subversion/libsvn_subr/hash.c:1031000-1035744
+/subversion/branches/kwallet/subversion/libsvn_subr/hash.c:870785-871314
+/subversion/branches/log-g-performance/subversion/libsvn_subr/hash.c:870941-871032
+/subversion/branches/merge-skips-obstructions/subversion/libsvn_subr/hash.c:874525-874615
+/subversion/branches/nfc-nfd-aware-client/subversion/libsvn_subr/hash.c:870276,870376
+/subversion/branches/performance/subversion/libsvn_subr/hash.c:979193,980118,981087,981090,981189,981194,981287,981684,981827,982043,982355,983398,983406,983430,983474,983488,983490,983760,983764,983766,983770,984927,984973,984984,985014,985037,985046,985472,985477,985482,985487-985488,985493,985497,985500,985514,985601,985603,985606,985669,985695,986453,986465,986485,986491-986492,986517,986521,986605,986608,986817,986832,987865,987868-987869,987872,987886-987888,987893,988319,988898,990330,990533,990535-990537,990541,990568,990572,990574-990575,990600,990759,992899,992904,992911,993127,993141,994956,995478,995507,995603,998012,998858,999098,1001413,1001417,1004291,1022668,1022670,1022676,1022715,1022719,1025660,1025672,1027193,1027203,1027206,1027214,1027227,1028077,1028092,1028094,1028104,1028107,1028111,1028354,1029038,1029042-1029043,1029054-1029055,1029062-1029063,1029078,1029080,1029090,1029092-1029093,1029111,1029151,1029158,1029229-1029230,1029232,1029335-1029336,10
 29339-1029340,1029342,1029344,1030763,1030827,1031203,1031235,1032285,1032333,1033040,1033057,1033294,1035869,1035882,1039511,1043705,1053735,1056015,1066452,1067683,1067697-1078365
+/subversion/branches/py-tests-as-modules/subversion/libsvn_subr/hash.c:956579-1033052
+/subversion/branches/ra_serf-digest-authn/subversion/libsvn_subr/hash.c:875693-876404
+/subversion/branches/reintegrate-improvements/subversion/libsvn_subr/hash.c:873853-874164
+/subversion/branches/revprop-packing/subversion/libsvn_subr/hash.c:1143907,1143971,1143997,1144017,1144499,1144565,1144568,1146145
+/subversion/branches/subtree-mergeinfo/subversion/libsvn_subr/hash.c:876734-878766
+/subversion/branches/svn-mergeinfo-enhancements/subversion/libsvn_subr/hash.c:870119-870195,870197-870288
+/subversion/branches/svn-patch-improvements/subversion/libsvn_subr/hash.c:918519-934609
+/subversion/branches/svnpatch-diff/subversion/libsvn_subr/hash.c:865738-876477
+/subversion/branches/svnraisetc/subversion/libsvn_subr/hash.c:874709-875149
+/subversion/branches/svnserve-logging/subversion/libsvn_subr/hash.c:869828-870893
+/subversion/branches/tc-issue-3334/subversion/libsvn_subr/hash.c:874697-874773
+/subversion/branches/tc-merge-notify/subversion/libsvn_subr/hash.c:874017-874062
+/subversion/branches/tc-resolve/subversion/libsvn_subr/hash.c:874191-874239
+/subversion/branches/tc_url_rev/subversion/libsvn_subr/hash.c:874351-874483
+/subversion/branches/tree-conflicts/subversion/libsvn_subr/hash.c:868291-873154
+/subversion/branches/tree-conflicts-notify/subversion/libsvn_subr/hash.c:873926-874008
+/subversion/branches/uris-as-urls/subversion/libsvn_subr/hash.c:1060426-1064427
+/subversion/trunk/subversion/libsvn_subr/hash.c:1140046-1148712

Modified: subversion/branches/svn-bisect/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_subr/io.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_subr/io.c Wed Jul 20 13:06:00 2011
@@ -2252,7 +2252,7 @@ svn_io_get_dir_filenames(apr_hash_t **di
                          apr_pool_t *pool)
 {
   return svn_error_trace(svn_io_get_dirents3(dirents, path, TRUE,
-                                              pool, pool));
+                                             pool, pool));
 }
 
 svn_io_dirent2_t *
@@ -4014,8 +4014,8 @@ temp_file_create(apr_file_t **new_file,
 
   /* Translate the returned path back to utf-8 before returning it */
   return svn_error_trace(svn_path_cstring_to_utf8(new_file_name,
-                                                   templ_apr,
-                                                   result_pool));
+                                                  templ_apr,
+                                                  result_pool));
 #else
   /* The Windows implementation of apr_file_mktemp doesn't handle access
      denied errors correctly. Therefore we implement our own temp file

Modified: subversion/branches/svn-bisect/subversion/libsvn_subr/magic.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_subr/magic.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_subr/magic.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_subr/magic.c Wed Jul 20 13:06:00 2011
@@ -122,35 +122,35 @@ svn_magic__detect_binary_mimetype(const 
           if (strncmp(magic_mimetype, "text/", 5) == 0)
             magic_mimetype = NULL;
           else
-           {
-             svn_error_t *err;
+            {
+              svn_error_t *err;
 #ifndef MAGIC_MIME_TYPE
-             char *p;
+              char *p;
 
-             /* Strip off trailing stuff like " charset=ascii". */
-             p = strchr(magic_mimetype, ' ');
-             if (p)
-              *p = '\0';
+              /* Strip off trailing stuff like " charset=ascii". */
+              p = strchr(magic_mimetype, ' ');
+              if (p)
+                *p = '\0';
 #endif
-            /* Make sure we got a valid mime type. */
-            err = svn_mime_type_validate(magic_mimetype, scratch_pool);
-            if (err)
-              {
-                if (err->apr_err == SVN_ERR_BAD_MIME_TYPE)
-                  {
-                    svn_error_clear(err);
-                    magic_mimetype = NULL;
-                  }
-                else
-                  return svn_error_trace(err);
-              }
-            else
-              {
-                /* The string is allocated from memory managed by libmagic
-                 * so we must copy it to the result pool. */
-                magic_mimetype = apr_pstrdup(result_pool, magic_mimetype);
-              }
-           }
+              /* Make sure we got a valid mime type. */
+              err = svn_mime_type_validate(magic_mimetype, scratch_pool);
+              if (err)
+                {
+                  if (err->apr_err == SVN_ERR_BAD_MIME_TYPE)
+                    {
+                      svn_error_clear(err);
+                      magic_mimetype = NULL;
+                    }
+                  else
+                    return svn_error_trace(err);
+                }
+              else
+                {
+                  /* The string is allocated from memory managed by libmagic
+                   * so we must copy it to the result pool. */
+                  magic_mimetype = apr_pstrdup(result_pool, magic_mimetype);
+                }
+            }
         }
     }
 #endif

Modified: subversion/branches/svn-bisect/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_subr/mergeinfo.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_subr/mergeinfo.c Wed Jul 20 13:06:00 2011
@@ -371,7 +371,6 @@ combine_with_lastrange(const svn_merge_r
                       svn_merge_range_t *r2 = svn_merge_range_dup(new_range,
                                                                   result_pool);
                       svn_merge_range_t *r3 = NULL;
-                      svn_revnum_t tmp_revnum;
 
                       /* Pop off *LASTRANGE to make our manipulations
                          easier. */
@@ -395,6 +394,8 @@ combine_with_lastrange(const svn_merge_r
                         }
                       else if (r1->start == r2->start)
                         {
+                          svn_revnum_t tmp_revnum;
+
                           /* *LASTRANGE and NEW_RANGE share an end point. */
                           tmp_revnum = r1->end;
                           r1->end = r2->end;

Modified: subversion/branches/svn-bisect/subversion/libsvn_subr/simple_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_subr/simple_providers.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_subr/simple_providers.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_subr/simple_providers.c Wed Jul 20 13:06:00 2011
@@ -161,7 +161,6 @@ svn_auth__simple_first_creds_helper(void
   apr_hash_t *creds_hash = NULL;
   svn_error_t *err;
   svn_string_t *str;
-  svn_boolean_t have_passtype = FALSE;
 
   /* Try to load credentials from a file on disk, based on the
      realmstring.  Don't throw an error, though: if something went
@@ -178,6 +177,8 @@ svn_auth__simple_first_creds_helper(void
   else if (creds_hash)
     {
       /* We have something in the auth cache for this realm. */
+      svn_boolean_t have_passtype = FALSE;
+
       /* The password type in the auth data must match the
          mangler's type, otherwise the password must be
          interpreted by another provider. */

Modified: subversion/branches/svn-bisect/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_subr/sqlite.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_subr/sqlite.c Wed Jul 20 13:06:00 2011
@@ -423,9 +423,9 @@ svn_sqlite__bind_properties(svn_sqlite__
                                      scratch_pool));
   properties = svn_skel__unparse(skel, scratch_pool);
   return svn_error_trace(svn_sqlite__bind_blob(stmt,
-                                                slot,
-                                                properties->data,
-                                                properties->len));
+                                               slot,
+                                               properties->data,
+                                               properties->len));
 }
 
 svn_error_t *
@@ -723,7 +723,7 @@ check_format(svn_sqlite__db_t *db,
       ub.upgrade_sql = upgrade_sql;
 
       return svn_error_trace(svn_sqlite__with_transaction(
-                                db, upgrade_format, &ub, scratch_pool));
+                               db, upgrade_format, &ub, scratch_pool));
     }
 
   return svn_error_createf(SVN_ERR_SQLITE_UNSUPPORTED_SCHEMA, NULL,
@@ -914,14 +914,26 @@ svn_sqlite__open(svn_sqlite__db_t **db, 
   sqlite3_profile((*db)->db3, sqlite_profiler, (*db)->db3);
 #endif
 
-#if SQLITE_VERSION_AT_LEAST(3,7,7) \
-    && !SQLITE_VERSION_AT_LEAST(3,7,8) \
-    && defined(SQLITE_SCHEMA)
-  /* See message <BA...@mail.gmail.com> on dev@ */
-  SVN_ERR(exec_sql2(*db, "PRAGMA case_sensitive_like=1;", SQLITE_SCHEMA));
-#else
-  SVN_ERR(exec_sql2(*db, "PRAGMA case_sensitive_like=1;", SQLITE_OK));
-#endif /* 3.7.7 && SQLITE_SCHEMA */
+  /* Work around a bug in SQLite 3.7.7.  The bug was fixed in SQLite 3.7.7.1.
+
+     See:
+
+       Date: Sun, 26 Jun 2011 18:52:14 -0400
+       From: Richard Hipp <dr...@sqlite.org>
+       To: General Discussion of SQLite Database <sq...@sqlite.org>
+       Cc: dev@subversion.apache.org
+       Subject: Re: [sqlite] PRAGMA bug in 3.7.7 (but fine in 3.7.6.3)
+       Message-ID: <BA...@mail.gmail.com>
+   */
+  {
+    int ignored_err = SQLITE_OK;
+#if !SQLITE_VERSION_AT_LEAST(3,7,8) && defined(SQLITE_SCHEMA)
+    if (!strcmp(sqlite3_libversion(), "3.7.7"))
+      ignored_err = SQLITE_SCHEMA;
+#endif
+
+    SVN_ERR(exec_sql2(*db, "PRAGMA case_sensitive_like=1;", ignored_err));
+  }
 
   SVN_ERR(exec_sql(*db,
               /* Disable synchronization to disable the explicit disk flushes
@@ -1072,7 +1084,7 @@ svn_sqlite__with_transaction(svn_sqlite_
 {
   SVN_ERR(exec_sql(db, "BEGIN TRANSACTION;"));
   return svn_error_trace(with_transaction(db, cb_func, cb_baton,
-                                           scratch_pool));
+                                          scratch_pool));
 }
 
 svn_error_t *
@@ -1084,7 +1096,7 @@ svn_sqlite__with_immediate_transaction(
 {
   SVN_ERR(exec_sql(db, "BEGIN IMMEDIATE TRANSACTION;"));
   return svn_error_trace(with_transaction(db, cb_func, cb_baton,
-                                           scratch_pool));
+                                          scratch_pool));
 }
 
 svn_error_t *

Modified: subversion/branches/svn-bisect/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_subr/stream.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_subr/stream.c Wed Jul 20 13:06:00 2011
@@ -462,7 +462,7 @@ svn_stream_readline(svn_stream_t *stream
                     apr_pool_t *pool)
 {
   return svn_error_trace(stream_readline(stringbuf, eof, eol, stream,
-                                          pool));
+                                         pool));
 }
 
 svn_error_t *svn_stream_copy3(svn_stream_t *from, svn_stream_t *to,

Modified: subversion/branches/svn-bisect/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_subr/subst.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_subr/subst.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_subr/subst.c Wed Jul 20 13:06:00 2011
@@ -1701,14 +1701,14 @@ svn_subst_copy_and_translate4(const char
             }
 
           return svn_error_trace(create_special_file_from_stream(src_stream,
-                                                                  dst, pool));
+                                                                 dst, pool));
         }
       /* else !expand */
 
       return svn_error_trace(detranslate_special_file(src, dst,
-                                                       cancel_func,
-                                                       cancel_baton,
-                                                       pool));
+                                                      cancel_func,
+                                                      cancel_baton,
+                                                      pool));
     }
 
   /* The easy way out:  no translation needed, just copy. */

Modified: subversion/branches/svn-bisect/subversion/libsvn_subr/svn_base64.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_subr/svn_base64.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_subr/svn_base64.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_subr/svn_base64.c Wed Jul 20 13:06:00 2011
@@ -33,11 +33,12 @@
 #include "svn_io.h"
 #include "svn_error.h"
 #include "svn_base64.h"
+#include "private/svn_string_private.h"
 
-/* When asked to format the the base64-encoded output as multiple lines, 
+/* When asked to format the the base64-encoded output as multiple lines,
    we put this many chars in each line (plus one new line char) unless
    we run out of data.
-   It is vital for some of the optimizations below that this value is 
+   It is vital for some of the optimizations below that this value is
    a multiple of 4. */
 #define BASE64_LINELEN 76
 
@@ -72,7 +73,7 @@ encode_group(const unsigned char *in, ch
   apr_size_t part0 = in[0];
   apr_size_t part1 = in[1];
   apr_size_t part2 = in[2];
-  
+
   /* ... to prevent these arithmetic operations from being limited to
      byte size.  This saves non-zero cost conversions of the result when
      calculating the addresses within base64tab. */
@@ -87,7 +88,7 @@ encode_group(const unsigned char *in, ch
    a new line char will be appended, though.
    The code in this function will simply transform the data without
    performing any boundary checks.  Therefore, DATA must have at least
-   BYTES_PER_LINE left and space for at least another BASE64_LINELEN 
+   BYTES_PER_LINE left and space for at least another BASE64_LINELEN
    chars must have been pre-allocated in STR before calling this
    function. */
 static void
@@ -98,11 +99,11 @@ encode_line(svn_stringbuf_t *str, const 
   char *out = str->data + str->len;
   char *end = out + BASE64_LINELEN;
 
-  /* We assume that BYTES_PER_LINE is a multiple of 3 and BASE64_LINELEN 
+  /* We assume that BYTES_PER_LINE is a multiple of 3 and BASE64_LINELEN
      a multiple of 4. */
   for ( ; out != end; in += 3, out += 4)
     encode_group(in, out);
-  
+
   /* Expand and terminate the string. */
   *out = '\0';
   str->len += BASE64_LINELEN;
@@ -126,7 +127,7 @@ encode_bytes(svn_stringbuf_t *str, const
   apr_size_t buflen;
 
   /* Resize the stringbuf to make room for the (approximate) size of
-     output, to avoid repeated resizes later. 
+     output, to avoid repeated resizes later.
      Please note that our optimized code relies on the fact that STR
      never needs to be resized until we leave this function. */
   buflen = len * 4 / 3 + 4;
@@ -143,7 +144,7 @@ encode_bytes(svn_stringbuf_t *str, const
       /* May we encode BYTES_PER_LINE bytes without caring about
          line breaks, data in the temporary INBUF or running out
          of data? */
-      if (   *inbuflen == 0 
+      if (   *inbuflen == 0
           && (*linelen == 0 || !break_lines)
           && (end - p >= BYTES_PER_LINE))
         {
@@ -154,7 +155,7 @@ encode_bytes(svn_stringbuf_t *str, const
         }
       else
         {
-          /* No, this is one of a number of special cases. 
+          /* No, this is one of a number of special cases.
              Encode the data byte by byte. */
           memcpy(inbuf + *inbuflen, p, 3 - *inbuflen);
           p += (3 - *inbuflen);
@@ -267,7 +268,6 @@ svn_base64_encode_string2(const svn_stri
                           apr_pool_t *pool)
 {
   svn_stringbuf_t *encoded = svn_stringbuf_create("", pool);
-  svn_string_t *retval = apr_pcalloc(pool, sizeof(*retval));
   unsigned char ingroup[3];
   size_t ingrouplen = 0;
   size_t linelen = 0;
@@ -276,9 +276,7 @@ svn_base64_encode_string2(const svn_stri
                break_lines);
   encode_partial_group(encoded, ingroup, ingrouplen, linelen,
                        break_lines);
-  retval->data = encoded->data;
-  retval->len = encoded->len;
-  return retval;
+  return svn_stringbuf__morph_into_string(encoded);
 }
 
 const svn_string_t *
@@ -363,7 +361,7 @@ decode_group_directly(const unsigned cha
    in between.
    The code in this function will simply transform the data without
    performing any boundary checks.  Therefore, DATA must have at least
-   BASE64_LINELEN left and space for at least another BYTES_PER_LINE 
+   BASE64_LINELEN left and space for at least another BYTES_PER_LINE
    chars must have been pre-allocated in STR before calling this
    function. */
 static svn_boolean_t
@@ -374,7 +372,7 @@ decode_line(svn_stringbuf_t *str, const 
   char *out = str->data + str->len;
   char *end = out + BYTES_PER_LINE;
 
-  /* We assume that BYTES_PER_LINE is a multiple of 3 and BASE64_LINELEN 
+  /* We assume that BYTES_PER_LINE is a multiple of 3 and BASE64_LINELEN
      a multiple of 4.  Stop translation as soon as we encounter a special
      char.  Leave the entire group untouched in that case. */
   for (; out < end; p += 4, out += 3)
@@ -385,7 +383,7 @@ decode_line(svn_stringbuf_t *str, const 
   str->len = out - str->data;
   *out = '\0';
   *data = (const char *)p;
-  
+
   /* Return FALSE, if the caller should continue the decoding process
      using the slow standard method. */
   return out == end;
@@ -410,7 +408,7 @@ decode_bytes(svn_stringbuf_t *str, const
   const char *end = data + len;
 
   /* Resize the stringbuf to make room for the (approximate) size of
-     output, to avoid repeated resizes later. 
+     output, to avoid repeated resizes later.
      The optimizations in decode_line rely on no resizes being necessary! */
   svn_stringbuf_ensure(str, str->len + (len / 4) * 3 + 3);
 
@@ -422,7 +420,7 @@ decode_bytes(svn_stringbuf_t *str, const
       if ((*inbuflen == 0) && (p + BASE64_LINELEN <= end))
         if (decode_line(str, &p))
           continue;
-        
+
       /* A special case or decode_line encountered a special char. */
       if (*p == '=')
         {
@@ -510,15 +508,12 @@ const svn_string_t *
 svn_base64_decode_string(const svn_string_t *str, apr_pool_t *pool)
 {
   svn_stringbuf_t *decoded = svn_stringbuf_create("", pool);
-  svn_string_t *retval = apr_pcalloc(pool, sizeof(*retval));
   unsigned char ingroup[4];
   int ingrouplen = 0;
   svn_boolean_t done = FALSE;
 
   decode_bytes(decoded, str->data, str->len, ingroup, &ingrouplen, &done);
-  retval->data = decoded->data;
-  retval->len = decoded->len;
-  return retval;
+  return svn_stringbuf__morph_into_string(decoded);
 }
 
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_subr/svn_string.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_subr/svn_string.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_subr/svn_string.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_subr/svn_string.c Wed Jul 20 13:06:00 2011
@@ -783,7 +783,7 @@ svn_error_t *
 svn_cstring_atoui64(apr_uint64_t *n, const char *str)
 {
   return svn_error_trace(svn_cstring_strtoui64(n, str, 0,
-                                                APR_UINT64_MAX, 10));
+                                               APR_UINT64_MAX, 10));
 }
 
 svn_error_t *
@@ -827,7 +827,7 @@ svn_error_t *
 svn_cstring_atoi64(apr_int64_t *n, const char *str)
 {
   return svn_error_trace(svn_cstring_strtoi64(n, str, APR_INT64_MIN,
-                                               APR_INT64_MAX, 10));
+                                              APR_INT64_MAX, 10));
 }
 
 svn_error_t *

Propchange: subversion/branches/svn-bisect/subversion/libsvn_subr/svn_temp_serializer.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 20 13:06:00 2011
@@ -1 +1,2 @@
-/subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c:1067687-1072301
+/subversion/branches/revprop-packing/subversion/libsvn_subr/svn_temp_serializer.c:1143907,1143971,1144017,1144568,1146145
+/subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c:1067687-1072301,1140046-1148712

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/adm_crawler.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/adm_crawler.c Wed Jul 20 13:06:00 2011
@@ -131,7 +131,9 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
   if (status != svn_wc__db_status_normal
       && status != svn_wc__db_status_copied
       && status != svn_wc__db_status_moved_here
-      && !(status == svn_wc__db_status_added && kind == svn_wc__db_kind_dir))
+      && !(kind == svn_wc__db_kind_dir
+           && (status == svn_wc__db_status_added
+               || status == svn_wc__db_status_incomplete)))
     {
       return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
                                _("The node '%s' can not be restored."),
@@ -192,12 +194,11 @@ restore_node(svn_wc__db_t *db,
 /* The recursive crawler that describes a mixed-revision working
    copy to an RA layer.  Used to initiate updates.
 
-   This is a depth-first recursive walk of DIR_ABSPATH using DB.  Look
-   at each entry and check if its revision is different than DIR_REV.
-   If so, report this fact to REPORTER.  If an entry is.  If a node has
-   a different URL than expected, report that to REPORTER.  If an
-   entry has a different depth than its parent, report that to
-   REPORTER.
+   This is a depth-first recursive walk of the children of DIR_ABSPATH
+   (not including DIR_ABSPATH itself) using DB.  Look at each node and
+   check if its revision is different than DIR_REV.  If so, report this
+   fact to REPORTER.  If a node has a different URL than expected, or
+   a different depth than its parent, report that to REPORTER.
 
    Report DIR_ABSPATH to the reporter as REPORT_RELPATH.
 
@@ -389,7 +390,10 @@ report_revisions_and_depths(svn_wc__db_t
 
           if (wrk_status == svn_wc__db_status_normal
               || wrk_status == svn_wc__db_status_copied
-              || wrk_status == svn_wc__db_status_moved_here)
+              || wrk_status == svn_wc__db_status_moved_here
+              || (wrk_kind == svn_wc__db_kind_dir
+                  && (wrk_status == svn_wc__db_status_added
+                      || wrk_status == svn_wc__db_status_incomplete)))
             {
               svn_node_kind_t dirent_kind;
 
@@ -495,6 +499,16 @@ report_revisions_and_depths(svn_wc__db_t
           is_incomplete = (ths->status == svn_wc__db_status_incomplete);
           start_empty = is_incomplete;
 
+          /* When a <= 1.6 working copy is upgraded without some of its
+             subdirectories we miss some information in the database. If we
+             report the revision as -1, the update editor will receive an
+             add_directory() while it still knows the directory.
+
+             This would raise strange tree conflicts and probably assertions
+             as it would a BASE vs BASE conflict */
+          if (is_incomplete && !SVN_IS_VALID_REVNUM(ths->revnum))
+            ths->revnum = dir_rev;
+
           if (depth_compatibility_trick
               && ths->depth <= svn_depth_files
               && depth > ths->depth)
@@ -636,9 +650,8 @@ svn_wc_crawl_revisions5(svn_wc_context_t
   svn_depth_t report_depth;
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
-  /* The first thing we do is get the base_rev from the working copy's
-     ROOT_DIRECTORY.  This is the first revnum that entries will be
-     compared to. */
+  /* Get the base rev, which is the first revnum that entries will be
+     compared to, and some other WC info about the target. */
   err = svn_wc__db_base_get_info(&status, &target_kind, &target_rev,
                                  &repos_relpath, &repos_root_url,
                                  NULL, NULL, NULL, NULL, &target_depth,
@@ -716,6 +729,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
         {
           svn_error_clear(err);
           wrk_status = svn_wc__db_status_not_present;
+          wrk_kind = svn_wc__db_kind_file;
         }
       else
         SVN_ERR(err);
@@ -728,7 +742,10 @@ svn_wc_crawl_revisions5(svn_wc_context_t
 
       if (wrk_status == svn_wc__db_status_normal
           || wrk_status == svn_wc__db_status_copied
-          || wrk_status == svn_wc__db_status_moved_here)
+          || wrk_status == svn_wc__db_status_moved_here
+          || (wrk_kind == svn_wc__db_kind_dir
+              && (wrk_status == svn_wc__db_status_added
+                  || wrk_status == svn_wc__db_status_incomplete)))
         {
           SVN_ERR(restore_node(wc_ctx->db, local_abspath,
                                wrk_kind, use_commit_times,

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/adm_files.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/adm_files.c Wed Jul 20 13:06:00 2011
@@ -316,7 +316,7 @@ svn_wc__open_adm_stream(svn_stream_t **s
 
   local_abspath = svn_wc__adm_child(dir_abspath, fname, scratch_pool);
   return svn_error_trace(svn_stream_open_readonly(stream, local_abspath,
-                                                   result_pool, scratch_pool));
+                                                  result_pool, scratch_pool));
 }
 
 
@@ -450,8 +450,8 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
      just create one. */
   if (format == 0)
     return svn_error_trace(init_adm(db, local_abspath,
-                                     repos_relpath, repos_root_url, repos_uuid,
-                                     revision, depth, scratch_pool));
+                                    repos_relpath, repos_root_url, repos_uuid,
+                                    revision, depth, scratch_pool));
 
   SVN_ERR(svn_wc__db_read_info(&status, NULL,
                                &db_revision, &db_repos_relpath,