You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/08/10 20:06:33 UTC

svn commit: r984153 [18/39] - in /subversion/branches/ignore-mergeinfo: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/hudson/ build/hudson/jobs/subversion-1.6.x-solaris/ build/hudson/jobs/subversion-1.6.x-ubuntu/ build/hu...

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/util/fs_skels.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/util/fs_skels.h?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/util/fs_skels.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/util/fs_skels.h Tue Aug 10 18:06:17 2010
@@ -42,42 +42,43 @@ extern "C" {
 /*** Parsing (conversion from skeleton to native FS type) ***/
 
 
-/* Parse a `REVISION' SKEL into *REVISION_P.  Use POOL for all
-   allocations.  */
+/* Parse a `REVISION' SKEL and set *REVISION_P to the newly allocated
+   result.  Use POOL for all allocations.  */
 svn_error_t *
 svn_fs_base__parse_revision_skel(revision_t **revision_p,
                                  svn_skel_t *skel,
                                  apr_pool_t *pool);
 
-/* Parse a `TRANSACTION' SKEL into *TRANSACTION_P.  Use POOL for all
-   allocations.  */
+/* Parse a `TRANSACTION' SKEL and set *TRANSACTION_P to the newly allocated
+   result.  Use POOL for all allocations.  */
 svn_error_t *
 svn_fs_base__parse_transaction_skel(transaction_t **transaction_p,
                                     svn_skel_t *skel,
                                     apr_pool_t *pool);
 
-/* Parse a `REPRESENTATION' SKEL into *REP_P.  Use POOL for all
-   allocations.  */
+/* Parse a `REPRESENTATION' SKEL and set *REP_P to the newly allocated
+   result.  Use POOL for all allocations.  */
 
 svn_error_t *
 svn_fs_base__parse_representation_skel(representation_t **rep_p,
                                        svn_skel_t *skel,
                                        apr_pool_t *pool);
 
-/* Parse a `NODE-REVISION' SKEL into *NODEREV_P.  Use POOL for all
-   allocations. */
+/* Parse a `NODE-REVISION' SKEL and set *NODEREV_P to the newly allocated
+   result.  Use POOL for all allocations. */
 svn_error_t *
 svn_fs_base__parse_node_revision_skel(node_revision_t **noderev_p,
                                       svn_skel_t *skel,
                                       apr_pool_t *pool);
 
-/* Parse a `COPY' SKEL into *COPY_P.  Use POOL for all allocations. */
+/* Parse a `COPY' SKEL and set *COPY_P to the newly allocated result.  Use
+   POOL for all allocations. */
 svn_error_t *
 svn_fs_base__parse_copy_skel(copy_t **copy_p,
                              svn_skel_t *skel,
                              apr_pool_t *pool);
 
-/* Parse an `ENTRIES' SKEL into *ENTRIES_P, which is a hash with const
+/* Parse an `ENTRIES' SKEL and set *ENTRIES_P to a new hash with const
    char * names (the directory entry name) and svn_fs_id_t * values
    (the node-id of the entry), or NULL if SKEL contains no entries.
    Use POOL for all allocations. */
@@ -86,13 +87,15 @@ svn_fs_base__parse_entries_skel(apr_hash
                                 svn_skel_t *skel,
                                 apr_pool_t *pool);
 
-/* Parse a `CHANGE' SKEL into *CHANGE_P.  Use POOL for all allocations. */
+/* Parse a `CHANGE' SKEL and set *CHANGE_P to the newly allocated result.
+   Use POOL for all allocations. */
 svn_error_t *
 svn_fs_base__parse_change_skel(change_t **change_p,
                                svn_skel_t *skel,
                                apr_pool_t *pool);
 
-/* Parse a `LOCK' SKEL into *LOCK_P.  Use POOL for all allocations. */
+/* Parse a `LOCK' SKEL and set *LOCK_P to the newly allocated result.  Use
+   POOL for all allocations. */
 svn_error_t *
 svn_fs_base__parse_lock_skel(svn_lock_t **lock_p,
                              svn_skel_t *skel,
@@ -103,60 +106,63 @@ svn_fs_base__parse_lock_skel(svn_lock_t 
 /*** Unparsing (conversion from native FS type to skeleton) ***/
 
 
-/* Unparse REVISION into a `REVISION' skel *SKEL_P.  Use POOL for all
-   allocations.  */
+/* Unparse REVISION into a newly allocated `REVISION' skel and set *SKEL_P
+   to the result.  Use POOL for all allocations.  */
 svn_error_t *
 svn_fs_base__unparse_revision_skel(svn_skel_t **skel_p,
                                    const revision_t *revision,
                                    apr_pool_t *pool);
 
-/* Unparse TRANSACTION into a `TRANSACTION' skel *SKEL_P.  Use POOL
-   for all allocations.  */
+/* Unparse TRANSACTION into a newly allocated `TRANSACTION' skel and set
+   *SKEL_P to the result.  Use POOL for all allocations.  */
 svn_error_t *
 svn_fs_base__unparse_transaction_skel(svn_skel_t **skel_p,
                                       const transaction_t *transaction,
                                       apr_pool_t *pool);
 
-/* Unparse REP into a `REPRESENTATION' skel *SKEL_P.  Use POOL for all
-   allocations.  FORMAT is the format version of the filesystem. */
+/* Unparse REP into a newly allocated `REPRESENTATION' skel and set *SKEL_P
+   to the result.  Use POOL for all allocations.  FORMAT is the format
+   version of the filesystem. */
 svn_error_t *
 svn_fs_base__unparse_representation_skel(svn_skel_t **skel_p,
                                          const representation_t *rep,
                                          int format,
                                          apr_pool_t *pool);
 
-/* Unparse NODEREV into a `NODE-REVISION' skel *SKEL_P.  Use POOL for
-   all allocations.  FORMAT is the format version of the filesystem. */
+/* Unparse NODEREV into a newly allocated `NODE-REVISION' skel and set
+   *SKEL_P to the result.  Use POOL for all allocations.  FORMAT is the
+   format version of the filesystem. */
 svn_error_t *
 svn_fs_base__unparse_node_revision_skel(svn_skel_t **skel_p,
                                         const node_revision_t *noderev,
                                         int format,
                                         apr_pool_t *pool);
 
-/* Unparse COPY into a `COPY' skel *SKEL_P.  Use POOL for all
-   allocations.  */
+/* Unparse COPY into a newly allocated `COPY' skel and set *SKEL_P to the
+   result.  Use POOL for all allocations.  */
 svn_error_t *
 svn_fs_base__unparse_copy_skel(svn_skel_t **skel_p,
                                const copy_t *copy,
                                apr_pool_t *pool);
 
 /* Unparse an ENTRIES hash, which has const char * names (the entry
-   name) and svn_fs_id_t * values (the node-id of the entry) into an
-   `ENTRIES' skel *SKEL_P.  Use POOL for all allocations.  */
+   name) and svn_fs_id_t * values (the node-id of the entry) into a newly
+   allocated `ENTRIES' skel and set *SKEL_P to the result.  Use POOL for all
+   allocations.  */
 svn_error_t *
 svn_fs_base__unparse_entries_skel(svn_skel_t **skel_p,
                                   apr_hash_t *entries,
                                   apr_pool_t *pool);
 
-/* Unparse CHANGE into a `CHANGE' skel *SKEL_P.  Use POOL for all
-   allocations.  */
+/* Unparse CHANGE into a newly allocated `CHANGE' skel and set *SKEL_P to
+   the result.  Use POOL for all allocations.  */
 svn_error_t *
 svn_fs_base__unparse_change_skel(svn_skel_t **skel_p,
                                  const change_t *change,
                                  apr_pool_t *pool);
 
-/* Unparse LOCK into a `LOCK' skel *SKEL_P.  Use POOL for all
-   allocations.  */
+/* Unparse LOCK into a newly allocated `LOCK' skel and set *SKEL_P to the
+   result.  Use POOL for all allocations.  */
 svn_error_t *
 svn_fs_base__unparse_lock_skel(svn_skel_t **skel_p,
                                const svn_lock_t *lock,

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/caching.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/caching.c Tue Aug 10 18:06:17 2010
@@ -93,7 +93,7 @@ dup_dir_listing(void **out,
 
   for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
     {
-      svn_fs_dirent_t *dirent = svn_apr_hash_index_val(hi);
+      svn_fs_dirent_t *dirent = svn__apr_hash_index_val(hi);
       svn_fs_dirent_t *new_dirent;
 
       new_dirent = apr_palloc(pool, sizeof(*new_dirent));

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/dag.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/dag.c Tue Aug 10 18:06:17 2010
@@ -844,7 +844,7 @@ svn_fs_fs__dag_delete_if_mutable(svn_fs_
                hi;
                hi = apr_hash_next(hi))
             {
-              svn_fs_dirent_t *dirent = svn_apr_hash_index_val(hi);
+              svn_fs_dirent_t *dirent = svn__apr_hash_index_val(hi);
 
               SVN_ERR(svn_fs_fs__dag_delete_if_mutable(fs, dirent->id,
                                                        pool));

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/fs.h?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/fs.h Tue Aug 10 18:06:17 2010
@@ -59,8 +59,8 @@ extern "C" {
 #define PATH_LOCKS_DIR        "locks"            /* Directory of locks */
 #define PATH_MIN_UNPACKED_REV "min-unpacked-rev" /* Oldest revision which
                                                     has not been packed. */
-#define PATH_MIN_UNPACKED_REVPROP "min-unpacked-revprop" /* Oldest revision 
-                                                            property which has 
+#define PATH_MIN_UNPACKED_REVPROP "min-unpacked-revprop" /* Oldest revision
+                                                            property which has
                                                             not been packed. */
 #define PATH_REVPROPS_DB "revprops.db"
 /* If you change this, look at tests/svn_test_fs.c(maybe_install_fsfs_conf) */

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/fs_fs.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/fs_fs.c Tue Aug 10 18:06:17 2010
@@ -137,13 +137,7 @@ static txn_vtable_t txn_vtable = {
   svn_fs_fs__change_txn_props
 };
 
-#define REVPROPS_SCHEMA_FORMAT   1
-
 /* SQL bits for revprops. */
-static const char * const upgrade_sql[] = { NULL,
-  REVPROPS_DB_SQL
-  };
-
 REVPROPS_DB_SQL_DECLARE_STATEMENTS(statements);
 
 /* Declarations. */
@@ -1188,7 +1182,7 @@ static svn_error_t *
 update_min_unpacked_revprop(svn_fs_t *fs, apr_pool_t *pool)
 {
   fs_fs_data_t *ffd = fs->fsap_data;
-  
+
   return read_min_unpacked_rev(&ffd->min_unpacked_revprop,
                                path_min_unpacked_revprop(fs, pool),
                                pool);
@@ -1245,7 +1239,7 @@ svn_fs_fs__open(svn_fs_t *fs, const char
                                                     PATH_REVPROPS_DB,
                                                     NULL),
                                svn_sqlite__mode_readwrite, statements,
-                               REVPROPS_SCHEMA_FORMAT, upgrade_sql,
+                               0, NULL,
                                fs->pool, pool));
     }
 
@@ -1319,8 +1313,10 @@ upgrade_body(void *baton, apr_pool_t *po
                                                           PATH_REVPROPS_DB,
                                                           NULL),
                                svn_sqlite__mode_rwcreate, statements,
-                               REVPROPS_SCHEMA_FORMAT, upgrade_sql,
+                               0, NULL,
                                fs->pool, pool));
+      SVN_ERR(svn_sqlite__exec_statements(ffd->revprop_db,
+                                          STMT_CREATE_SCHEMA));
     }
 
   /* Bump the format file. */
@@ -1499,6 +1495,9 @@ svn_fs_fs__hotcopy(const char *src_path,
   /* Copy the uuid. */
   SVN_ERR(svn_io_dir_file_copy(src_path, dst_path, PATH_UUID, pool));
 
+  /* Copy the config. */
+  SVN_ERR(svn_io_dir_file_copy(src_path, dst_path, PATH_CONFIG, pool));
+
   /* Copy the min unpacked rev, and read its value. */
   if (format >= SVN_FS_FS__MIN_PACKED_FORMAT)
     {
@@ -1853,6 +1852,7 @@ get_packed_offset(apr_off_t *rev_offset,
       if (eof)
         break;
 
+      errno = 0; /* apr_atoi64() in APR-0.9 does not always set errno */
       APR_ARRAY_PUSH(manifest, apr_off_t) =
                 apr_atoi64(svn_string_create_from_buf(sb, iterpool)->data);
       if (errno == ERANGE)
@@ -2164,7 +2164,7 @@ svn_fs_fs__read_noderev(node_revision_t 
         return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
                                 _("Malformed copyroot line in node-rev"));
 
-      noderev->copyroot_rev = atoi(str);
+      noderev->copyroot_rev = SVN_STR_TO_REV(str);
 
       if (last_str == NULL)
         return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
@@ -2188,7 +2188,7 @@ svn_fs_fs__read_noderev(node_revision_t 
         return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
                                 _("Malformed copyfrom line in node-rev"));
 
-      noderev->copyfrom_rev = atoi(str);
+      noderev->copyfrom_rev = SVN_STR_TO_REV(str);
 
       if (last_str == NULL)
         return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
@@ -2420,7 +2420,7 @@ read_rep_line(struct rep_args **rep_args
 
   str = apr_strtok(NULL, " ", &last_str);
   if (! str) goto err;
-  rep_args->base_revision = atol(str);
+  rep_args->base_revision = SVN_STR_TO_REV(str);
 
   str = apr_strtok(NULL, " ", &last_str);
   if (! str) goto err;
@@ -2686,7 +2686,7 @@ set_revision_proplist(svn_fs_t *fs,
 
   SVN_ERR(ensure_revision_exists(fs, rev, pool));
 
-  if (ffd->format < SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT || 
+  if (ffd->format < SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT ||
       rev >= ffd->min_unpacked_revprop)
     {
       const char *final_path = path_revprops(fs, rev, pool);
@@ -2728,9 +2728,9 @@ revision_proplist(apr_hash_t **proplist_
 {
   fs_fs_data_t *ffd = fs->fsap_data;
   apr_hash_t *proplist;
- 
+
   SVN_ERR(ensure_revision_exists(fs, rev, pool));
- 
+
   if (ffd->format < SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT ||
       rev >= ffd->min_unpacked_revprop)
     {
@@ -2738,7 +2738,7 @@ revision_proplist(apr_hash_t **proplist_
       svn_error_t *err = SVN_NO_ERROR;
       int i;
       apr_pool_t *iterpool;
- 
+
       proplist = apr_hash_make(pool);
       iterpool = svn_pool_create(pool);
       for (i = 0; i < RECOVERABLE_RETRY_COUNT; i++)
@@ -3554,7 +3554,7 @@ unparse_dir_entries(apr_hash_t **str_ent
     {
       const void *key;
       apr_ssize_t klen;
-      svn_fs_dirent_t *dirent = svn_apr_hash_index_val(hi);
+      svn_fs_dirent_t *dirent = svn__apr_hash_index_val(hi);
       const char *new_val;
 
       apr_hash_this(hi, &key, &klen, NULL);
@@ -3602,8 +3602,8 @@ parse_dir_entries(apr_hash_t **entries_p
   /* Translate the string dir entries into real entries. */
   for (hi = apr_hash_first(pool, str_entries); hi; hi = apr_hash_next(hi))
     {
-      const char *name = svn_apr_hash_index_key(hi);
-      svn_string_t *str_val = svn_apr_hash_index_val(hi);
+      const char *name = svn__apr_hash_index_key(hi);
+      svn_string_t *str_val = svn__apr_hash_index_val(hi);
       char *str, *last_str;
       svn_fs_dirent_t *dirent = apr_pcalloc(pool, sizeof(*dirent));
 
@@ -3861,6 +3861,15 @@ fold_change(apr_hash_t *changes,
           (SVN_ERR_FS_CORRUPT, NULL,
            _("Invalid change ordering: non-add change on deleted path"));
 
+      /* Sanity check: an add can't follow anything except
+         a delete or reset.  */
+      if ((change->kind == svn_fs_path_change_add)
+          && (old_change->change_kind != svn_fs_path_change_delete)
+          && (old_change->change_kind != svn_fs_path_change_reset))
+        return svn_error_create
+          (SVN_ERR_FS_CORRUPT, NULL,
+           _("Invalid change ordering: add change on preexisting path"));
+
       /* Now, merge that change in. */
       switch (change->kind)
         {
@@ -4139,7 +4148,7 @@ read_change(change_t **change_p,
       if (! str)
         return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
                                 _("Invalid changes line in rev-file"));
-      change->copyfrom_rev = atol(str);
+      change->copyfrom_rev = SVN_STR_TO_REV(str);
 
       if (! last_str)
         return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
@@ -4199,8 +4208,8 @@ fetch_all_changes(apr_hash_t *changed_pa
                hi = apr_hash_next(hi))
             {
               /* KEY is the path. */
-              const char *path = svn_apr_hash_index_key(hi);
-              apr_ssize_t klen = svn_apr_hash_index_klen(hi);
+              const char *path = svn__apr_hash_index_key(hi);
+              apr_ssize_t klen = svn__apr_hash_index_klen(hi);
 
               /* If we come across our own path, ignore it. */
               if (strcmp(change->path, path) == 0)
@@ -4596,7 +4605,7 @@ svn_fs_fs__change_txn_prop(svn_fs_txn_t 
 
 svn_error_t *
 svn_fs_fs__change_txn_props(svn_fs_txn_t *txn,
-                            apr_array_header_t *props,
+                            const apr_array_header_t *props,
                             apr_pool_t *pool)
 {
   const char *txn_prop_filename;
@@ -5513,7 +5522,7 @@ write_final_rev(const svn_fs_id_t **new_
 
       for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
         {
-          svn_fs_dirent_t *dirent = svn_apr_hash_index_val(hi);
+          svn_fs_dirent_t *dirent = svn__apr_hash_index_val(hi);
 
           svn_pool_clear(subpool);
           SVN_ERR(write_final_rev(&new_id, file, rev, fs, dirent->id,
@@ -5663,8 +5672,8 @@ write_final_changed_path_info(apr_off_t 
 
       svn_pool_clear(iterpool);
 
-      change = svn_apr_hash_index_val(hi);
-      path = svn_apr_hash_index_key(hi);
+      change = svn__apr_hash_index_val(hi);
+      path = svn__apr_hash_index_key(hi);
 
       id = change->node_rev_id;
 
@@ -5799,7 +5808,7 @@ verify_locks(svn_fs_t *fs,
   changed_paths = apr_array_make(pool, apr_hash_count(changes) + 1,
                                  sizeof(const char *));
   for (hi = apr_hash_first(pool, changes); hi; hi = apr_hash_next(hi))
-    APR_ARRAY_PUSH(changed_paths, const char *) = svn_apr_hash_index_key(hi);
+    APR_ARRAY_PUSH(changed_paths, const char *) = svn__apr_hash_index_key(hi);
   qsort(changed_paths->elts, changed_paths->nelts,
         changed_paths->elt_size, svn_sort_compare_paths);
 
@@ -6065,7 +6074,11 @@ commit_obliteration_body(void *baton, ap
   apr_off_t changed_path_offset;
   char *buf;
 
-  SVN_ERR_ASSERT(! is_packed_rev(cb->fs, rev));
+  /* ### Someday support obliterating packed revisions. Maybe. */
+  if (is_packed_rev(cb->fs, rev))
+    return svn_error_create(SVN_ERR_FS_GENERAL, NULL,
+                            _("Obliteration of already-packed revision "
+                              "is not supported"));
 
   /* Get the next node_id and copy_id to use. */
   if (ffd->format < SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT)
@@ -6141,7 +6154,7 @@ commit_obliteration_body(void *baton, ap
  * to the rep-cache database of FS. */
 static svn_error_t *
 write_reps_to_cache(svn_fs_t *fs,
-                    apr_array_header_t *reps_to_cache,
+                    const apr_array_header_t *reps_to_cache,
                     apr_pool_t *scratch_pool)
 {
   int i;
@@ -6351,7 +6364,7 @@ svn_fs_fs__create(svn_fs_t *fs,
                                                         PATH_REVPROPS_DIR,
                                                         pool),
                                         pool));
-  
+
   /* Create the revprops directory. */
   if (format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
     {
@@ -6363,8 +6376,10 @@ svn_fs_fs__create(svn_fs_t *fs,
                                                     PATH_REVPROPS_DB,
                                                     NULL),
                                svn_sqlite__mode_rwcreate, statements,
-                               REVPROPS_SCHEMA_FORMAT, upgrade_sql,
+                               0, NULL,
                                fs->pool, pool));
+      SVN_ERR(svn_sqlite__exec_statements(ffd->revprop_db,
+                                          STMT_CREATE_SCHEMA));
     }
 
   /* Create the transaction directory. */
@@ -6600,7 +6615,7 @@ recover_find_max_ids(svn_fs_t *fs, svn_r
       svn_fs_id_t *id;
       const char *node_id, *copy_id;
       apr_off_t child_dir_offset;
-      const svn_string_t *path = svn_apr_hash_index_val(hi);
+      const svn_string_t *path = svn__apr_hash_index_val(hi);
 
       svn_pool_clear(iterpool);
 
@@ -7027,8 +7042,8 @@ svn_fs_fs__list_transactions(apr_array_h
   /* Loop through all the entries and return anything that ends with '.txn'. */
   for (hi = apr_hash_first(pool, dirents); hi; hi = apr_hash_next(hi))
     {
-      const char *name = svn_apr_hash_index_key(hi);
-      apr_ssize_t klen = svn_apr_hash_index_klen(hi);
+      const char *name = svn__apr_hash_index_key(hi);
+      apr_ssize_t klen = svn__apr_hash_index_klen(hi);
       const char *id;
 
       /* The name must end with ".txn" to be considered a transaction. */
@@ -7418,20 +7433,20 @@ pack_revprop_shard(svn_fs_t *fs,
   svn_sqlite__stmt_t *stmt;
   svn_stream_t *tmp_stream;
   apr_pool_t *iterpool;
-  
+
   shard_path = svn_dirent_join(revprops_dir,
                                apr_psprintf(pool, "%" APR_INT64_T_FMT, shard),
                                pool);
-  
+
   /* Notify caller we're starting to pack this shard. */
   if (notify_func)
     SVN_ERR(notify_func(notify_baton, shard, svn_fs_pack_notify_start,
                         pool));
-  
+
   start_rev = (svn_revnum_t) (shard * max_files_per_dir);
   end_rev = (svn_revnum_t) ((shard + 1) * (max_files_per_dir) - 1);
   iterpool = svn_pool_create(pool);
-  
+
   /* Iterate over the revisions in this shard, squashing them together. */
   SVN_ERR(svn_sqlite__get_statement(&stmt, ffd->revprop_db, STMT_SET_REVPROP));
   for (rev = start_rev; rev <= end_rev; rev++)
@@ -7444,7 +7459,7 @@ pack_revprop_shard(svn_fs_t *fs,
       SVN_ERR(svn_sqlite__bind_properties(stmt, 2, proplist, pool));
       SVN_ERR(svn_sqlite__insert(NULL, stmt));
     }
-  
+
   /* Update the min-unpacked-rev file to reflect our newly packed shard.
    * (ffd->min_unpacked_rev will be updated by open_pack_or_rev_file().)
    */
@@ -7456,16 +7471,16 @@ pack_revprop_shard(svn_fs_t *fs,
   SVN_ERR(svn_stream_close(tmp_stream));
   SVN_ERR(move_into_place(tmp_path, final_path, final_path, iterpool));
   svn_pool_destroy(iterpool);
-  
+
   /* Finally, remove the existing shard directory. */
   SVN_ERR(svn_io_remove_dir2(shard_path, TRUE, cancel_func, cancel_baton,
                              pool));
-  
+
   /* Notify caller we're starting to pack this shard. */
   if (notify_func)
     SVN_ERR(notify_func(notify_baton, shard, svn_fs_pack_notify_end,
                         pool));
-  
+
   return SVN_NO_ERROR;
 }
 
@@ -7511,17 +7526,24 @@ pack_body(void *baton,
                                                 PATH_MIN_UNPACKED_REV, pool),
                                 pool));
 
-   SVN_ERR(read_min_unpacked_rev(&min_unpacked_revprop,
-                                 svn_dirent_join(pb->fs->path,
-                                                 PATH_MIN_UNPACKED_REVPROP,
-                                                 pool),
-                                 pool));
+  if (format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
+    {
+      SVN_ERR(read_min_unpacked_rev(&min_unpacked_revprop,
+                                    svn_dirent_join(pb->fs->path,
+                                                    PATH_MIN_UNPACKED_REVPROP,
+                                                    pool),
+                                    pool));
+    }
+  else
+    {
+      min_unpacked_revprop = 0;
+    }
 
   SVN_ERR(get_youngest(&youngest, pb->fs->path, pool));
   completed_shards = (youngest + 1) / max_files_per_dir;
 
   /* See if we've already completed all possible shards thus far. */
-  if (min_unpacked_rev == (completed_shards * max_files_per_dir) && 
+  if (min_unpacked_rev == (completed_shards * max_files_per_dir) &&
       min_unpacked_revprop == (completed_shards * max_files_per_dir))
     return SVN_NO_ERROR;
 
@@ -7541,19 +7563,20 @@ pack_body(void *baton,
                          pb->cancel_func, pb->cancel_baton, iterpool));
     }
 
-  for (i = min_unpacked_revprop / max_files_per_dir; i < completed_shards; i++)
-    {
-      svn_pool_clear(iterpool);
+  if (format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
+    for (i = min_unpacked_revprop / max_files_per_dir; i < completed_shards; i++)
+      {
+        svn_pool_clear(iterpool);
 
-      if (pb->cancel_func)
-        SVN_ERR(pb->cancel_func(pb->cancel_baton));
+        if (pb->cancel_func)
+          SVN_ERR(pb->cancel_func(pb->cancel_baton));
 
-      SVN_ERR(pack_revprop_shard(pb->fs,
-                                 revprops_path, pb->fs->path, i,
-                                 max_files_per_dir,
-                                 pb->notify_func, pb->notify_baton,
-                                 pb->cancel_func, pb->cancel_baton, iterpool));
-    }
+        SVN_ERR(pack_revprop_shard(pb->fs,
+                                   revprops_path, pb->fs->path, i,
+                                   max_files_per_dir,
+                                   pb->notify_func, pb->notify_baton,
+                                   pb->cancel_func, pb->cancel_baton, iterpool));
+      }
 
   svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/fs_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/fs_fs.h?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/fs_fs.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/fs_fs.h Tue Aug 10 18:06:17 2010
@@ -207,7 +207,7 @@ svn_error_t *svn_fs_fs__change_txn_prop(
 /* Change transaction properties in transaction TXN based on PROPS.
    Perform temporary allocations from POOL. */
 svn_error_t *svn_fs_fs__change_txn_props(svn_fs_txn_t *txn,
-                                         apr_array_header_t *props,
+                                         const apr_array_header_t *props,
                                          apr_pool_t *pool);
 
 /* Return whether or not the given FS supports mergeinfo metadata. */

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/lock.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/lock.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/lock.c Tue Aug 10 18:06:17 2010
@@ -190,8 +190,8 @@ write_digest_file(apr_hash_t *children,
       for (hi = apr_hash_first(pool, children); hi; hi = apr_hash_next(hi))
         {
           svn_stringbuf_appendbytes(children_list,
-                                    svn_apr_hash_index_key(hi),
-                                    svn_apr_hash_index_klen(hi));
+                                    svn__apr_hash_index_key(hi),
+                                    svn__apr_hash_index_klen(hi));
           svn_stringbuf_appendbytes(children_list, "\n", 1);
         }
       hash_store(hash, CHILDREN_KEY, sizeof(CHILDREN_KEY)-1,
@@ -559,7 +559,7 @@ walk_digest_files(svn_fs_t *fs,
   subpool = svn_pool_create(pool);
   for (hi = apr_hash_first(pool, children); hi; hi = apr_hash_next(hi))
     {
-      const char *digest = svn_apr_hash_index_key(hi);
+      const char *digest = svn__apr_hash_index_key(hi);
       svn_pool_clear(subpool);
       SVN_ERR(walk_digest_files
               (fs, digest_path_from_digest(fs, digest, subpool),

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/rep-cache-db.sql
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/rep-cache-db.sql?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/rep-cache-db.sql (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/rep-cache-db.sql Tue Aug 10 18:06:17 2010
@@ -21,6 +21,7 @@
  * ====================================================================
  */
 
+-- STMT_CREATE_SCHEMA
 pragma auto_vacuum = 1;
 
 /* A table mapping representation hashes to locations in a rev file. */
@@ -30,6 +31,8 @@ create table rep_cache (hash text not nu
                         size integer not null,
                         expanded_size integer not null);
 
+pragma user_version = 1;
+
 
 -- STMT_GET_REP
 select revision, offset, size, expanded_size

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/rep-cache.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/rep-cache.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/rep-cache.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/rep-cache.c Tue Aug 10 18:06:17 2010
@@ -35,10 +35,6 @@
 /* A few magic values */
 #define REP_CACHE_SCHEMA_FORMAT   1
 
-static const char * const upgrade_sql[] = { NULL,
-  REP_CACHE_DB_SQL
-  };
-
 REP_CACHE_DB_SQL_DECLARE_STATEMENTS(statements);
 
 
@@ -48,6 +44,7 @@ svn_fs_fs__open_rep_cache(svn_fs_t *fs,
 {
   fs_fs_data_t *ffd = fs->fsap_data;
   const char *db_path;
+  int version;
 
   /* Be idempotent. */
   if (ffd->rep_cache_db)
@@ -58,9 +55,18 @@ svn_fs_fs__open_rep_cache(svn_fs_t *fs,
   db_path = svn_dirent_join(fs->path, REP_CACHE_DB_NAME, pool);
   SVN_ERR(svn_sqlite__open(&ffd->rep_cache_db, db_path,
                            svn_sqlite__mode_rwcreate, statements,
-                           REP_CACHE_SCHEMA_FORMAT, upgrade_sql,
+                           0, NULL,
                            fs->pool, pool));
 
+  SVN_ERR(svn_sqlite__read_schema_version(&version, ffd->rep_cache_db, pool));
+  if (version < REP_CACHE_SCHEMA_FORMAT)
+    {
+      /* Must be 0 -- an uninitialized (no schema) database. Create
+         the schema. Results in schema version of 1.  */
+      SVN_ERR(svn_sqlite__exec_statements(ffd->rep_cache_db,
+                                          STMT_CREATE_SCHEMA));
+    }
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/revprops-db.sql
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/revprops-db.sql?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/revprops-db.sql (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/revprops-db.sql Tue Aug 10 18:06:17 2010
@@ -21,6 +21,7 @@
  * ====================================================================
  */
 
+-- STMT_CREATE_SCHEMA
 pragma auto_vacuum = 1;
 
 /* A table for storing revision properties. */
@@ -29,6 +30,9 @@ create table revprop (revision integer U
 
 create index i_revision on revprop (revision);
 
+pragma user_version = 1;
+
+
 -- STMT_SET_REVPROP
 insert or replace into revprop(revision, properties)
 values (?1, ?2);

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/tree.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/tree.c Tue Aug 10 18:06:17 2010
@@ -1380,9 +1380,9 @@ merge(svn_stringbuf_t *conflict_p,
 
       svn_pool_clear(iterpool);
 
-      name = svn_apr_hash_index_key(hi);
-      klen = svn_apr_hash_index_klen(hi);
-      a_entry = svn_apr_hash_index_val(hi);
+      name = svn__apr_hash_index_key(hi);
+      klen = svn__apr_hash_index_klen(hi);
+      a_entry = svn__apr_hash_index_val(hi);
 
       s_entry = apr_hash_get(s_entries, name, klen);
       t_entry = apr_hash_get(t_entries, name, klen);
@@ -1510,13 +1510,13 @@ merge(svn_stringbuf_t *conflict_p,
        hi = apr_hash_next(hi))
     {
       svn_fs_dirent_t *s_entry, *t_entry;
-      const char *name = svn_apr_hash_index_key(hi);
-      apr_ssize_t klen = svn_apr_hash_index_klen(hi);
+      const char *name = svn__apr_hash_index_key(hi);
+      apr_ssize_t klen = svn__apr_hash_index_klen(hi);
       dag_node_t *s_ent_node;
 
       svn_pool_clear(iterpool);
 
-      s_entry = svn_apr_hash_index_val(hi);
+      s_entry = svn__apr_hash_index_val(hi);
       t_entry = apr_hash_get(t_entries, name, klen);
 
       /* If NAME exists in TARGET, declare a conflict. */
@@ -2188,7 +2188,7 @@ fs_copied_from(svn_revnum_t *rev_p,
           /* Parse the copyfrom string for our cached entry. */
           buf = apr_pstrdup(pool, copyfrom_str);
           str = apr_strtok(buf, " ", &last_str);
-          copyfrom_rev = atol(str);
+          copyfrom_rev = SVN_STR_TO_REV(str);
           copyfrom_path = last_str;
         }
     }
@@ -3410,7 +3410,7 @@ crawl_directory_dag_for_mergeinfo(svn_fs
        hi;
        hi = apr_hash_next(hi))
     {
-      svn_fs_dirent_t *dirent = svn_apr_hash_index_val(hi);
+      svn_fs_dirent_t *dirent = svn__apr_hash_index_val(hi);
       const char *kid_path;
       dag_node_t *kid_dag;
       svn_boolean_t has_mergeinfo, go_down;
@@ -3482,8 +3482,8 @@ append_to_merged_froms(svn_mergeinfo_t *
 
   for (hi = apr_hash_first(pool, input); hi; hi = apr_hash_next(hi))
     {
-      const char *path = svn_apr_hash_index_key(hi);
-      apr_array_header_t *rangelist = svn_apr_hash_index_val(hi);
+      const char *path = svn__apr_hash_index_key(hi);
+      apr_array_header_t *rangelist = svn__apr_hash_index_val(hi);
       char *newpath;
 
       newpath = svn_uri_join(path, path_piece, pool);

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra/compat.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra/compat.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra/compat.c Tue Aug 10 18:06:17 2010
@@ -284,7 +284,7 @@ svn_ra__locations_from_log(svn_ra_sessio
                            apr_hash_t **locations_p,
                            const char *path,
                            svn_revnum_t peg_revision,
-                           apr_array_header_t *location_revisions,
+                           const apr_array_header_t *location_revisions,
                            apr_pool_t *pool)
 {
   apr_hash_t *locations = apr_hash_make(pool);
@@ -800,6 +800,7 @@ log_path_del_receiver(void *baton,
                       svn_log_entry_t *log_entry,
                       apr_pool_t *pool)
 {
+  log_path_del_rev_t *b = baton;
   apr_hash_index_t *hi;
 
   /* No paths were changed in this revision.  Nothing to do. */
@@ -816,14 +817,11 @@ log_path_del_receiver(void *baton,
 
       apr_hash_this(hi, (void *) &path, NULL, &val);
       log_item = val;
-      if (svn_path_compare_paths(((log_path_del_rev_t *) baton)->path,
-                                 path) == 0
-                                 && (log_item->action == 'D'
-                                     || log_item->action == 'R'))
+      if (svn_path_compare_paths(b->path, path) == 0
+          && (log_item->action == 'D' || log_item->action == 'R'))
         {
           /* Found the first deletion or replacement, we are done. */
-          ((log_path_del_rev_t *) baton)->revision_deleted =
-            log_entry->revision;
+          b->revision_deleted = log_entry->revision;
           break;
         }
     }

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra/ra_loader.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra/ra_loader.c Tue Aug 10 18:06:17 2010
@@ -880,7 +880,7 @@ svn_error_t *svn_ra_get_locations(svn_ra
                                   apr_hash_t **locations,
                                   const char *path,
                                   svn_revnum_t peg_revision,
-                                  apr_array_header_t *location_revisions,
+                                  const apr_array_header_t *location_revisions,
                                   apr_pool_t *pool)
 {
   svn_error_t *err;
@@ -971,9 +971,9 @@ svn_error_t *svn_ra_lock(svn_ra_session_
 
   for (hi = apr_hash_first(pool, path_revs); hi; hi = apr_hash_next(hi))
     {
-      const void *path;
-      apr_hash_this(hi, &path, NULL, NULL);
-      SVN_ERR_ASSERT(*((const char *)path) != '/');
+      const char *path = svn__apr_hash_index_key(hi);
+
+      SVN_ERR_ASSERT(*path != '/');
     }
 
   if (comment && ! svn_xml_is_xml_safe(comment, strlen(comment)))
@@ -996,9 +996,9 @@ svn_error_t *svn_ra_unlock(svn_ra_sessio
 
   for (hi = apr_hash_first(pool, path_tokens); hi; hi = apr_hash_next(hi))
     {
-      const void *path;
-      apr_hash_this(hi, &path, NULL, NULL);
-      SVN_ERR_ASSERT(*((const char *)path) != '/');
+      const char *path = svn__apr_hash_index_key(hi);
+
+      SVN_ERR_ASSERT(*path != '/');
     }
 
   return session->vtable->unlock(session, path_tokens, break_lock,
@@ -1137,18 +1137,19 @@ svn_ra_get_deleted_rev(svn_ra_session_t 
 }
 
 svn_error_t *
-svn_ra__obliterate(svn_ra_session_t *session,
-                   svn_revnum_t rev,
-                   const char *path,
-                   apr_pool_t *pool)
+svn_ra__obliterate_path_rev(svn_ra_session_t *session,
+                            svn_revnum_t rev,
+                            const char *path,
+                            apr_pool_t *pool)
 {
   const char *session_url;
 
   SVN_ERR(svn_ra_get_session_url(session, &session_url, pool));
 
   if (session->vtable->obliterate_path_rev == NULL)
-    return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
-                            "obliterate not supported by this RA layer");
+    return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, NULL,
+                            _("Obliterate is not supported by this "
+                              "Repository Access method"));
 
   return session->vtable->obliterate_path_rev(session, rev, path, pool);
 }

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra/ra_loader.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra/ra_loader.h?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra/ra_loader.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra/ra_loader.h Tue Aug 10 18:06:17 2010
@@ -192,7 +192,7 @@ typedef struct svn_ra__vtable_t {
                                 apr_hash_t **locations,
                                 const char *path,
                                 svn_revnum_t peg_revision,
-                                apr_array_header_t *location_revisions,
+                                const apr_array_header_t *location_revisions,
                                 apr_pool_t *pool);
   svn_error_t *(*get_location_segments)(svn_ra_session_t *session,
                                         const char *path,
@@ -258,6 +258,7 @@ typedef struct svn_ra__vtable_t {
                                   svn_revnum_t end_revision,
                                   svn_revnum_t *revision_deleted,
                                   apr_pool_t *pool);
+  /* See svn_ra__obliterate_path_rev() for details. */
   svn_error_t *(*obliterate_path_rev)(svn_ra_session_t *session,
                                       svn_revnum_t revision,
                                       const char *path,
@@ -329,7 +330,7 @@ svn_ra__locations_from_log(svn_ra_sessio
                            apr_hash_t **locations_p,
                            const char *path,
                            svn_revnum_t peg_revision,
-                           apr_array_header_t *location_revisions,
+                           const apr_array_header_t *location_revisions,
                            apr_pool_t *pool);
 
 /**

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_local/ra_plugin.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_local/ra_plugin.c Tue Aug 10 18:06:17 2010
@@ -66,7 +66,7 @@ cleanup_access(void *data)
 }
 
 
-/* Fetch a username for use with SESS. */
+/* Fetch a username for use with SESS, and store it in SESS->username. */
 static svn_error_t *
 get_username(svn_ra_session_t *session,
              apr_pool_t *pool)
@@ -1160,7 +1160,7 @@ svn_ra_local__get_locations(svn_ra_sessi
                             apr_hash_t **locations,
                             const char *path,
                             svn_revnum_t peg_revision,
-                            apr_array_header_t *location_revisions,
+                            const apr_array_header_t *location_revisions,
                             apr_pool_t *pool)
 {
   svn_ra_local__session_baton_t *sess = session->priv;
@@ -1424,6 +1424,7 @@ svn_ra_local__get_deleted_rev(svn_ra_ses
   return SVN_NO_ERROR;
 }
 
+/* Implements svn_ra__vtable_t.obliterate_path_rev. */
 static svn_error_t *
 svn_ra_local__obliterate_path_rev(svn_ra_session_t *session,
                                   svn_revnum_t revision,
@@ -1432,8 +1433,12 @@ svn_ra_local__obliterate_path_rev(svn_ra
 {
   svn_ra_local__session_baton_t *sess = session->priv;
 
+  /* A username is absolutely required to obliterate anything. */
+  SVN_ERR(get_username(session, pool));
+
   path = svn_path_join(sess->fs_path->data, path, pool);
   SVN_ERR(svn_repos__obliterate_path_rev(sess->repos,
+                                         sess->username,
                                          revision,
                                          path,
                                          pool));

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_local/split_url.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_local/split_url.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_local/split_url.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_local/split_url.c Tue Aug 10 18:06:17 2010
@@ -106,7 +106,7 @@ svn_ra_local__split_URL(svn_repos_t **re
     char *dup_path = (char *)svn_path_uri_decode(path, pool);
     if (!hostname && dup_path[1] && strchr(valid_drive_letters, dup_path[1])
         && (dup_path[2] == ':' || dup_path[2] == '|')
-        && dup_path[3] == '/')
+        && (dup_path[3] == '/' || dup_path[3] == '\0'))
       {
         /* Skip the leading slash. */
         ++dup_path;
@@ -114,6 +114,19 @@ svn_ra_local__split_URL(svn_repos_t **re
         ++path;
         if (dup_path[1] == '|')
           dup_path[1] = ':';
+
+        if (dup_path[3] == '\0')
+          {
+            /* A valid dirent for the driveroot must be like "C:/" instead of
+               just "C:" or svn_dirent_join() will use the current directory
+               on the drive instead */
+
+            char *new_path = apr_pcalloc(pool, 4);
+            new_path[0] = dup_path[0];
+            new_path[1] = ':';
+            new_path[2] = '/';
+            new_path[3] = '\0';
+          }
       }
     if (hostname)
       /* We still know that the path starts with a slash. */

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/commit.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/commit.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/commit.c Tue Aug 10 18:06:17 2010
@@ -48,6 +48,7 @@
 #include "ra_neon.h"
 
 
+#define APPLY_TO_VERSION "<D:apply-to-version/>"
 /*
 ** version_rsrc_t: identify the relevant pieces of a resource on the server
 **
@@ -203,9 +204,9 @@ static svn_error_t * get_version_url(com
          the version resource URL of RSRC. */
       if (parent && parent->vsn_url && parent->revision == rsrc->revision)
         {
-          rsrc->vsn_url = svn_path_url_add_component(parent->vsn_url,
-                                                     rsrc->name,
-                                                     rsrc->pool);
+          rsrc->vsn_url = svn_path_url_add_component2(parent->vsn_url,
+                                                      rsrc->name,
+                                                      rsrc->pool);
           return SVN_NO_ERROR;
         }
 
@@ -231,7 +232,7 @@ static svn_error_t * get_version_url(com
                                              rsrc->revision,
                                              pool));
 
-      url = svn_path_url_add_component(bc_url.data, bc_relative.data, pool);
+      url = svn_path_url_add_component2(bc_url.data, bc_relative.data, pool);
     }
 
   /* Get the DAV:checked-in property, which contains the URL of the
@@ -325,8 +326,8 @@ static svn_error_t * create_activity(com
      the activity, and create the activity.  The URL for our activity
      will be ACTIVITY_COLL/UUID */
   SVN_ERR(get_activity_collection(cc, &activity_collection, FALSE, pool));
-  url = svn_path_url_add_component(activity_collection->data,
-                                   uuid_buf, pool);
+  url = svn_path_url_add_component2(activity_collection->data,
+                                    uuid_buf, pool);
   SVN_ERR(svn_ra_neon__simple_request(&code, cc->ras,
                                       "MKACTIVITY", url, NULL, NULL,
                                       201 /* Created */,
@@ -338,8 +339,8 @@ static svn_error_t * create_activity(com
   if (code == 404)
     {
       SVN_ERR(get_activity_collection(cc, &activity_collection, TRUE, pool));
-      url = svn_path_url_add_component(activity_collection->data,
-                                       uuid_buf, pool);
+      url = svn_path_url_add_component2(activity_collection->data,
+                                        uuid_buf, pool);
       SVN_ERR(svn_ra_neon__simple_request(&code, cc->ras,
                                           "MKACTIVITY", url, NULL, NULL,
                                           201, 0, pool));
@@ -373,7 +374,7 @@ static svn_error_t * add_child(version_r
   rsrc->pool = pool;
   rsrc->revision = revision;
   rsrc->name = name;
-  rsrc->url = svn_path_url_add_component(parent->url, name, pool);
+  rsrc->url = svn_path_url_add_component2(parent->url, name, pool);
   rsrc->local_path = svn_path_join(parent->local_path, name, pool);
 
   /* Case 1:  the resource is truly "new".  Either it was added as a
@@ -382,7 +383,7 @@ static svn_error_t * add_child(version_r
      URL by the rules of deltaV:  "copy structure is preserved below
      the WR you COPY to."  */
   if (created || (parent->vsn_url == NULL))
-    rsrc->wr_url = svn_path_url_add_component(parent->wr_url, name, pool);
+    rsrc->wr_url = svn_path_url_add_component2(parent->wr_url, name, pool);
 
   /* Case 2: the resource is already under version-control somewhere.
      This means it has a VR URL already, and the WR URL won't exist
@@ -399,6 +400,7 @@ static svn_error_t * do_checkout(commit_
                                  const char *vsn_url,
                                  svn_boolean_t allow_404,
                                  const char *token,
+                                 svn_boolean_t is_vcc,
                                  int *code,
                                  const char **locn,
                                  apr_pool_t *pool)
@@ -423,7 +425,9 @@ static svn_error_t * do_checkout(commit_
                       "<D:checkout xmlns:D=\"DAV:\">"
                       "<D:activity-set>"
                       "<D:href>%s</D:href>"
-                      "</D:activity-set></D:checkout>", cc->activity_url);
+                      "</D:activity-set>%s</D:checkout>",
+                      cc->activity_url,
+                      is_vcc ? APPLY_TO_VERSION: "");
 
   if (token)
     {
@@ -459,6 +463,7 @@ static svn_error_t * checkout_resource(c
                                        version_rsrc_t *rsrc,
                                        svn_boolean_t allow_404,
                                        const char *token,
+                                       svn_boolean_t is_vcc,
                                        apr_pool_t *pool)
 {
   int code;
@@ -473,7 +478,8 @@ static svn_error_t * checkout_resource(c
     }
 
   /* check out the Version Resource */
-  err = do_checkout(cc, rsrc->vsn_url, allow_404, token, &code, &locn, pool);
+  err = do_checkout(cc, rsrc->vsn_url, allow_404, token,
+                    is_vcc, &code, &locn, pool);
 
   /* possibly run the request again, with a re-fetched Version Resource */
   if (err == NULL && allow_404 && code == 404)
@@ -484,7 +490,8 @@ static svn_error_t * checkout_resource(c
       SVN_ERR(get_version_url(cc, NULL, rsrc, TRUE, pool));
 
       /* do it again, but don't allow a 404 this time */
-      err = do_checkout(cc, rsrc->vsn_url, FALSE, token, &code, &locn, pool);
+      err = do_checkout(cc, rsrc->vsn_url, FALSE, token,
+                        is_vcc, &code, &locn, pool);
     }
 
   /* special-case when conflicts occur */
@@ -711,10 +718,11 @@ static svn_error_t * commit_delete_entry
     }
 
   /* get the URL to the working collection */
-  SVN_ERR(checkout_resource(parent->cc, parent->rsrc, TRUE, NULL, pool));
+  SVN_ERR(checkout_resource(parent->cc, parent->rsrc, TRUE,
+                            NULL, FALSE, pool));
 
   /* create the URL for the child resource */
-  child = svn_path_url_add_component(parent->rsrc->wr_url, name, pool);
+  child = svn_path_url_add_component2(parent->rsrc->wr_url, name, pool);
 
   /* Start out assuming that we're deleting a file;  try to lookup the
      path itself in the token-hash, and if found, attach it to the If:
@@ -729,8 +737,8 @@ static svn_error_t * commit_delete_entry
           const char *token_header_val;
           const char *token_uri;
 
-          token_uri = svn_path_url_add_component(parent->cc->ras->url->data,
-                                                 path, pool);
+          token_uri = svn_path_url_add_component2(parent->cc->ras->url->data,
+                                                  path, pool);
           token_header_val = apr_psprintf(pool, "<%s> (<%s>)",
                                           token_uri, token);
           extra_headers = apr_hash_make(pool);
@@ -847,7 +855,8 @@ static svn_error_t * commit_add_dir(cons
 
   /* check out the parent resource so that we can create the new collection
      as one of its children. */
-  SVN_ERR(checkout_resource(parent->cc, parent->rsrc, TRUE, NULL, dir_pool));
+  SVN_ERR(checkout_resource(parent->cc, parent->rsrc, TRUE,
+                            NULL, FALSE, dir_pool));
 
   /* create a child object that contains all the resource urls */
   child = apr_pcalloc(dir_pool, sizeof(*child));
@@ -888,9 +897,9 @@ static svn_error_t * commit_add_dir(cons
          "source" argument to the COPY request.  The "Destination:"
          header given to COPY is simply the wr_url that is already
          part of the child object. */
-      copy_src = svn_path_url_add_component(bc_url.data,
-                                            bc_relative.data,
-                                            workpool);
+      copy_src = svn_path_url_add_component2(bc_url.data,
+                                             bc_relative.data,
+                                             workpool);
 
       /* Have neon do the COPY. */
       SVN_ERR(svn_ra_neon__copy(parent->cc->ras,
@@ -959,7 +968,7 @@ static svn_error_t * commit_change_dir_p
   record_prop_change(dir->pool, dir, name, value);
 
   /* do the CHECKOUT sooner rather than later */
-  SVN_ERR(checkout_resource(dir->cc, dir->rsrc, TRUE, NULL, pool));
+  SVN_ERR(checkout_resource(dir->cc, dir->rsrc, TRUE, NULL, FALSE, pool));
 
   /* Add this path to the valid targets hash. */
   add_valid_target(dir->cc, dir->rsrc->local_path, svn_nonrecursive);
@@ -1000,7 +1009,8 @@ static svn_error_t * commit_add_file(con
   */
 
   /* Do the parent CHECKOUT first */
-  SVN_ERR(checkout_resource(parent->cc, parent->rsrc, TRUE, NULL, workpool));
+  SVN_ERR(checkout_resource(parent->cc, parent->rsrc, TRUE,
+                            NULL, FALSE, workpool));
 
   /* Construct a file_baton that contains all the resource urls. */
   file = apr_pcalloc(file_pool, sizeof(*file));
@@ -1088,9 +1098,9 @@ static svn_error_t * commit_add_file(con
          "source" argument to the COPY request.  The "Destination:"
          header given to COPY is simply the wr_url that is already
          part of the file_baton. */
-      copy_src = svn_path_url_add_component(bc_url.data,
-                                            bc_relative.data,
-                                            workpool);
+      copy_src = svn_path_url_add_component2(bc_url.data,
+                                             bc_relative.data,
+                                             workpool);
 
       /* Have neon do the COPY. */
       SVN_ERR(svn_ra_neon__copy(parent->cc->ras,
@@ -1139,7 +1149,7 @@ static svn_error_t * commit_open_file(co
 
   /* do the CHECKOUT now. we'll PUT the new file contents later on. */
   SVN_ERR(checkout_resource(parent->cc, file->rsrc, TRUE,
-                            file->token, workpool));
+                            file->token, FALSE, workpool));
 
   /* ### wait for apply_txdelta before doing a PUT. it might arrive a
      ### "long time" from now. certainly after many other operations, so
@@ -1229,7 +1239,8 @@ static svn_error_t * commit_change_file_
   record_prop_change(file->pool, file, name, value);
 
   /* do the CHECKOUT sooner rather than later */
-  SVN_ERR(checkout_resource(file->cc, file->rsrc, TRUE, file->token, pool));
+  SVN_ERR(checkout_resource(file->cc, file->rsrc, TRUE,
+                            file->token, FALSE, pool));
 
   /* Add this path to the valid targets hash. */
   add_valid_target(file->cc, file->rsrc->local_path, svn_nonrecursive);
@@ -1271,9 +1282,9 @@ static svn_error_t * commit_close_file(v
         svn_ra_neon__set_header
           (extra_headers, "If",
            apr_psprintf(pool, "<%s> (<%s>)",
-                        svn_path_url_add_component(cc->ras->url->data,
-                                                   file->rsrc->url,
-                                                   request->pool),
+                        svn_path_url_add_component2(cc->ras->url->data,
+                                                    file->rsrc->url,
+                                                    request->pool),
                         file->token));
 
       if (pb->base_checksum)
@@ -1365,8 +1376,7 @@ static svn_error_t * apply_revprops(comm
                                     apr_pool_t *pool)
 {
   const char *vcc;
-  const svn_string_t *baseline_url;
-  version_rsrc_t baseline_rsrc = { SVN_INVALID_REVNUM };
+  version_rsrc_t vcc_rsrc = { SVN_INVALID_REVNUM };
   svn_error_t *err = NULL;
   int retry_count = 5;
 
@@ -1376,24 +1386,17 @@ static svn_error_t * apply_revprops(comm
   /* fetch the DAV:version-controlled-configuration from the session's URL */
   SVN_ERR(svn_ra_neon__get_vcc(&vcc, cc->ras, cc->ras->root.path, pool));
 
-  /* ### we should use DAV:apply-to-version on the CHECKOUT so we can skip
-     ### retrieval of the baseline */
 
   do {
 
     svn_error_clear(err);
 
-    /* Get the latest baseline from VCC's DAV:checked-in property.
-       This should give us the HEAD revision of the moment. */
-    SVN_ERR(svn_ra_neon__get_one_prop(&baseline_url, cc->ras,
-                                      vcc, NULL,
-                                      &svn_ra_neon__checked_in_prop, pool));
-    baseline_rsrc.pool = pool;
-    baseline_rsrc.vsn_url = baseline_url->data;
+    vcc_rsrc.pool = pool;
+    vcc_rsrc.vsn_url = vcc;
 
     /* To set the revision properties, we must checkout the latest baseline
        and get back a mutable "working" baseline.  */
-    err = checkout_resource(cc, &baseline_rsrc, FALSE, NULL, pool);
+    err = checkout_resource(cc, &vcc_rsrc, FALSE, NULL, TRUE, pool);
 
     /* There's a small chance of a race condition here, if apache is
        experiencing heavy commit concurrency or if the network has
@@ -1413,7 +1416,7 @@ static svn_error_t * apply_revprops(comm
   if (err)
     return err;
 
-  return svn_ra_neon__do_proppatch(cc->ras, baseline_rsrc.wr_url, revprop_table,
+  return svn_ra_neon__do_proppatch(cc->ras, vcc_rsrc.wr_url, revprop_table,
                                    NULL, NULL, pool);
 }
 

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/fetch.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/fetch.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/fetch.c Tue Aug 10 18:06:17 2010
@@ -1092,15 +1092,25 @@ svn_error_t *svn_ra_neon__get_latest_rev
 {
   svn_ra_neon__session_t *ras = session->priv;
 
-  /* ### should we perform an OPTIONS to validate the server we're about
-     ### to talk to? */
-
-  /* we don't need any of the baseline URLs and stuff, but this does
-     give us the latest revision number */
-  SVN_ERR(svn_ra_neon__get_baseline_info(NULL, NULL, NULL, latest_revnum,
-                                         ras, ras->root.path,
-                                         SVN_INVALID_REVNUM, pool));
-
+  /* If we detected HTTPv2 support, we can fetch the youngest revision
+     from a quick OPTIONS request instead of via a batch of
+     PROPFINDs. */
+  if (SVN_RA_NEON__HAVE_HTTPV2_SUPPORT(ras))
+    {
+      SVN_ERR(svn_ra_neon__exchange_capabilities(ras, latest_revnum, pool));
+      if (! SVN_IS_VALID_REVNUM(*latest_revnum))
+        return svn_error_create(SVN_ERR_RA_DAV_OPTIONS_REQ_FAILED, NULL,
+                                _("The OPTIONS response did not include "
+                                  "the youngest revision"));
+    }
+  else
+    {
+      /* We don't need any of the baseline URLs and stuff, but this
+         does give us the latest revision number.  */
+      SVN_ERR(svn_ra_neon__get_baseline_info(NULL, NULL, NULL, latest_revnum,
+                                             ras, ras->root.path,
+                                             SVN_INVALID_REVNUM, pool));
+    }
   SVN_ERR(svn_ra_neon__maybe_store_auth_info(ras, pool));
 
   return NULL;

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/get_locations.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/get_locations.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/get_locations.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/get_locations.c Tue Aug 10 18:06:17 2010
@@ -122,7 +122,7 @@ svn_ra_neon__get_locations(svn_ra_sessio
                            apr_hash_t **locations,
                            const char *relative_path,
                            svn_revnum_t peg_revision,
-                           apr_array_header_t *location_revisions,
+                           const apr_array_header_t *location_revisions,
                            apr_pool_t *pool)
 {
   svn_ra_neon__session_t *ras = session->priv;

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/log.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/log.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/log.c Tue Aug 10 18:06:17 2010
@@ -436,9 +436,9 @@ svn_error_t * svn_ra_neon__get_log(svn_r
             want_custom_revprops = TRUE;
         }
       if (revprops->nelts == 0)
-	{
-	  svn_stringbuf_appendcstr(request_body, "<S:no-revprops/>");
-	}
+        {
+          svn_stringbuf_appendcstr(request_body, "<S:no-revprops/>");
+        }
     }
   else
     {

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/mergeinfo.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/mergeinfo.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/mergeinfo.c Tue Aug 10 18:06:17 2010
@@ -176,6 +176,8 @@ svn_ra_neon__get_mergeinfo(svn_ra_sessio
   static const char minfo_report_tail[] =
     "</S:" SVN_DAV__MERGEINFO_REPORT ">" DEBUG_CR;
 
+  *catalog = NULL;
+
   /* Construct the request body. */
   svn_stringbuf_appendcstr(request_body, minfo_report_head);
   svn_stringbuf_appendcstr(request_body,
@@ -242,7 +244,7 @@ svn_ra_neon__get_mergeinfo(svn_ra_sessio
                                       FALSE,
                                       pool));
 
-  if (mb.err == SVN_NO_ERROR)
+  if (mb.err == SVN_NO_ERROR && apr_hash_count(mb.catalog))
     *catalog = mb.catalog;
 
   return mb.err;

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/options.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/options.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/options.c Tue Aug 10 18:06:17 2010
@@ -25,6 +25,7 @@
 
 #include "svn_pools.h"
 #include "svn_error.h"
+#include "svn_dirent_uri.h"
 #include "svn_private_config.h"
 #include "../libsvn_ra/ra_loader.h"
 
@@ -107,7 +108,9 @@ end_element(void *baton, int state,
   options_ctx_t *oc = baton;
 
   if (state == ELEM_href)
-    oc->activity_coll = svn_string_create_from_buf(oc->cdata, oc->pool);
+    oc->activity_coll = svn_string_create(svn_uri_canonicalize(oc->cdata->data,
+                                                               oc->pool),
+                                          oc->pool);
 
   return SVN_NO_ERROR;
 }
@@ -125,14 +128,21 @@ static const char *capability_server_yes
 
 /* Store in RAS the capabilities and other interesting tidbits of
    information discovered from REQ's headers.  Use POOL for temporary
-   allocation only. */
+   allocation only.
+
+   Also, set *YOUNGEST_REV to the current youngest revision if we can
+   detect that from the OPTIONS exchange; set it to SVN_INVALID_REVNUM
+   otherwise.  */
 static void
 parse_capabilities(ne_request *req,
                    svn_ra_neon__session_t *ras,
+                   svn_revnum_t *youngest_rev,
                    apr_pool_t *pool)
 {
   const char *val;
 
+  *youngest_rev = SVN_INVALID_REVNUM;
+
   /* Start out assuming all capabilities are unsupported. */
   apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_DEPTH,
                APR_HASH_KEY_STRING, capability_no);
@@ -194,11 +204,10 @@ parse_capabilities(ne_request *req,
     }
 
   /* Not strictly capabilities, but while we're here, we might as well... */
-#if 0
   if ((val = ne_get_response_header(req, SVN_DAV_YOUNGEST_REV_HEADER)))
     {
+      *youngest_rev = SVN_STR_TO_REV(val);
     }
-#endif
   if ((val = ne_get_response_header(req, SVN_DAV_REPOS_UUID_HEADER)))
     {
       ras->uuid = apr_pstrdup(ras->pool, val);
@@ -240,6 +249,7 @@ parse_capabilities(ne_request *req,
 
 svn_error_t *
 svn_ra_neon__exchange_capabilities(svn_ra_neon__session_t *ras,
+                                   svn_revnum_t *youngest_rev,
                                    apr_pool_t *pool)
 {
   svn_ra_neon__request_t* req;
@@ -252,6 +262,8 @@ svn_ra_neon__exchange_capabilities(svn_r
   oc.pool = pool;
   oc.cdata = svn_stringbuf_create("", pool);
 
+  *youngest_rev = SVN_INVALID_REVNUM;
+
   req = svn_ra_neon__request_create(ras, "OPTIONS", ras->url->data, pool);
 
   /* ### Use a symbolic name somewhere for this MIME type? */
@@ -295,7 +307,7 @@ svn_ra_neon__exchange_capabilities(svn_r
     }
 
   ras->act_coll = apr_pstrdup(ras->pool, oc.activity_coll->data);
-  parse_capabilities(req->ne_req, ras, pool);
+  parse_capabilities(req->ne_req, ras, youngest_rev, pool);
 
  cleanup:
   svn_ra_neon__request_destroy(req);
@@ -309,8 +321,9 @@ svn_ra_neon__get_activity_collection(con
                                      svn_ra_neon__session_t *ras,
                                      apr_pool_t *pool)
 {
+  svn_revnum_t ignored_revnum;
   if (! ras->act_coll)
-    SVN_ERR(svn_ra_neon__exchange_capabilities(ras, pool));
+    SVN_ERR(svn_ra_neon__exchange_capabilities(ras, &ignored_revnum, pool));
   *activity_coll = svn_string_create(ras->act_coll, pool);
   return SVN_NO_ERROR;
 }
@@ -338,7 +351,10 @@ svn_ra_neon__has_capability(svn_ra_sessi
 
   /* If any capability is unknown, they're all unknown, so ask. */
   if (cap_result == NULL)
-    SVN_ERR(svn_ra_neon__exchange_capabilities(ras, pool));
+    {
+      svn_revnum_t ignored_revnum;
+      SVN_ERR(svn_ra_neon__exchange_capabilities(ras, &ignored_revnum, pool));
+    }
 
 
   /* Try again, now that we've fetched the capabilities. */

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/props.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/props.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/props.c Tue Aug 10 18:06:17 2010
@@ -413,7 +413,8 @@ static svn_error_t * end_element(void *b
     case ELEM_href:
       /* Special handling for <href> that belongs to the <response> tag. */
       if (rsrc->href_parent == ELEM_response)
-        return assign_rsrc_url(pc->rsrc, cdata, pc->pool);
+        return assign_rsrc_url(pc->rsrc, svn_uri_canonicalize(cdata, pc->pool),
+                               pc->pool);
 
       /* Use the parent element's name, not the href. */
       parent_defn = defn_from_id(rsrc->href_parent);
@@ -424,7 +425,8 @@ static svn_error_t * end_element(void *b
 
       /* All other href's we'll treat as property values. */
       name = parent_defn->name;
-      value = svn_string_create(cdata, pc->pool);
+      value = svn_string_create(svn_uri_canonicalize(cdata, pc->pool),
+                                pc->pool);
       break;
 
     default:
@@ -1089,7 +1091,7 @@ svn_error_t *
 svn_ra_neon__do_proppatch(svn_ra_neon__session_t *ras,
                           const char *url,
                           apr_hash_t *prop_changes,
-                          apr_array_header_t *prop_deletes,
+                          const apr_array_header_t *prop_deletes,
                           apr_hash_t *extra_headers,
                           apr_pool_t *pool)
 {

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/ra_neon.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/ra_neon.h?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/ra_neon.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/ra_neon.h Tue Aug 10 18:06:17 2010
@@ -82,7 +82,7 @@ typedef struct {
 
 
 
-typedef struct {
+typedef struct svn_ra_neon__session_t {
   apr_pool_t *pool;
   svn_stringbuf_t *url;                 /* original, unparsed session url */
   ne_uri root;                          /* parsed version of above */
@@ -113,6 +113,9 @@ typedef struct {
   svn_ra_progress_notify_func_t progress_func;
   void *progress_baton;
 
+  apr_off_t total_progress;             /* Total number of bytes sent in this
+                                           session with a -1 total marker */
+
   /* Maps SVN_RA_CAPABILITY_foo keys to "yes" or "no" values.
      If a capability is not yet discovered, it is absent from the table.
      The table itself is allocated in the svn_ra_neon__session_t's pool;
@@ -567,7 +570,7 @@ svn_error_t *svn_ra_neon__get_vcc(const 
 svn_error_t *svn_ra_neon__do_proppatch(svn_ra_neon__session_t *ras,
                                        const char *url,
                                        apr_hash_t *prop_changes,
-                                       apr_array_header_t *prop_deletes,
+                                       const apr_array_header_t *prop_deletes,
                                        apr_hash_t *extra_headers,
                                        apr_pool_t *pool);
 
@@ -973,6 +976,7 @@ svn_ra_neon__copy(svn_ra_neon__session_t
                   apr_pool_t *pool);
 
 /* Return the Location HTTP header or NULL if none was sent.
+ * (Return a canonical URL even if the header ended with a slash.)
  *
  * Do allocations in POOL.
  */
@@ -988,7 +992,7 @@ svn_ra_neon__get_locations(svn_ra_sessio
                            apr_hash_t **locations,
                            const char *path,
                            svn_revnum_t peg_revision,
-                           apr_array_header_t *location_revisions,
+                           const apr_array_header_t *location_revisions,
                            apr_pool_t *pool);
 
 
@@ -1086,10 +1090,15 @@ svn_ra_neon__has_capability(svn_ra_sessi
    RAS->capabilities with the server's capabilities as read from the
    response headers.  Use POOL only for temporary allocation.
 
-   NOTE:  This function also expects the server to announce the
+   If the server is kind enough to tell us the current youngest
+   revision of the target repository, set *YOUNGEST_REV to that value;
+   set it to SVN_INVALID_REVNUM otherwise.
+
+  NOTE:  This function also expects the server to announce the
    activity collection.  */
 svn_error_t *
 svn_ra_neon__exchange_capabilities(svn_ra_neon__session_t *ras,
+                                   svn_revnum_t *youngest_rev,
                                    apr_pool_t *pool);
 
 /*

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/session.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/session.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/session.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/session.c Tue Aug 10 18:06:17 2010
@@ -680,8 +680,8 @@ ra_neon_get_schemes(apr_pool_t *pool)
 
 typedef struct neonprogress_baton_t
 {
-  svn_ra_progress_notify_func_t progress_func;
-  void *progress_baton;
+  svn_ra_neon__session_t *ras;
+  apr_off_t last_progress;
   apr_pool_t *pool;
 } neonprogress_baton_t;
 
@@ -692,12 +692,36 @@ ra_neon_neonprogress(void *baton, ne_off
 ra_neon_neonprogress(void *baton, off_t progress, off_t total)
 #endif /* SVN_NEON_0_27 */
 {
-  const neonprogress_baton_t *neonprogress_baton = baton;
-  if (neonprogress_baton->progress_func)
+  neonprogress_baton_t *pb = baton;
+  svn_ra_neon__session_t *ras = pb->ras;
+
+ if (ras->progress_func)
     {
-      neonprogress_baton->progress_func(progress, total,
-                                        neonprogress_baton->progress_baton,
-                                        neonprogress_baton->pool);
+      if (total < 0)
+        {
+          /* Neon sends the total number of bytes sent for this specific
+             session and there are two sessions active at once.
+
+             For this case we combine the totals to allow clients to provide
+             a better progress indicator. */
+
+          if (progress >= pb->last_progress)
+            ras->total_progress += (progress - pb->last_progress);
+          else
+            /* Session total has been reset. A new stream started */
+            ras->total_progress += pb->last_progress;
+
+          pb->last_progress = progress;
+
+          ras->progress_func(ras->total_progress, -1, ras->progress_baton,
+                             pb->pool);
+        }
+      else
+        {
+          /* Neon provides total bytes to receive information. Pass literaly
+             to allow providing a percentage. */
+          ras->progress_func(progress, total, ras->progress_baton, pb->pool);
+        }
     }
 }
 
@@ -761,13 +785,13 @@ svn_ra_neon__open(svn_ra_session_t *sess
   svn_boolean_t compression;
   svn_config_t *cfg, *cfg_client;
   const char *server_group;
-  char *itr;
   unsigned int neon_auth_types = 0;
   const char *pkcs11_provider;
-  neonprogress_baton_t *neonprogress_baton =
-    apr_pcalloc(pool, sizeof(*neonprogress_baton));
   const char *useragent = NULL;
   const char *client_string = NULL;
+  svn_revnum_t ignored_revnum;
+
+  SVN_ERR_ASSERT(svn_uri_is_canonical(repos_URL, pool));
 
   if (callbacks->get_client_string)
     callbacks->get_client_string(callback_baton, &client_string, pool);
@@ -790,16 +814,7 @@ svn_ra_neon__open(svn_ra_session_t *sess
   /* we want to know if the repository is actually somewhere else */
   /* ### not yet: http_redirect_register(sess, ... ); */
 
-  /* HACK!  Neon uses strcmp when checking for https, but RFC 2396 says
-   * we should be using case-insensitive comparisons when checking for
-   * URI schemes.  To allow our users to use WeIrd CasE HttPS we force
-   * the scheme to lower case before we pass it on to Neon, otherwise we
-   * would crash later on when we assume Neon has set up its https stuff
-   * but it really didn't. */
-  for (itr = uri->scheme; *itr; ++itr)
-    *itr = tolower(*itr);
-
-  is_ssl_session = (svn_cstring_casecmp(uri->scheme, "https") == 0);
+  is_ssl_session = (strcmp(uri->scheme, "https") == 0);
   if (is_ssl_session)
     {
       if (ne_has_support(NE_FEATURE_SSL) == 0)
@@ -974,10 +989,10 @@ svn_ra_neon__open(svn_ra_session_t *sess
               ca_cert = ne_ssl_cert_read(file);
               if (ca_cert == NULL)
                 {
-                  return svn_error_createf
-                    (SVN_ERR_BAD_CONFIG_VALUE, NULL,
-                     _("Invalid config: unable to load certificate file '%s'"),
-                     svn_path_local_style(file, pool));
+                  return svn_error_createf(
+                    SVN_ERR_BAD_CONFIG_VALUE, NULL,
+                    _("Invalid config: unable to load certificate file '%s'"),
+                    svn_dirent_local_style(file, pool));
                 }
               ne_ssl_trust_cert(sess, ca_cert);
               ne_ssl_trust_cert(sess2, ca_cert);
@@ -1039,14 +1054,25 @@ svn_ra_neon__open(svn_ra_session_t *sess
           ne_ssl_trust_default_ca(sess2);
         }
     }
-  neonprogress_baton->pool = pool;
-  neonprogress_baton->progress_baton = callbacks->progress_baton;
-  neonprogress_baton->progress_func = callbacks->progress_func;
-  ne_set_progress(sess, ra_neon_neonprogress, neonprogress_baton);
-  ne_set_progress(sess2, ra_neon_neonprogress, neonprogress_baton);
+
+  if (ras->progress_func)
+    {
+      neonprogress_baton_t *progress1 = apr_pcalloc(pool, sizeof(*progress1));
+      neonprogress_baton_t *progress2 = apr_pcalloc(pool, sizeof(*progress2));
+
+      progress1->pool = pool;
+      progress1->ras = ras;
+      progress1->last_progress = 0;
+
+      *progress2 = *progress1;
+
+      ne_set_progress(sess, ra_neon_neonprogress, progress1);
+      ne_set_progress(sess2, ra_neon_neonprogress, progress2);
+    }
+
   session->priv = ras;
 
-  return svn_ra_neon__exchange_capabilities(ras, pool);
+  return svn_ra_neon__exchange_capabilities(ras, &ignored_revnum, pool);
 }
 
 
@@ -1177,7 +1203,7 @@ static const svn_ra__vtable_t neon_vtabl
   svn_ra_neon__has_capability,
   svn_ra_neon__replay_range,
   svn_ra_neon__get_deleted_rev,
-  NULL  /* svn_ra_neon__obliterate_node_rev */
+  NULL  /* svn_ra_neon__obliterate_path_rev */
 };
 
 svn_error_t *

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/util.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/util.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_neon/util.c Tue Aug 10 18:06:17 2010
@@ -1084,11 +1084,29 @@ wrapper_endelm_cb(void *baton,
   return 0;
 }
 
+/* If XML_PARSER found an XML parse error, then return a Subversion error
+ * saying that the error was found in the response to the DAV request METHOD
+ * for the URL URL. Otherwise, return SVN_NO_ERROR. */
+static svn_error_t *
+check_parse_error(const char *method,
+                  ne_xml_parser *xml_parser,
+                  const char *url)
+{
+  const char *msg = ne_xml_get_error(xml_parser);
+  if (msg != NULL && *msg != '\0')
+    return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
+                             _("The %s request returned invalid XML "
+                               "in the response: %s (%s)"),
+                             method, msg, url);
+  return SVN_NO_ERROR;
+}
+
 static int
 wrapper_reader_cb(void *baton, const char *data, size_t len)
 {
   parser_wrapper_baton_t *pwb = baton;
   svn_ra_neon__session_t *sess = pwb->req->sess;
+  int parser_status;
 
   if (pwb->req->err)
     return 1;
@@ -1101,7 +1119,16 @@ wrapper_reader_cb(void *baton, const cha
   if (pwb->req->err)
     return 1;
 
-  return ne_xml_parse(pwb->parser, data, len);
+  parser_status = ne_xml_parse(pwb->parser, data, len);
+  if (parser_status)
+    {
+      /* Pass XML parser error. */
+      SVN_RA_NEON__REQ_ERR(pwb->req,
+                           check_parse_error(pwb->req->method, pwb->parser,
+                                             pwb->req->url));
+    }
+
+  return parser_status;
 }
 
 ne_xml_parser *
@@ -1194,7 +1221,6 @@ parsed_request(svn_ra_neon__request_t *r
                apr_pool_t *pool)
 {
   ne_xml_parser *success_parser = NULL;
-  const char *msg;
   spool_reader_baton_t spool_reader_baton;
 
   if (body == NULL)
@@ -1261,13 +1287,7 @@ parsed_request(svn_ra_neon__request_t *r
         }
     }
 
-  /* was there an XML parse error somewhere? */
-  msg = ne_xml_get_error(success_parser);
-  if (msg != NULL && *msg != '\0')
-    return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
-                             _("The %s request returned invalid XML "
-                               "in the response: %s (%s)"),
-                             method, msg, url);
+  SVN_ERR(check_parse_error(method, success_parser, url));
 
   return SVN_NO_ERROR;
 }
@@ -1490,5 +1510,5 @@ svn_ra_neon__request_get_location(svn_ra
                                   apr_pool_t *pool)
 {
   const char *val = ne_get_response_header(request->ne_req, "Location");
-  return val ? apr_pstrdup(pool, val) : NULL;
+  return val ? svn_uri_canonicalize(val, pool) : NULL;
 }

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_serf/auth_kerb.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_serf/auth_kerb.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_serf/auth_kerb.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_serf/auth_kerb.c Tue Aug 10 18:06:17 2010
@@ -199,19 +199,19 @@ gss_api_get_credentials(char *token, apr
 
   /* Establish a security context to the server. */
   maj_stat = gss_init_sec_context
-    (&min_stat,		        /* minor_status */
-     GSS_C_NO_CREDENTIAL,	/* XXXXX claimant_cred_handle */
-     &gss_api_ctx->gss_ctx,    	/* gssapi context handle */
-     host_gss_name,    		/* HTTP@server name */
-     gss_api_ctx->mech,	        /* mech_type (0 ininitially */
+    (&min_stat,                 /* minor_status */
+     GSS_C_NO_CREDENTIAL,       /* XXXXX claimant_cred_handle */
+     &gss_api_ctx->gss_ctx,     /* gssapi context handle */
+     host_gss_name,             /* HTTP@server name */
+     gss_api_ctx->mech,         /* mech_type (0 ininitially */
      GSS_C_MUTUAL_FLAG,         /* ensure the peer authenticates itself */
-     0,       	                /* default validity period */
+     0,                         /* default validity period */
      GSS_C_NO_CHANNEL_BINDINGS, /* do not use channel bindings */
      &input_buf,                /* server token, initially empty */
      &gss_api_ctx->mech,        /* actual mech type */
-     &output_buf,		/* output_token */
-     NULL,         		/* ret_flags */
-     NULL		        /* not interested in remaining validity */
+     &output_buf,               /* output_token */
+     NULL,                      /* ret_flags */
+     NULL                       /* not interested in remaining validity */
      );
 
   if(GSS_ERROR(maj_stat))

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_serf/auth_kerb.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_serf/auth_kerb.h?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_serf/auth_kerb.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_ra_serf/auth_kerb.h Tue Aug 10 18:06:17 2010
@@ -35,25 +35,25 @@ extern "C" {
    based on the response of the server. */
 svn_error_t *
 svn_ra_serf__handle_kerb_auth(svn_ra_serf__handler_t *ctx,
-			      serf_request_t *request,
-			      serf_bucket_t *response,
-			      const char *auth_hdr,
-			      const char *auth_attr,
-			      apr_pool_t *pool);
+                              serf_request_t *request,
+                              serf_bucket_t *response,
+                              const char *auth_hdr,
+                              const char *auth_attr,
+                              apr_pool_t *pool);
 
 /* Initializes a new connection based on the info stored in the session
    object. */
 svn_error_t *
 svn_ra_serf__init_kerb_connection(svn_ra_serf__session_t *session,
-				  svn_ra_serf__connection_t *conn,
-				  apr_pool_t *pool);
+                                  svn_ra_serf__connection_t *conn,
+                                  apr_pool_t *pool);
 
 
 svn_error_t *
 svn_ra_serf__setup_request_kerb_auth(svn_ra_serf__connection_t *conn,
-				     const char *method,
-				     const char *uri,
-				     serf_bucket_t *hdrs_bkt);
+                                     const char *method,
+                                     const char *uri,
+                                     serf_bucket_t *hdrs_bkt);
 
 svn_error_t *
 svn_ra_serf__validate_response_kerb_auth(svn_ra_serf__handler_t *ctx,