subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1623815 - in /subversion/branches/log-message-templates: ./ subversion/include/ subversion/libsvn_fs/ subversion/libsvn_fs_fs/ subversion/libsvn_repos/ subversion/svnlook/ subversion/tests/cmdline/ subversion/tests/libsvn_fs_fs/ subversion...
Date Tue, 09 Sep 2014 12:47:46 GMT
Author: stsp
Date: Tue Sep  9 12:47:45 2014
New Revision: 1623815

URL: http://svn.apache.org/r1623815
Log:
On the log-message-templates branch, sync with trunk.

Added:
    subversion/branches/log-message-templates/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c
      - copied unchanged from r1623794, subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c
    subversion/branches/log-message-templates/tools/client-side/svn-vendor.py
      - copied unchanged from r1623794, subversion/trunk/tools/client-side/svn-vendor.py
Modified:
    subversion/branches/log-message-templates/   (props changed)
    subversion/branches/log-message-templates/COMMITTERS
    subversion/branches/log-message-templates/build.conf
    subversion/branches/log-message-templates/subversion/include/svn_error_codes.h
    subversion/branches/log-message-templates/subversion/libsvn_fs/fs-loader.c
    subversion/branches/log-message-templates/subversion/libsvn_fs_fs/cached_data.c
    subversion/branches/log-message-templates/subversion/libsvn_fs_fs/caching.c
    subversion/branches/log-message-templates/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/log-message-templates/subversion/libsvn_fs_fs/hotcopy.c
    subversion/branches/log-message-templates/subversion/libsvn_fs_fs/id.c
    subversion/branches/log-message-templates/subversion/libsvn_fs_fs/id.h
    subversion/branches/log-message-templates/subversion/libsvn_fs_fs/index.c
    subversion/branches/log-message-templates/subversion/libsvn_fs_fs/low_level.c
    subversion/branches/log-message-templates/subversion/libsvn_fs_fs/pack.c
    subversion/branches/log-message-templates/subversion/libsvn_fs_fs/recovery.c
    subversion/branches/log-message-templates/subversion/libsvn_fs_fs/rev_file.c
    subversion/branches/log-message-templates/subversion/libsvn_fs_fs/tree.c
    subversion/branches/log-message-templates/subversion/libsvn_fs_fs/util.c
    subversion/branches/log-message-templates/subversion/libsvn_fs_fs/util.h
    subversion/branches/log-message-templates/subversion/libsvn_fs_fs/verify.c
    subversion/branches/log-message-templates/subversion/libsvn_repos/replay.c
    subversion/branches/log-message-templates/subversion/svnlook/svnlook.c
    subversion/branches/log-message-templates/subversion/tests/cmdline/basic_tests.py
    subversion/branches/log-message-templates/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
    subversion/branches/log-message-templates/subversion/tests/libsvn_fs_x/   (props changed)
    subversion/branches/log-message-templates/subversion/tests/libsvn_fs_x/fs-x-pack-test.c

Propchange: subversion/branches/log-message-templates/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1622492-1623794

Modified: subversion/branches/log-message-templates/COMMITTERS
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/COMMITTERS?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/COMMITTERS [UTF-8] (original)
+++ subversion/branches/log-message-templates/COMMITTERS [UTF-8] Tue Sep  9 12:47:45 2014
@@ -98,6 +98,8 @@ Commit access for specific areas:
           sage   Sage LaTorra <sagelt@gmail.com>             (Ctypes-Python b.)
           vmpn   Vladimir Berezniker <vmpn@hitechman.com>    (JavaHL bindings)
        rschupp   Roderich Schupp <roderich.schupp@gmail.com> (Swig bindings)
+        stilor   Alexey Neyman <stilor@att.net>              (Python bindings,
+                                                             svn-vendor.py)
 
   Packages:
 

Modified: subversion/branches/log-message-templates/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/build.conf?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/build.conf (original)
+++ subversion/branches/log-message-templates/build.conf Tue Sep  9 12:47:45 2014
@@ -810,6 +810,15 @@ install = test
 libs = libsvn_test libsvn_fs libsvn_fs_fs libsvn_delta
        libsvn_subr apriconv apr
 
+[fs-fs-fuzzy-test]
+description = Use fuzzying to test FSFS corruption resilience
+type = exe
+path = subversion/tests/libsvn_fs_fs
+sources = fs-fs-fuzzy-test.c
+install = sub-test
+libs = libsvn_test libsvn_fs libsvn_fs_fs libsvn_delta
+       libsvn_repos libsvn_subr apriconv apr
+
 # ----------------------------------------------------------------------------
 # Tests for libsvn_fs_x
 [fs-x-pack-test]
@@ -1464,8 +1473,8 @@ libs = svn svnadmin svndumpfilter svnloo
 type = project
 path = build/win32
 libs = __ALL__
-       fs-test fs-base-test fs-fsfs-test fs-fs-pack-test fs-x-pack-test
-       string-table-test
+       fs-test fs-base-test fs-fsfs-test fs-fs-pack-test fs-fs-fuzzy-test
+       fs-x-pack-test string-table-test
        skel-test strings-reps-test changes-test locks-test
        repos-test dump-load-test
        checksum-test compat-test config-test hashdump-test mergeinfo-test

Modified: subversion/branches/log-message-templates/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/include/svn_error_codes.h?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/log-message-templates/subversion/include/svn_error_codes.h Tue Sep  9 12:47:45 2014
@@ -856,6 +856,11 @@ SVN_ERROR_START
              SVN_ERR_FS_CATEGORY_START + 61,
              "Container capacity exceeded.")
 
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_FS_MALFORMED_NODEREV_ID,
+             SVN_ERR_FS_CATEGORY_START + 62,
+             "Malformed node revision ID string.")
+
   /* repos errors */
 
   SVN_ERRDEF(SVN_ERR_REPOS_LOCKED,

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs/fs-loader.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs/fs-loader.c Tue Sep  9 12:47:45 2014
@@ -558,6 +558,13 @@ svn_fs_upgrade2(const char *path,
   return SVN_NO_ERROR;
 }
 
+/* A warning handling function that does not abort on errors,
+   but just lets them be returned normally.  */
+static void
+verify_fs_warning_func(void *baton, svn_error_t *err)
+{
+}
+
 svn_error_t *
 svn_fs_verify(const char *path,
               apr_hash_t *fs_config,
@@ -574,6 +581,7 @@ svn_fs_verify(const char *path,
 
   SVN_ERR(fs_library_vtable(&vtable, path, pool));
   fs = fs_new(fs_config, pool);
+  svn_fs_set_warning_func(fs, verify_fs_warning_func, NULL);
 
   SVN_ERR(vtable->verify_fs(fs, path, start, end,
                             notify_func, notify_baton,

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs_fs/cached_data.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs_fs/cached_data.c Tue Sep  9 12:47:45 2014
@@ -2393,7 +2393,7 @@ read_dir_entries(apr_array_header_t *ent
                            _("Directory entry corrupt in '%s'"),
                            svn_fs_fs__id_unparse(id, scratch_pool)->data);
 
-      dirent->id = svn_fs_fs__id_parse(str, result_pool);
+      SVN_ERR(svn_fs_fs__id_parse(&dirent->id, str, result_pool));
 
       /* In incremental mode, update the hash; otherwise, write to the
        * final array.  Be sure to use hash keys that survive this iteration.

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs_fs/caching.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs_fs/caching.c Tue Sep  9 12:47:45 2014
@@ -347,7 +347,6 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
   fs_fs_data_t *ffd = fs->fsap_data;
   const char *prefix = apr_pstrcat(pool,
                                    "fsfs:", fs->uuid,
-                                   ":", ffd->instance_id,
                                    "/", normalize_key_part(fs->path, pool),
                                    ":",
                                    SVN_VA_NULL);
@@ -774,7 +773,6 @@ svn_fs_fs__initialize_txn_caches(svn_fs_
      Therefore, throw in a uuid as well - just to be sure. */
   const char *prefix = apr_pstrcat(pool,
                                    "fsfs:", fs->uuid,
-                                   ":", ffd->instance_id,
                                    "/", fs->path,
                                    ":", txn_id,
                                    ":", svn_uuid_generate(pool), ":",

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs_fs/fs_fs.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs_fs/fs_fs.c Tue Sep  9 12:47:45 2014
@@ -949,19 +949,14 @@ write_config(svn_fs_t *fs,
 "# " CONFIG_OPTION_BLOCK_SIZE " = 64"                                        NL
 "###"                                                                        NL
 "### The log-to-phys index maps data item numbers to offsets within the"     NL
-"### rev or pack file.  A revision typically contains 2 .. 5 such items"     NL
-"### per changed path.  For each revision, at least one page is being"       NL
-"### allocated in the l2p index with unused parts resulting in no wasted"    NL
-"### space."                                                                 NL
-"### Changing this parameter only affects larger revisions with thousands"   NL
-"### of changed paths.  A smaller value means that more pages need to be"    NL
-"### allocated for such revisions, increasing the size of the page table"    NL
-"### meaning it takes longer to read that table (once).  Access to each"     NL
-"### page is then faster because less data has to read.  So, if you have"    NL
-"### several extremely large revisions (approaching 1 mio changes),  think"  NL
+"### rev or pack file.  This index is organized in pages of a fixed maximum" NL
+"### capacity.  To access an item, the page table and the respective page"   NL
+"### must be read."                                                          NL
+"### This parameter only affects revisions with thousands of changed paths." NL
+"### If you have several extremely large revisions (~1 mio changes), think"  NL
 "### about increasing this setting.  Reducing the value will rarely result"  NL
 "### in a net speedup."                                                      NL
-"### This is an expert setting.  Any non-zero value is possible."            NL
+"### This is an expert setting.  Must be a power of 2."                      NL
 "### l2p-page-size is 8192 entries by default."                              NL
 "# " CONFIG_OPTION_L2P_PAGE_SIZE " = 8192"                                   NL
 "###"                                                                        NL
@@ -1855,9 +1850,9 @@ svn_fs_fs__get_node_origin(const svn_fs_
         = apr_hash_get(node_origins, node_id_ptr, len);
 
       if (origin_id_str)
-        *origin_id = svn_fs_fs__id_parse(apr_pstrdup(pool,
-                                                     origin_id_str->data),
-                                         pool);
+        SVN_ERR(svn_fs_fs__id_parse(origin_id,
+                                    apr_pstrdup(pool, origin_id_str->data),
+                                    pool));
     }
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs_fs/hotcopy.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs_fs/hotcopy.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs_fs/hotcopy.c (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs_fs/hotcopy.c Tue Sep  9 12:47:45 2014
@@ -1175,8 +1175,8 @@ svn_fs_fs__hotcopy(svn_fs_t *src_fs,
   hbb.notify_baton = notify_baton;
   hbb.cancel_func = cancel_func;
   hbb.cancel_baton = cancel_baton;
-  SVN_ERR(svn_fs_fs__with_write_lock(dst_fs, hotcopy_locking_src_body, &hbb,
-                                     pool));
+  SVN_ERR(svn_fs_fs__with_all_locks(dst_fs, hotcopy_locking_src_body, &hbb,
+                                    pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs_fs/id.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs_fs/id.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs_fs/id.c (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs_fs/id.c Tue Sep  9 12:47:45 2014
@@ -494,10 +494,11 @@ svn_fs_fs__id_copy(const svn_fs_id_t *so
   return (svn_fs_id_t *)new_id;
 }
 
-
-svn_fs_id_t *
-svn_fs_fs__id_parse(char *data,
-                    apr_pool_t *pool)
+/* Return an ID resulting from parsing the string DATA, or NULL if DATA is
+   an invalid ID string. *DATA will be modified / invalidated by this call. */
+static svn_fs_id_t *
+id_parse(char *data,
+         apr_pool_t *pool)
 {
   fs_fs__id_t *id;
   char *str;
@@ -573,6 +574,21 @@ svn_fs_fs__id_parse(char *data,
   return (svn_fs_id_t *)id;
 }
 
+svn_error_t *
+svn_fs_fs__id_parse(const svn_fs_id_t **id_p,
+                    char *data,
+                    apr_pool_t *pool)
+{
+  svn_fs_id_t *id = id_parse(data, pool);
+  if (id == NULL)
+    return svn_error_createf(SVN_ERR_FS_MALFORMED_NODEREV_ID, NULL,
+                             "Malformed node revision ID string");
+
+  *id_p = id;
+
+  return SVN_NO_ERROR;
+}
+
 /* (de-)serialization support */
 
 /* Serialize an ID within the serialization CONTEXT.

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs_fs/id.h
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs_fs/id.h?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs_fs/id.h (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs_fs/id.h Tue Sep  9 12:47:45 2014
@@ -149,10 +149,13 @@ svn_fs_id_t *svn_fs_fs__id_rev_create(co
 svn_fs_id_t *svn_fs_fs__id_copy(const svn_fs_id_t *id,
                                 apr_pool_t *pool);
 
-/* Return an ID resulting from parsing the string DATA, or NULL if DATA is
-   an invalid ID string. *DATA will be modified / invalidated by this call. */
-svn_fs_id_t *svn_fs_fs__id_parse(char *data,
-                                 apr_pool_t *pool);
+/* Return an ID in *ID_P resulting from parsing the string DATA, or an error
+   if DATA is an invalid ID string. *DATA will be modified / invalidated by
+   this call. */
+svn_error_t *
+svn_fs_fs__id_parse(const svn_fs_id_t **id_p,
+                    char *data,
+                    apr_pool_t *pool);
 
 
 /* (de-)serialization support*/

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs_fs/index.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs_fs/index.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs_fs/index.c (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs_fs/index.c Tue Sep  9 12:47:45 2014
@@ -766,17 +766,37 @@ get_l2p_header_body(l2p_header_t **heade
   SVN_ERR(auto_open_l2p_index(rev_file, fs, revision));
   packed_stream_seek(rev_file->l2p_stream, 0);
 
-  /* read the table sizes */
+  /* Read the table sizes.  Check the data for plausibility and
+   * consistency with other bits. */
   SVN_ERR(packed_stream_get(&value, rev_file->l2p_stream));
   result->first_revision = (svn_revnum_t)value;
+  if (result->first_revision != rev_file->start_revision)
+    return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                  _("Index rev / pack file revision numbers do not match"));
+
   SVN_ERR(packed_stream_get(&value, rev_file->l2p_stream));
   result->page_size = (apr_uint32_t)value;
+  if (!result->page_size || (result->page_size & (result->page_size - 1)))
+    return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                            _("L2P index page size is not a power of two"));
+
   SVN_ERR(packed_stream_get(&value, rev_file->l2p_stream));
   result->revision_count = (int)value;
+  if (   result->revision_count != 1
+      && result->revision_count != ffd->max_files_per_dir)
+    return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                            _("Invalid number of revisions in L2P index"));
+
   SVN_ERR(packed_stream_get(&value, rev_file->l2p_stream));
   page_count = (apr_size_t)value;
+  if (page_count < result->revision_count)
+    return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                            _("Fewer L2P index pages than revisions"));
+  if (page_count > (rev_file->p2l_offset - rev_file->l2p_offset) / 2)
+    return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                            _("L2P index page count implausibly large"));
 
-  if (result->first_revision > revision
+  if (   result->first_revision > revision
       || result->first_revision + result->revision_count <= revision)
     return svn_error_createf(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
                       _("Corrupt L2P index for r%ld only covers r%ld:%ld"),
@@ -797,16 +817,36 @@ get_l2p_header_body(l2p_header_t **heade
   for (i = 0; i < result->revision_count; ++i)
     {
       SVN_ERR(packed_stream_get(&value, rev_file->l2p_stream));
+      if (value == 0)
+        return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                                _("Revision with no L2P index pages"));
+
       page_table_index += (apr_size_t)value;
+      if (page_table_index > page_count)
+        return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                                _("L2P page table exceeded"));
+
       result->page_table_index[i+1] = page_table_index;
     }
 
+  if (page_table_index != page_count)
+    return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                 _("Revisions do not cover the full L2P index page table"));
+
   /* read actual page tables */
   for (page = 0; page < page_count; ++page)
     {
       SVN_ERR(packed_stream_get(&value, rev_file->l2p_stream));
+      if (value == 0)
+        return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                                _("Empty L2P index page"));
+
       result->page_table[page].size = (apr_uint32_t)value;
       SVN_ERR(packed_stream_get(&value, rev_file->l2p_stream));
+      if (value > result->page_size)
+        return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                                _("Page exceeds L2P index page size"));
+
       result->page_table[page].entry_count = (apr_uint32_t)value;
     }
 
@@ -1818,15 +1858,31 @@ get_p2l_header(p2l_header_t **header,
   /* allocate result data structure */
   result = apr_pcalloc(pool, sizeof(*result));
   
-  /* read table sizes and allocate page array */
+  /* Read table sizes, check them for plausibility and allocate page array. */
   SVN_ERR(packed_stream_get(&value, rev_file->p2l_stream));
   result->first_revision = (svn_revnum_t)value;
+  if (result->first_revision != rev_file->start_revision)
+    return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                  _("Index rev / pack file revision numbers do not match"));
+
   SVN_ERR(packed_stream_get(&value, rev_file->p2l_stream));
   result->file_size = value;
+  if (result->file_size != rev_file->l2p_offset)
+    return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                   _("Index offset and rev / pack file size do not match"));
+
   SVN_ERR(packed_stream_get(&value, rev_file->p2l_stream));
   result->page_size = value;
+  if (!result->page_size || (result->page_size & (result->page_size - 1)))
+    return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                            _("P2L index page size is not a power of two"));
+
   SVN_ERR(packed_stream_get(&value, rev_file->p2l_stream));
   result->page_count = (apr_size_t)value;
+  if (result->page_count != (result->file_size - 1) / result->page_size + 1)
+    return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                   _("P2L page count does not match rev / pack file size"));
+
   result->offsets
     = apr_pcalloc(pool, (result->page_count + 1) * sizeof(*result->offsets));
 
@@ -1877,7 +1933,7 @@ typedef struct p2l_page_info_baton_t
   /* offset within the p2l index file describing the following page */
   apr_off_t next_offset;
 
-  /* PAGE_NO * PAGE_SIZE (is <= OFFSET) */
+  /* PAGE_NO * PAGE_SIZE (if <= OFFSET) */
   apr_off_t page_start;
 
   /* total number of pages indexed */
@@ -1995,10 +2051,19 @@ read_entry(svn_fs_fs__packed_number_stre
 
   SVN_ERR(packed_stream_get(&value, stream));
   *last_compound += decode_int(value);
-  
+
   entry.type = (int)(*last_compound & 7);
   entry.item.number = *last_compound / 8;
 
+  /* Verify item type. */
+  if (entry.type > SVN_FS_FS__ITEM_TYPE_CHANGES)
+    return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                            _("Invalid item type in P2L index"));
+  if (   entry.type == SVN_FS_FS__ITEM_TYPE_CHANGES
+      && entry.item.number != SVN_FS_FS__ITEM_INDEX_CHANGES)
+    return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                            _("Changed path list must have item number 1"));
+
   SVN_ERR(packed_stream_get(&value, stream));
   *last_revision += (svn_revnum_t)decode_int(value);
   entry.item.revision = *last_revision;
@@ -2006,6 +2071,15 @@ read_entry(svn_fs_fs__packed_number_stre
   SVN_ERR(packed_stream_get(&value, stream));
   entry.fnv1_checksum = (apr_uint32_t)value;
 
+  /* Some of the index data for empty rev / pack file sections will not be
+   * used during normal operation.  Thus, we have strict rules for the
+   * contents of those unused fields. */
+  if (entry.type == SVN_FS_FS__ITEM_TYPE_UNUSED)
+    if (   entry.item.number != SVN_FS_FS__ITEM_INDEX_UNUSED
+        || entry.fnv1_checksum != 0)
+      return svn_error_create(SVN_ERR_FS_ITEM_INDEX_CORRUPTION, NULL,
+                 _("Empty regions must have item number 0 and checksum 0"));
+
   APR_ARRAY_PUSH(result, svn_fs_fs__p2l_entry_t) = entry;
   *item_offset += entry.size;
 
@@ -2015,9 +2089,9 @@ read_entry(svn_fs_fs__packed_number_stre
 /* Read the phys-to-log mappings for the cluster beginning at rev file
  * offset PAGE_START from the index for START_REVISION in FS.  The data
  * can be found in the index page beginning at START_OFFSET with the next
- * page beginning at NEXT_OFFSET.  Return the relevant index entries in
- * *ENTRIES.  Use REV_FILE to access on-disk data.
- * Use POOL for other allocations.
+ * page beginning at NEXT_OFFSET.  PAGE_SIZE is the L2P index page size.
+ * Return the relevant index entries in *ENTRIES.  Use REV_FILE to access
+ * on-disk data. Use POOL for other allocations.
  */
 static svn_error_t *
 get_p2l_page(apr_array_header_t **entries,

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs_fs/low_level.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs_fs/low_level.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs_fs/low_level.c (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs_fs/low_level.c Tue Sep  9 12:47:45 2014
@@ -27,6 +27,7 @@
 #include "private/svn_sorts_private.h"
 #include "private/svn_string_private.h"
 #include "private/svn_subr_private.h"
+#include "private/svn_fspath.h"
 
 #include "../libsvn_fs/fs-loader.h"
 
@@ -69,6 +70,36 @@
  * various flags. */
 #define MAX_CHANGE_LINE_LEN FSFS_MAX_PATH_LEN + 256
 
+/* Convert the C string in *TEXT to a revision number and return it in *REV.
+ * Overflows, negative values other than -1 and terminating characters other
+ * than 0x20 or 0x0 will cause an error.  Set *TEXT to the first char after
+ * the initial separator or to EOS.
+ */
+static svn_error_t *
+parse_revnum(svn_revnum_t *rev,
+             const char **text)
+{
+  const char *string = *text;
+  if ((string[0] == '-') && (string[1] == '1'))
+    {
+      *rev = SVN_INVALID_REVNUM;
+      string += 2;
+    }
+  else
+    {
+      SVN_ERR(svn_revnum_parse(rev, string, &string));
+    }
+
+  if (*string == ' ')
+    ++string;
+  else if (*string != '\0')
+    return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
+                            _("Invalid character in revision number"));
+
+  *text = string;
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *
 svn_fs_fs__parse_revision_trailer(apr_off_t *root_offset,
                                   apr_off_t *changes_offset,
@@ -228,7 +259,7 @@ read_change(change_t **change_p,
     return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
                             _("Invalid changes line in rev-file"));
 
-  info->node_rev_id = svn_fs_fs__id_parse(str, result_pool);
+  SVN_ERR(svn_fs_fs__id_parse(&info->node_rev_id, str, result_pool));
   if (info->node_rev_id == NULL)
     return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
                             _("Invalid changes line in rev-file"));
@@ -346,8 +377,12 @@ read_change(change_t **change_p,
                               _("Invalid mergeinfo-mod flag in rev-file"));
         }
     }
-  
+
   /* Get the changed path. */
+  if (!svn_fspath__is_canonical(last_str))
+    return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
+                            _("Invalid path in changes line"));
+
   change->path.len = strlen(last_str);
   change->path.data = apr_pstrdup(result_pool, last_str);
 
@@ -362,15 +397,11 @@ read_change(change_t **change_p,
   else
     {
       last_str = line->data;
-      str = svn_cstring_tokenize(" ", &last_str);
-      if (! str)
-        return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                                _("Invalid changes line in rev-file"));
-      info->copyfrom_rev = SVN_STR_TO_REV(str);
+      SVN_ERR(parse_revnum(&info->copyfrom_rev, (const char **)&last_str));
 
-      if (! last_str)
+      if (!svn_fspath__is_canonical(last_str))
         return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                                _("Invalid changes line in rev-file"));
+                                _("Invalid copy-from path in changes line"));
 
       info->copyfrom_path = apr_pstrdup(result_pool, last_str);
     }
@@ -649,12 +680,7 @@ svn_fs_fs__parse_representation(represen
   rep = apr_pcalloc(result_pool, sizeof(*rep));
   *rep_p = rep;
 
-  str = svn_cstring_tokenize(" ", &string);
-  if (str == NULL)
-    return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                            _("Malformed text representation offset line in node-rev"));
-
-  rep->revision = SVN_STR_TO_REV(str);
+  SVN_ERR(parse_revnum(&rep->revision, (const char **)&string));
 
   /* initialize transaction info (never stored) */
   svn_fs_fs__id_txn_reset(&rep->txn_id);
@@ -797,7 +823,7 @@ svn_fs_fs__read_noderev(node_revision_t 
 
   SVN_ERR(svn_stream_close(stream));
 
-  noderev->id = svn_fs_fs__id_parse(value, result_pool);
+  SVN_ERR(svn_fs_fs__id_parse(&noderev->id, value, result_pool));
   noderev_id = value; /* for error messages later */
 
   /* Read the type. */
@@ -848,13 +874,19 @@ svn_fs_fs__read_noderev(node_revision_t 
     }
   else
     {
+      if (!svn_fspath__is_canonical(value))
+        return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
+                            _("Non-canonical cpath field in node-rev '%s'"),
+                            noderev_id);
+
       noderev->created_path = apr_pstrdup(result_pool, value);
     }
 
   /* Get the predecessor ID. */
   value = svn_hash_gets(headers, HEADER_PRED);
   if (value)
-    noderev->predecessor_id = svn_fs_fs__id_parse(value, result_pool);
+    SVN_ERR(svn_fs_fs__id_parse(&noderev->predecessor_id, value,
+                                result_pool));
 
   /* Get the copyroot. */
   value = svn_hash_gets(headers, HEADER_COPYROOT);
@@ -865,17 +897,9 @@ svn_fs_fs__read_noderev(node_revision_t 
     }
   else
     {
-      char *str;
+      SVN_ERR(parse_revnum(&noderev->copyroot_rev, (const char **)&value));
 
-      str = svn_cstring_tokenize(" ", &value);
-      if (str == NULL)
-        return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
-                                 _("Malformed copyroot line in node-rev '%s'"),
-                                 noderev_id);
-
-      noderev->copyroot_rev = SVN_STR_TO_REV(str);
-
-      if (*value == '\0')
+      if (!svn_fspath__is_canonical(value))
         return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
                                  _("Malformed copyroot line in node-rev '%s'"),
                                  noderev_id);
@@ -891,13 +915,7 @@ svn_fs_fs__read_noderev(node_revision_t 
     }
   else
     {
-      char *str = svn_cstring_tokenize(" ", &value);
-      if (str == NULL)
-        return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
-                                 _("Malformed copyfrom line in node-rev '%s'"),
-                                 noderev_id);
-
-      noderev->copyfrom_rev = SVN_STR_TO_REV(str);
+      SVN_ERR(parse_revnum(&noderev->copyfrom_rev, (const char **)&value));
 
       if (*value == 0)
         return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
@@ -1088,10 +1106,7 @@ svn_fs_fs__read_rep_header(svn_fs_fs__re
   if (! str || (strcmp(str, REP_DELTA) != 0))
     goto error;
 
-  str = svn_cstring_tokenize(" ", &last_str);
-  if (! str)
-    goto error;
-  (*header)->base_revision = SVN_STR_TO_REV(str);
+  SVN_ERR(parse_revnum(&(*header)->base_revision, (const char **)&last_str));
 
   str = svn_cstring_tokenize(" ", &last_str);
   if (! str)

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs_fs/pack.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs_fs/pack.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs_fs/pack.c (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs_fs/pack.c Tue Sep  9 12:47:45 2014
@@ -1165,7 +1165,6 @@ copy_reps_from_temp(pack_context_t *cont
 {
   apr_pool_t *iterpool = svn_pool_create(pool);
   apr_array_header_t *path_order = context->path_order;
-  apr_array_header_t *parts = apr_array_make(pool, 16, sizeof(void*));
   int i;
 
   /* copy items in path order. */
@@ -1185,9 +1184,6 @@ copy_reps_from_temp(pack_context_t *cont
         SVN_ERR(store_item(context, temp_file, node_part, iterpool));
       if (rep_part)
         SVN_ERR(store_item(context, temp_file, rep_part, iterpool));
-
-      /* processed all items */
-      apr_array_clear(parts);
     }
 
   svn_pool_destroy(iterpool);

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs_fs/recovery.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs_fs/recovery.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs_fs/recovery.c (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs_fs/recovery.c Tue Sep  9 12:47:45 2014
@@ -216,7 +216,7 @@ recover_find_max_ids(svn_fs_t *fs,
       char *str_val;
       char *str;
       svn_node_kind_t kind;
-      svn_fs_id_t *id;
+      const svn_fs_id_t *id;
       const svn_fs_fs__id_part_t *rev_item;
       apr_uint64_t node_id, copy_id;
       apr_off_t child_dir_offset;
@@ -246,7 +246,7 @@ recover_find_max_ids(svn_fs_t *fs,
         return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
                                 _("Directory entry corrupt"));
 
-      id = svn_fs_fs__id_parse(str, iterpool);
+      SVN_ERR(svn_fs_fs__id_parse(&id, str, iterpool));
 
       rev_item = svn_fs_fs__id_rev_item(id);
       if (rev_item->revision != rev)
@@ -348,6 +348,11 @@ recover_body(void *baton, apr_pool_t *po
   /* Lose potentially corrupted data in temp files */
   SVN_ERR(svn_fs_fs__cleanup_revprop_namespace(fs));
 
+  /* The admin may have created a plain copy of this repo before attempting
+     to recover it (hotcopy may or may not work with corrupted repos).
+     Bump the instance ID. */
+  SVN_ERR(svn_fs_fs__set_uuid(fs, fs->uuid, NULL, pool));
+
   /* We need to know the largest revision in the filesystem. */
   SVN_ERR(recover_get_largest_revision(fs, &max_rev, pool));
 

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs_fs/rev_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs_fs/rev_file.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs_fs/rev_file.c (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs_fs/rev_file.c Tue Sep  9 12:47:45 2014
@@ -31,6 +31,8 @@
 #include "private/svn_io_private.h"
 #include "svn_private_config.h"
 
+/* Initialize the *FILE structure for REVISION in filesystem FS.  Set its
+ * pool member to the provided POOL. */
 static void
 init_revision_file(svn_fs_fs__revision_file_t *file,
                    svn_fs_t *fs,
@@ -40,9 +42,7 @@ init_revision_file(svn_fs_fs__revision_f
   fs_fs_data_t *ffd = fs->fsap_data;
 
   file->is_packed = svn_fs_fs__is_packed_rev(fs, revision);
-  file->start_revision = revision < ffd->min_unpacked_rev
-                       ? revision - (revision % ffd->max_files_per_dir)
-                       : revision;
+  file->start_revision = svn_fs_fs__packed_base_rev(fs, revision);
 
   file->file = NULL;
   file->stream = NULL;
@@ -176,6 +176,7 @@ open_pack_or_rev_file(svn_fs_fs__revisio
 
               /* We failed for the first time. Refresh cache & retry. */
               SVN_ERR(svn_fs_fs__update_min_unpacked_rev(fs, scratch_pool));
+              file->start_revision = svn_fs_fs__packed_base_rev(fs, rev);
 
               retry = TRUE;
             }

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs_fs/tree.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs_fs/tree.c Tue Sep  9 12:47:45 2014
@@ -4338,10 +4338,12 @@ stringify_node(dag_node_t *node,
 
 /* Check metadata sanity on NODE, and on its children.  Manually verify
    information for DAG nodes in revision REV, and trust the metadata
-   accuracy for nodes belonging to older revisions. */
+   accuracy for nodes belonging to older revisions.  To detect cycles,
+   provide all parent dag_node_t * in PARENT_NODES. */
 static svn_error_t *
 verify_node(dag_node_t *node,
             svn_revnum_t rev,
+            apr_array_header_t *parent_nodes,
             apr_pool_t *pool)
 {
   svn_boolean_t has_mergeinfo;
@@ -4351,6 +4353,18 @@ verify_node(dag_node_t *node,
   int pred_count;
   svn_node_kind_t kind;
   apr_pool_t *iterpool = svn_pool_create(pool);
+  int i;
+
+  /* Detect (non-)DAG cycles. */
+  for (i = 0; i < parent_nodes->nelts; ++i)
+    {
+      dag_node_t *parent = APR_ARRAY_IDX(parent_nodes, i, dag_node_t *);
+      if (svn_fs_fs__id_eq(svn_fs_fs__dag_get_id(parent),
+                           svn_fs_fs__dag_get_id(node)))
+        return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
+                                "Node is its own direct or indirect parent '%s'",
+                                stringify_node(node, iterpool));
+    }
 
   /* Fetch some data. */
   SVN_ERR(svn_fs_fs__dag_has_mergeinfo(&has_mergeinfo, node));
@@ -4402,8 +4416,8 @@ verify_node(dag_node_t *node,
   if (kind == svn_node_dir)
     {
       apr_array_header_t *entries;
-      int i;
       apr_int64_t children_mergeinfo = 0;
+      APR_ARRAY_PUSH(parent_nodes, dag_node_t*) = node;
 
       SVN_ERR(svn_fs_fs__dag_dir_entries(&entries, node, pool));
 
@@ -4422,7 +4436,7 @@ verify_node(dag_node_t *node,
             {
               SVN_ERR(svn_fs_fs__dag_get_node(&child, fs, dirent->id,
                                               iterpool));
-              SVN_ERR(verify_node(child, rev, iterpool));
+              SVN_ERR(verify_node(child, rev, parent_nodes, iterpool));
               SVN_ERR(svn_fs_fs__dag_get_mergeinfo_count(&child_mergeinfo,
                                                          child));
             }
@@ -4447,6 +4461,10 @@ verify_node(dag_node_t *node,
                                  stringify_node(node, iterpool),
                                  mergeinfo_count, has_mergeinfo,
                                  children_mergeinfo);
+
+      /* If we don't make it here, there was an error / corruption.
+       * In that case, nobody will need PARENT_NODES anymore. */
+      apr_array_pop(parent_nodes);
     }
 
   svn_pool_destroy(iterpool);
@@ -4459,6 +4477,7 @@ svn_fs_fs__verify_root(svn_fs_root_t *ro
 {
   svn_fs_t *fs = root->fs;
   dag_node_t *root_dir;
+  apr_array_header_t *parent_nodes;
 
   /* Issue #4129: bogus pred-counts and minfo-cnt's on the root node-rev
      (and elsewhere).  This code makes more thorough checks than the
@@ -4482,7 +4501,8 @@ svn_fs_fs__verify_root(svn_fs_root_t *ro
     }
 
   /* Recursively verify ROOT_DIR. */
-  SVN_ERR(verify_node(root_dir, root->rev, pool));
+  parent_nodes = apr_array_make(pool, 16, sizeof(dag_node_t *));
+  SVN_ERR(verify_node(root_dir, root->rev, parent_nodes, pool));
 
   /* Verify explicitly the predecessor of the root. */
   {

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs_fs/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs_fs/util.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs_fs/util.c (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs_fs/util.c Tue Sep  9 12:47:45 2014
@@ -55,6 +55,16 @@ svn_fs_fs__is_packed_revprop(svn_fs_t *f
       && (ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT);
 }
 
+svn_revnum_t
+svn_fs_fs__packed_base_rev(svn_fs_t *fs,
+                           svn_revnum_t revision)
+{
+  fs_fs_data_t *ffd = fs->fsap_data;
+  return (revision < ffd->min_unpacked_rev)
+       ? (revision - (revision % ffd->max_files_per_dir))
+       : revision;
+}
+
 const char *
 svn_fs_fs__path_txn_current(svn_fs_t *fs,
                             apr_pool_t *pool)

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs_fs/util.h
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs_fs/util.h?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs_fs/util.h (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs_fs/util.h Tue Sep  9 12:47:45 2014
@@ -76,6 +76,12 @@ svn_boolean_t
 svn_fs_fs__is_packed_revprop(svn_fs_t *fs,
                              svn_revnum_t rev);
 
+/* Return the first revision in the pack / rev file containing REVISION in
+ * filesystem FS.  For non-packed revs, this will simply be REVISION. */
+svn_revnum_t
+svn_fs_fs__packed_base_rev(svn_fs_t *fs,
+                           svn_revnum_t revision);
+
 /* Return the full path of the rev shard directory that will contain
  * revision REV in FS.  Allocate the result in POOL.
  */

Modified: subversion/branches/log-message-templates/subversion/libsvn_fs_fs/verify.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_fs_fs/verify.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_fs_fs/verify.c (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_fs_fs/verify.c Tue Sep  9 12:47:45 2014
@@ -592,16 +592,6 @@ compare_p2l_to_rev(svn_fs_t *fs,
 }
 
 static svn_revnum_t
-packed_base_rev(svn_fs_t *fs, svn_revnum_t rev)
-{
-  fs_fs_data_t *ffd = fs->fsap_data;
-
-  return rev < ffd->min_unpacked_rev
-       ? rev - (rev % ffd->max_files_per_dir)
-       : rev;
-}
-
-static svn_revnum_t
 pack_size(svn_fs_t *fs, svn_revnum_t rev)
 {
   fs_fs_data_t *ffd = fs->fsap_data;
@@ -635,7 +625,7 @@ verify_index_consistency(svn_fs_t *fs,
       svn_error_t *err = SVN_NO_ERROR;
 
       svn_revnum_t count = pack_size(fs, revision);
-      svn_revnum_t pack_start = packed_base_rev(fs, revision);
+      svn_revnum_t pack_start = svn_fs_fs__packed_base_rev(fs, revision);
       svn_revnum_t pack_end = pack_start + count;
 
       svn_pool_clear(iterpool);
@@ -668,7 +658,7 @@ verify_index_consistency(svn_fs_t *fs,
 
           /* We could simply assign revision here but the code below is
              more intuitive to maintainers. */
-          next_revision = packed_base_rev(fs, revision);
+          next_revision = svn_fs_fs__packed_base_rev(fs, revision);
         }
       else
         {

Modified: subversion/branches/log-message-templates/subversion/libsvn_repos/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/libsvn_repos/replay.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/libsvn_repos/replay.c (original)
+++ subversion/branches/log-message-templates/subversion/libsvn_repos/replay.c Tue Sep  9 12:47:45 2014
@@ -548,6 +548,17 @@ path_driver_cb_func(void **dir_baton,
       svn_boolean_t src_readable;
       svn_fs_root_t *copyfrom_root;
 
+      /* E.g. when verifying corrupted repositories, their changed path
+         lists may contain an ADD for "/".  The delta path driver will
+         call us with a NULL parent in that case. */
+      if (*edit_path == 0)
+        return svn_error_create(SVN_ERR_FS_ALREADY_EXISTS, NULL,
+                                _("Root directory already exists."));
+
+      /* A NULL parent_baton will cause a segfault.  It should never be
+          NULL for non-root paths. */
+      SVN_ERR_ASSERT(parent_baton);
+
       /* Was this node copied? */
       SVN_ERR(fill_copyfrom(&copyfrom_root, &copyfrom_path, &copyfrom_rev,
                             &src_readable, root, change,

Modified: subversion/branches/log-message-templates/subversion/svnlook/svnlook.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/svnlook/svnlook.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/svnlook/svnlook.c (original)
+++ subversion/branches/log-message-templates/subversion/svnlook/svnlook.c Tue Sep  9 12:47:45 2014
@@ -1706,9 +1706,14 @@ do_pget(svnlook_ctxt_t *c,
        if (path == NULL)
          {
            /* We're operating on a revprop (e.g. c->is_revision). */
-           err_msg = apr_psprintf(pool,
-                                  _("Property '%s' not found on revision %ld"),
-                                  propname, c->rev_id);
+           if (SVN_IS_VALID_REVNUM(c->rev_id))
+             err_msg = apr_psprintf(pool,
+                                    _("Property '%s' not found on revision %ld"),
+                                    propname, c->rev_id);
+           else
+             err_msg = apr_psprintf(pool,
+                                    _("Property '%s' not found on transaction %s"),
+                                    propname, c->txn_name);
          }
        else
          {

Modified: subversion/branches/log-message-templates/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/tests/cmdline/basic_tests.py?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/log-message-templates/subversion/tests/cmdline/basic_tests.py Tue Sep  9 12:47:45 2014
@@ -2003,7 +2003,6 @@ def delete_keep_local_twice(sbox):
     logger.warn('Directory was really deleted')
     raise svntest.Failure
 
-@Wimp("Fails with recent httpd", cond_func=svntest.main.is_ra_type_dav)
 def special_paths_in_repos(sbox):
   "use folders with names like 'c:hi'"
 
@@ -2011,16 +2010,21 @@ def special_paths_in_repos(sbox):
   test_file_source = os.path.join(sbox.repo_dir, 'format')
   repo_url       = sbox.repo_url
 
-  for test_url in [ sbox.repo_url + '/c:hi',
-                    sbox.repo_url + '/C:',
-                    sbox.repo_url + '/C&',
-                    sbox.repo_url + '/C<',
-                    sbox.repo_url + '/C# hi',
-                    sbox.repo_url + '/C\\ri',
-                    sbox.repo_url + '/C?',
-                    sbox.repo_url + '/C+',
-                    sbox.repo_url + '/C%']:
+  test_urls = [ sbox.repo_url + '/c:hi',
+                sbox.repo_url + '/C:',
+                sbox.repo_url + '/C&',
+                sbox.repo_url + '/C<',
+                sbox.repo_url + '/C# hi',
+                sbox.repo_url + '/C?',
+                sbox.repo_url + '/C+',
+                sbox.repo_url + '/C%']
+
+  # On Windows Apache HTTPD breaks '\' for us :(
+  if not (svntest.main.is_os_windows() and
+          svntest.main.is_ra_type_dav()):
+    test_urls += [ sbox.repo_url + '/C\\ri' ]
 
+  for test_url in test_urls:
     test_file_url = test_url + '/' + test_url[test_url.rindex('/')+1:]
 
     # do some manipulations on a folder which problematic names

Modified: subversion/branches/log-message-templates/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c (original)
+++ subversion/branches/log-message-templates/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c Tue Sep  9 12:47:45 2014
@@ -1,4 +1,4 @@
-/* fs-pack-test.c --- tests for the filesystem
+/* fs-fs-pack-test.c --- tests for the FSFS filesystem
  *
  * ====================================================================
  *    Licensed to the Apache Software Foundation (ASF) under one

Propchange: subversion/branches/log-message-templates/subversion/tests/libsvn_fs_x/
------------------------------------------------------------------------------
  Merged /subversion/trunk/subversion/tests/libsvn_fs_x:r1622492-1623794

Modified: subversion/branches/log-message-templates/subversion/tests/libsvn_fs_x/fs-x-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-message-templates/subversion/tests/libsvn_fs_x/fs-x-pack-test.c?rev=1623815&r1=1623814&r2=1623815&view=diff
==============================================================================
--- subversion/branches/log-message-templates/subversion/tests/libsvn_fs_x/fs-x-pack-test.c (original)
+++ subversion/branches/log-message-templates/subversion/tests/libsvn_fs_x/fs-x-pack-test.c Tue Sep  9 12:47:45 2014
@@ -1,4 +1,4 @@
-/* fs-pack-test.c --- tests for the filesystem
+/* fs-x-pack-test.c --- tests for the FSX filesystem
  *
  * ====================================================================
  *    Licensed to the Apache Software Foundation (ASF) under one



Mime
View raw message