Modified: 
subversion/branches/better-pristines/subversion/libsvn_fs_fs/low_level.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_fs_fs/low_level.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_fs_fs/low_level.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_fs_fs/low_level.c 
Tue Jan  2 19:52:28 2018
@@ -670,7 +670,7 @@ svn_fs_fs__write_changes(svn_stream_t *s
     }
 
   if (terminate_list)
-    svn_stream_puts(stream, "\n");
+    SVN_ERR(svn_stream_puts(stream, "\n"));
 
   svn_pool_destroy(iterpool);
 
@@ -741,6 +741,9 @@ read_header_block(apr_hash_t **headers,
   return SVN_NO_ERROR;
 }
 
+/* ### Ouch!  The implementation of this function currently modifies
+   ### the input string when tokenizing it (so the input cannot be
+   ### used after that). */
 svn_error_t *
 svn_fs_fs__parse_representation(representation_t **rep_p,
                                 svn_stringbuf_t *text,
@@ -811,13 +814,21 @@ svn_fs_fs__parse_representation(represen
   if (str == NULL)
     return SVN_NO_ERROR;
 
-  /* Read the SHA1 hash. */
-  if (strlen(str) != (APR_SHA1_DIGESTSIZE * 2))
-    return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                            _("Malformed text representation offset line in 
node-rev"));
+  /* Is the SHA1 hash present? */
+  if (str[0] == '-' && str[1] == 0)
+    {
+      checksum = NULL;
+    }
+  else
+    {
+      /* Read the SHA1 hash. */
+      if (strlen(str) != (APR_SHA1_DIGESTSIZE * 2))
+        return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
+                                _("Malformed text representation offset line 
in node-rev"));
 
-  SVN_ERR(svn_checksum_parse_hex(&checksum, svn_checksum_sha1, str,
-                                 scratch_pool));
+      SVN_ERR(svn_checksum_parse_hex(&checksum, svn_checksum_sha1, str,
+                                     scratch_pool));
+    }
 
   /* We do have a valid SHA1 but it might be all 0.
      We cannot be sure where that came from (Alas! legacy), so let's not
@@ -829,21 +840,36 @@ svn_fs_fs__parse_representation(represen
   if (checksum)
     memcpy(rep->sha1_digest, checksum->digest, sizeof(rep->sha1_digest));
 
-  /* Read the uniquifier. */
-  str = svn_cstring_tokenize("/", &string);
+  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"));
 
-  SVN_ERR(svn_fs_fs__id_txn_parse(&rep->uniquifier.noderev_txn_id, str));
+  /* Is the uniquifier present? */
+  if (str[0] == '-' && str[1] == 0)
+    {
+      end = string;
+    }
+  else
+    {
+      char *substring = str;
 
-  str = svn_cstring_tokenize(" ", &string);
-  if (str == NULL || *str != '_')
-    return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                            _("Malformed text representation offset line in 
node-rev"));
+      /* Read the uniquifier. */
+      str = svn_cstring_tokenize("/", &substring);
+      if (str == NULL)
+        return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
+                                _("Malformed text representation offset line 
in node-rev"));
+
+      SVN_ERR(svn_fs_fs__id_txn_parse(&rep->uniquifier.noderev_txn_id, str));
+
+      str = svn_cstring_tokenize(" ", &substring);
+      if (str == NULL || *str != '_')
+        return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
+                                _("Malformed text representation offset line 
in node-rev"));
 
-  ++str;
-  rep->uniquifier.number = svn__base36toui64(&end, str);
+      ++str;
+      rep->uniquifier.number = svn__base36toui64(&end, str);
+    }
 
   if (*end)
     return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
@@ -1034,25 +1060,37 @@ svn_fs_fs__read_noderev(node_revision_t
 }
 
 /* Return a textual representation of the DIGEST of given KIND.
- * If IS_NULL is TRUE, no digest is available.
  * Allocate the result in RESULT_POOL.
  */
 static const char *
 format_digest(const unsigned char *digest,
               svn_checksum_kind_t kind,
-              svn_boolean_t is_null,
               apr_pool_t *result_pool)
 {
   svn_checksum_t checksum;
   checksum.digest = digest;
   checksum.kind = kind;
 
-  if (is_null)
-    return "(null)";
-
   return svn_checksum_to_cstring_display(&checksum, result_pool);
 }
 
+/* Return a textual representation of the uniquifier represented
+ * by NODEREV_TXN_ID and NUMBER.  Use POOL for the allocations.
+ */
+static const char *
+format_uniquifier(const svn_fs_fs__id_part_t *noderev_txn_id,
+                  apr_uint64_t number,
+                  apr_pool_t *pool)
+{
+  char buf[SVN_INT64_BUFFER_SIZE];
+  const char *txn_id_str;
+
+  txn_id_str = svn_fs_fs__id_txn_unparse(noderev_txn_id, pool);
+  svn__ui64tobase36(buf, number);
+
+  return apr_psprintf(pool, "%s/_%s", txn_id_str, buf);
+}
+
 svn_stringbuf_t *
 svn_fs_fs__unparse_representation(representation_t *rep,
                                   int format,
@@ -1060,32 +1098,80 @@ svn_fs_fs__unparse_representation(repres
                                   apr_pool_t *result_pool,
                                   apr_pool_t *scratch_pool)
 {
-  char buffer[SVN_INT64_BUFFER_SIZE];
+  svn_stringbuf_t *str;
+  const char *sha1_str;
+  const char *uniquifier_str;
+
   if (svn_fs_fs__id_txn_used(&rep->txn_id) && mutable_rep_truncated)
     return svn_stringbuf_ncreate("-1", 2, result_pool);
 
-  if (format < SVN_FS_FS__MIN_REP_SHARING_FORMAT || !rep->has_sha1)
-    return svn_stringbuf_createf
-            (result_pool, "%ld %" APR_UINT64_T_FMT " %" SVN_FILESIZE_T_FMT
-             " %" SVN_FILESIZE_T_FMT " %s",
-             rep->revision, rep->item_index, rep->size,
-             rep->expanded_size,
-             format_digest(rep->md5_digest, svn_checksum_md5, FALSE,
-                           scratch_pool));
-
-  svn__ui64tobase36(buffer, rep->uniquifier.number);
-  return svn_stringbuf_createf
-          (result_pool, "%ld %" APR_UINT64_T_FMT " %" SVN_FILESIZE_T_FMT
-           " %" SVN_FILESIZE_T_FMT " %s %s %s/_%s",
-           rep->revision, rep->item_index, rep->size,
-           rep->expanded_size,
-           format_digest(rep->md5_digest, svn_checksum_md5,
-                         FALSE, scratch_pool),
-           format_digest(rep->sha1_digest, svn_checksum_sha1,
-                         !rep->has_sha1, scratch_pool),
-           svn_fs_fs__id_txn_unparse(&rep->uniquifier.noderev_txn_id,
-                                     scratch_pool),
-           buffer);
+  /* Format of the string:
+     <rev> <item_index> <size> <expanded-size> <md5> [<sha1>] [<uniquifier>]
+   */
+  str = svn_stringbuf_createf(
+          result_pool,
+          "%ld"
+          " %" APR_UINT64_T_FMT
+          " %" SVN_FILESIZE_T_FMT
+          " %" SVN_FILESIZE_T_FMT
+          " %s",
+          rep->revision,
+          rep->item_index,
+          rep->size,
+          rep->expanded_size,
+          format_digest(rep->md5_digest, svn_checksum_md5, scratch_pool));
+
+  /* Compatibility: these formats don't understand <sha1> and <uniquifier>. */
+  if (format < SVN_FS_FS__MIN_REP_SHARING_FORMAT)
+    return str;
+
+  if (format < SVN_FS_FS__MIN_REP_STRING_OPTIONAL_VALUES_FORMAT)
+    {
+      /* Compatibility: these formats can only have <sha1> and <uniquifier>
+         present simultaneously, or don't have them at all. */
+      if (rep->has_sha1)
+        {
+          sha1_str = format_digest(rep->sha1_digest, svn_checksum_sha1,
+                                   scratch_pool);
+          uniquifier_str = format_uniquifier(&rep->uniquifier.noderev_txn_id,
+                                             rep->uniquifier.number,
+                                             scratch_pool);
+          svn_stringbuf_appendbyte(str, ' ');
+          svn_stringbuf_appendcstr(str, sha1_str);
+          svn_stringbuf_appendbyte(str, ' ');
+          svn_stringbuf_appendcstr(str, uniquifier_str);
+        }
+      return str;
+    }
+
+  /* The most recent formats support optional <sha1> and <uniquifier> values. 
*/
+  if (rep->has_sha1)
+    {
+      sha1_str = format_digest(rep->sha1_digest, svn_checksum_sha1,
+                               scratch_pool);
+    }
+  else
+    sha1_str = "-";
+
+  if (rep->uniquifier.number == 0 &&
+      rep->uniquifier.noderev_txn_id.number == 0 &&
+      rep->uniquifier.noderev_txn_id.revision == 0)
+    {
+      uniquifier_str = "-";
+    }
+  else
+    {
+      uniquifier_str = format_uniquifier(&rep->uniquifier.noderev_txn_id,
+                                         rep->uniquifier.number,
+                                         scratch_pool);
+    }
+
+  svn_stringbuf_appendbyte(str, ' ');
+  svn_stringbuf_appendcstr(str, sha1_str);
+  svn_stringbuf_appendbyte(str, ' ');
+  svn_stringbuf_appendcstr(str, uniquifier_str);
+
+  return str;
 }
 
 

Modified: subversion/branches/better-pristines/subversion/libsvn_fs_fs/pack.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_fs_fs/pack.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_fs_fs/pack.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_fs_fs/pack.c Tue Jan 
 2 19:52:28 2018
@@ -2067,9 +2067,9 @@ pack_body(void *baton,
   if (fully_packed)
     {
       if (pb->notify_func)
-        (*pb->notify_func)(pb->notify_baton,
-                           ffd->min_unpacked_rev / ffd->max_files_per_dir,
-                           svn_fs_pack_notify_noop, pool);
+        SVN_ERR(pb->notify_func(pb->notify_baton,
+                                ffd->min_unpacked_rev / ffd->max_files_per_dir,
+                                svn_fs_pack_notify_noop, pool));
 
       return SVN_NO_ERROR;
     }
@@ -2122,7 +2122,7 @@ svn_fs_fs__pack(svn_fs_t *fs,
   if (!ffd->max_files_per_dir)
     {
       if (notify_func)
-        (*notify_func)(notify_baton, -1, svn_fs_pack_notify_noop, pool);
+        SVN_ERR(notify_func(notify_baton, -1, svn_fs_pack_notify_noop, pool));
 
       return SVN_NO_ERROR;
     }
@@ -2132,9 +2132,9 @@ svn_fs_fs__pack(svn_fs_t *fs,
   if (fully_packed)
     {
       if (notify_func)
-        (*notify_func)(notify_baton,
-                       ffd->min_unpacked_rev / ffd->max_files_per_dir,
-                       svn_fs_pack_notify_noop, pool);
+        SVN_ERR(notify_func(notify_baton,
+                            ffd->min_unpacked_rev / ffd->max_files_per_dir,
+                            svn_fs_pack_notify_noop, pool));
 
       return SVN_NO_ERROR;
     }

Modified: 
subversion/branches/better-pristines/subversion/libsvn_fs_fs/rep-cache-db.sql
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_fs_fs/rep-cache-db.sql?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- 
subversion/branches/better-pristines/subversion/libsvn_fs_fs/rep-cache-db.sql 
(original)
+++ 
subversion/branches/better-pristines/subversion/libsvn_fs_fs/rep-cache-db.sql 
Tue Jan  2 19:52:28 2018
@@ -21,7 +21,7 @@
  * ====================================================================
  */
 
--- STMT_CREATE_SCHEMA
+-- STMT_CREATE_SCHEMA_V1
 /* A table mapping representation hashes to locations in a rev file. */
 CREATE TABLE rep_cache (
   hash TEXT NOT NULL PRIMARY KEY,
@@ -33,36 +33,63 @@ CREATE TABLE rep_cache (
 
 PRAGMA USER_VERSION = 1;
 
+-- STMT_CREATE_SCHEMA_V2
+/* A table mapping representation hashes to locations in a rev file.
+   Same as in V1 schema, except that it uses the `WITHOUT ROWID` optimization:
+   https://sqlite.org/withoutrowid.html
+
+   Note that this optimization is only supported starting from SQLite version
+   3.8.2 (2013-12-06).  To keep compatibility with existing binaries, it is
+   only used for newer filesystem formats that were released together with
+   bumping the minimum required SQLite version.
+ */
+CREATE TABLE rep_cache (
+  hash TEXT NOT NULL PRIMARY KEY,
+  revision INTEGER NOT NULL,
+  offset INTEGER NOT NULL,
+  size INTEGER NOT NULL,
+  expanded_size INTEGER NOT NULL
+  ) WITHOUT ROWID;
+
+PRAGMA USER_VERSION = 2;
 
 -- STMT_GET_REP
+/* Works for both V1 and V2 schemas. */
 SELECT revision, offset, size, expanded_size
 FROM rep_cache
 WHERE hash = ?1
 
 -- STMT_SET_REP
+/* Works for both V1 and V2 schemas. */
 INSERT OR FAIL INTO rep_cache (hash, revision, offset, size, expanded_size)
 VALUES (?1, ?2, ?3, ?4, ?5)
 
 -- STMT_GET_REPS_FOR_RANGE
+/* Works for both V1 and V2 schemas. */
 SELECT hash, revision, offset, size, expanded_size
 FROM rep_cache
 WHERE revision >= ?1 AND revision <= ?2
 
 -- STMT_GET_MAX_REV
+/* Works for both V1 and V2 schemas. */
 SELECT MAX(revision)
 FROM rep_cache
 
 -- STMT_DEL_REPS_YOUNGER_THAN_REV
+/* Works for both V1 and V2 schemas. */
 DELETE FROM rep_cache
 WHERE revision > ?1
 
 /* An INSERT takes an SQLite reserved lock that prevents other writes
    but doesn't block reads.  The incomplete transaction means that no
    permanent change is made to the database and the transaction is
-   removed when the database is closed.  */
+   removed when the database is closed.
+
+   Works for both V1 and V2 schemas.  */
 -- STMT_LOCK_REP
 BEGIN TRANSACTION;
 INSERT INTO rep_cache VALUES ('dummy', 0, 0, 0, 0)
 
 -- STMT_UNLOCK_REP
+/* Works for both V1 and V2 schemas. */
 ROLLBACK TRANSACTION;

Modified: 
subversion/branches/better-pristines/subversion/libsvn_fs_fs/rep-cache.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_fs_fs/rep-cache.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_fs_fs/rep-cache.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_fs_fs/rep-cache.c 
Tue Jan  2 19:52:28 2018
@@ -36,9 +36,6 @@
 
 #include "rep-cache-db.h"
 
-/* A few magic values */
-#define REP_CACHE_SCHEMA_FORMAT   1
-
 REP_CACHE_DB_SQL_DECLARE_STATEMENTS(statements);
 
 
@@ -102,13 +99,17 @@ open_rep_cache(void *baton,
 
   SVN_SQLITE__ERR_CLOSE(svn_sqlite__read_schema_version(&version, sdb, pool),
                         sdb);
-  if (version < REP_CACHE_SCHEMA_FORMAT)
+  /* If we have an uninitialized database, go ahead and create the schema. */
+  if (version <= 0)
     {
-      /* Must be 0 -- an uninitialized (no schema) database. Create
-         the schema. Results in schema version of 1.  */
-      SVN_SQLITE__ERR_CLOSE(svn_sqlite__exec_statements(sdb,
-                                                        STMT_CREATE_SCHEMA),
-                            sdb);
+      int stmt;
+
+      if (ffd->format >= SVN_FS_FS__MIN_REP_CACHE_SCHEMA_V2_FORMAT)
+        stmt = STMT_CREATE_SCHEMA_V2;
+      else
+        stmt = STMT_CREATE_SCHEMA_V1;
+
+      SVN_SQLITE__ERR_CLOSE(svn_sqlite__exec_statements(sdb, stmt), sdb);
     }
 
   /* This is used as a flag that the database is available so don't

Modified: subversion/branches/better-pristines/subversion/libsvn_fs_fs/structure
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_fs_fs/structure?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_fs_fs/structure 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_fs_fs/structure Tue 
Jan  2 19:52:28 2018
@@ -568,6 +568,9 @@ defined:
             ### in formats >=4, also present:
             <sha1-digest> gives hex SHA1 digest of expanded rep
             <uniquifier> see representation_t->uniquifier in fs.h
+            ### Starting from format 8, a special notation "-"
+            can be used for optional values that are not present
+            (<sha1-digest> and <uniquifier>).
   cpath     FS pathname node was created at
   copyfrom  "<rev> <path>" of copyfrom data
   copyroot  "<rev> <created-path>" of the root of this copy

Modified: 
subversion/branches/better-pristines/subversion/libsvn_fs_fs/transaction.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_fs_fs/transaction.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_fs_fs/transaction.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_fs_fs/transaction.c 
Tue Jan  2 19:52:28 2018
@@ -2697,6 +2697,8 @@ svn_fs_fs__set_proplist(svn_fs_t *fs,
     {
       noderev->prop_rep = apr_pcalloc(pool, sizeof(*noderev->prop_rep));
       noderev->prop_rep->txn_id = *svn_fs_fs__id_txn_id(noderev->id);
+      SVN_ERR(set_uniquifier(fs, noderev->prop_rep, pool));
+      noderev->prop_rep->revision = SVN_INVALID_REVNUM;
       SVN_ERR(svn_fs_fs__put_node_revision(fs, noderev->id, noderev, FALSE,
                                            pool));
     }
@@ -3259,7 +3261,8 @@ write_final_rev(const svn_fs_id_t **new_
                              ? SVN_FS_FS__ITEM_TYPE_DIR_PROPS
                              : SVN_FS_FS__ITEM_TYPE_FILE_PROPS;
       SVN_ERR(svn_fs_fs__get_proplist(&proplist, fs, noderev, pool));
-
+      noderev->prop_rep->txn_id = *txn_id;
+      SVN_ERR(set_uniquifier(fs, noderev->prop_rep, pool));
       noderev->prop_rep->revision = rev;
 
       if (ffd->deltify_properties)
@@ -3328,13 +3331,28 @@ write_final_rev(const svn_fs_id_t **new_
         }
     }
 
-  /* don't serialize SHA1 for dirs to disk (waste of space) */
+  /* don't serialize SHA1 for dir content to disk (waste of space) */
+  /* ### Could clients record bogus last-changed-revisions (issue #4700)? */
   if (noderev->data_rep && noderev->kind == svn_node_dir)
     noderev->data_rep->has_sha1 = FALSE;
 
-  /* don't serialize SHA1 for props to disk (waste of space) */
-  if (noderev->prop_rep)
-    noderev->prop_rep->has_sha1 = FALSE;
+  /* Compatibility: while we don't need to serialize SHA1 for props (it is
+     not used), older formats can only have representation strings that either
+     have both the SHA1 value *and* the uniquifier, or don't have them at all.
+     For such formats, both values get written to the disk only if the SHA1
+     is present.
+
+     We cannot omit the uniquifier, as doing so breaks svn_fs_props_changed()
+     for properties with shared representations, see issues #4623 and #4700.
+     Therefore, we skip writing SHA1, but only for the newer formats where
+     this dependency is untied and we can write the uniquifier to the disk
+     without the SHA1.
+   */
+  if (ffd->format >= SVN_FS_FS__MIN_REP_STRING_OPTIONAL_VALUES_FORMAT &&
+      noderev->prop_rep)
+    {
+      noderev->prop_rep->has_sha1 = FALSE;
+    }
 
   /* Workaround issue #4031: is-fresh-txn-root in revision files. */
   noderev->is_fresh_txn_root = FALSE;

Propchange: subversion/branches/better-pristines/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan  2 19:52:28 2018
@@ -96,4 +96,4 @@
 
/subversion/branches/verify-keep-going/subversion/libsvn_fs_x:1439280-1492639,1546002-1546110
 /subversion/branches/wc-collate-path/subversion/libsvn_fs_x:1402685-1480384
 
/subversion/trunk/subversion/libsvn_fs_fs:1415133-1596500,1596567,1597414,1597989,1598273,1599140,1600872,1601633,1603485-1603487,1603499,1603605,1604128,1604188,1604413-1604414,1604416-1604417,1604421,1604442,1604700,1604717,1604720,1604726,1604755,1604794,1604802,1604824,1604836,1604844,1604902-1604903,1604911,1604925,1604933,1604947,1605059-1605060,1605064-1605065,1605068,1605071-1605073,1605075,1605123,1605188-1605189,1605191,1605197,1605444,1605633,1606132,1606142,1606144,1606514,1606526,1606528,1606551,1606554,1606564,1606598-1606599,1606656,1606658,1606662,1606744,1606840,1607085,1607572,1612407,1612810,1613339,1613872,1614611,1615348,1615351-1615352,1615356,1616338-1616339,1616613,1617586,1617688,1618138,1618151,1618153,1618226,1618641,1618653,1618662,1619068,1619358,1619413,1619769,1619774,1620602,1620909,1620912,1620928,1620930,1621275,1621635,1622931,1622937,1622942,1622946,1622959-1622960,1622963,1622987,1623007,1623368,1623373,1623377,1623379,1623381,1623398,1623402,162
 
4011,1624265,1624512,1626246,1626871,1626873,1626886,1627497-1627498,1627502,1627947-1627949,1627966,1628083,1628093,1628158-1628159,1628161,1628392-1628393,1628415,1628427,1628676,1628738,1628762,1628764,1629854-1629855,1629857,1629865,1629873,1629875,1629879,1630067,1630070,1631049-1631051,1631075,1631115,1631171,1631180,1631185-1631186,1631196-1631197,1631239-1631240,1631548,1631550,1631563,1631567,1631588,1631598,1632646,1632776,1632849,1632851-1632853,1632856-1632857,1632868,1632908,1632926,1633232,1633617-1633618,1634872,1634875,1634879-1634880,1634920,1636478,1636483,1636629,1636644,1637184,1637186,1637330,1637358,1637363,1637393,1639319,1639322,1639335,1639348,1639352,1639355,1639358,1639414,1639419,1639426,1639430,1639436,1639440,1639549,1640061-1640062,1640197,1640915,1640966,1641013,1643139,1643233,1645567,1646021,1646712,1646716,1647537,1647540-1647541,1647820,1647905,1648230,1648238,1648241-1648243,1648253,1648272,1648532,1648537-1648539,1648542,1648591,1648612,1649590,
 
1651567,1652068,1652076,1652441,1652451,1653608,1654932,1654934,1654937,1655635,1655649,1655651,1655664,1656176,1657525,1657972,1657978,1658482,1659212,1659217,1659314,1659509,1662668,1665318,1665854,1665894,1667090,1667101,1667538,1669743,1669746,1669749,1669945,1670139,1670953,1673170,1673197,1673202,1673204,1673445,1673454,1673685,1673689,1673875,1674165,1674341,1674400,1674404,1674631,1674669,1674673,1675396,1676667,1677431,1678149,1678151,1678718,1678725,1679169,1679907,1679920-1679924,1679926,1680347,1680460,1680464,1680476,1680819,1681949,1681966,1681974,1681994,1682008,1682076,1682086,1682093,1682259,1682265,1682739,1682864,1683311,1683330,1683378,1683544,1683553,1684047,1686232,1686542,1686546,1686554,1686557,1687061,1687064,1687070-1687071,1687074,1687078-1687079,1688270,1688425,1692650,1693886,1694489,1694848,1696171,1696185,1696627-1696628,1696630,1696758,1697372,1697381,1697387,1697393,1697403,1697405,1701017,1701053,1702600,1702922,1703069,1703142,1703237,1703240,17052
 
66,1705638,1705643,1705646,1705724,1705730,1705739,1706612,1706615,1706617,1706619,1706675-1706676,1706679,1706979-1706980,1707308,1707971-1707973,1707986,1707988-1707989,1708004,1709388,1709799,1710017,1710359,1710368,1710370,1711507,1711582,1711672,1712927,1715793,1715947,1716047,1716067,1716784,1716973-1716974,1717332,1717334,1717864,1719269,1719336,1719413,1719730,1720015,1721285,1723715,1723720,1723834,1723839,1725179-1725180,1726004,1726099,1726116,1726897,1726995,1727006-1727007,1727028,1727040,1727707,1727822,1730491,1735916,1736357,1736359,1737355-1737356,1740721-1740722,1741096,1741200,1741206,1741214,1741224,1742540,1745055,1745107,1745852,1746006,1746012,1746026,1756258-1756266,1756364,1756377,1759117,1759122-1759126,1759135,1759404-1759405,1759686,1764340,1764481,1764676,1766352,1780810,1781655,1781694,1785053,1785737-1785738,1785741,1785754,1785904,1786445-1786446,1786515
-/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914
+/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1807118-1819868

Modified: subversion/branches/better-pristines/subversion/libsvn_fs_x/changes.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_fs_x/changes.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_fs_x/changes.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_fs_x/changes.c Tue 
Jan  2 19:52:28 2018
@@ -184,7 +184,7 @@ svn_fs_x__changes_append_list(apr_size_t
 
   /* simply append the list and all changes */
   for (i = 0; i < list->nelts; ++i)
-    append_change(changes, APR_ARRAY_IDX(list, i, svn_fs_x__change_t *));
+    SVN_ERR(append_change(changes, APR_ARRAY_IDX(list, i, svn_fs_x__change_t 
*)));
 
   /* terminate the list by storing the next changes offset */
   APR_ARRAY_PUSH(changes->offsets, int) = changes->changes->nelts;

Modified: 
subversion/branches/better-pristines/subversion/libsvn_fs_x/low_level.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_fs_x/low_level.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_fs_x/low_level.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_fs_x/low_level.c Tue 
Jan  2 19:52:28 2018
@@ -1131,7 +1131,7 @@ svn_fs_x__write_changes(svn_stream_t *st
     }
 
   if (terminate_list)
-    svn_stream_puts(stream, "\n");
+    SVN_ERR(svn_stream_puts(stream, "\n"));
 
   svn_pool_destroy(iterpool);
 

Modified: subversion/branches/better-pristines/subversion/libsvn_fs_x/pack.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_fs_x/pack.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_fs_x/pack.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_fs_x/pack.c Tue Jan  
2 19:52:28 2018
@@ -2204,9 +2204,9 @@ pack_body(void *baton,
   if (fully_packed)
     {
       if (pb->notify_func)
-        (*pb->notify_func)(pb->notify_baton,
-                           ffd->min_unpacked_rev / ffd->max_files_per_dir,
-                           svn_fs_pack_notify_noop, scratch_pool);
+        SVN_ERR(pb->notify_func(pb->notify_baton,
+                                ffd->min_unpacked_rev / ffd->max_files_per_dir,
+                                svn_fs_pack_notify_noop, scratch_pool));
 
       return SVN_NO_ERROR;
     }
@@ -2258,9 +2258,9 @@ svn_fs_x__pack(svn_fs_t *fs,
       svn_fs_x__data_t *ffd = fs->fsap_data;
 
       if (notify_func)
-        (*notify_func)(notify_baton,
-                       ffd->min_unpacked_rev / ffd->max_files_per_dir,
-                       svn_fs_pack_notify_noop, scratch_pool);
+        SVN_ERR(notify_func(notify_baton,
+                            ffd->min_unpacked_rev / ffd->max_files_per_dir,
+                            svn_fs_pack_notify_noop, scratch_pool));
 
       return SVN_NO_ERROR;
     }

Modified: 
subversion/branches/better-pristines/subversion/libsvn_fs_x/transaction.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_fs_x/transaction.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_fs_x/transaction.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_fs_x/transaction.c 
Tue Jan  2 19:52:28 2018
@@ -1259,7 +1259,7 @@ get_and_increment_txn_key_body(void *bat
       SVN_ERR(svn_io_check_path(txn_dir, &kind, iterpool));
       if (kind == svn_node_none)
         {
-          svn_io_dir_make(txn_dir, APR_OS_DEFAULT, iterpool);
+          SVN_ERR(svn_io_dir_make(txn_dir, APR_OS_DEFAULT, iterpool));
           break;
         }
 

Modified: 
subversion/branches/better-pristines/subversion/libsvn_ra_local/ra_plugin.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_ra_local/ra_plugin.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_ra_local/ra_plugin.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_ra_local/ra_plugin.c 
Tue Jan  2 19:52:28 2018
@@ -1387,7 +1387,7 @@ svn_ra_local__get_dir(svn_ra_session_t *
             {
               /* size  */
               if (fs_entry->kind == svn_node_dir)
-                entry->size = 0;
+                entry->size = SVN_INVALID_FILESIZE;
               else
                 SVN_ERR(svn_fs_file_length(&(entry->size), root,
                                            fullpath, iterpool));

Modified: 
subversion/branches/better-pristines/subversion/libsvn_ra_serf/commit.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_ra_serf/commit.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_ra_serf/commit.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_ra_serf/commit.c Tue 
Jan  2 19:52:28 2018
@@ -687,7 +687,7 @@ maybe_set_lock_token_header(serf_bucket_
 {
   const char *token;
 
-  if (! (*relpath && commit_ctx->lock_tokens))
+  if (! commit_ctx->lock_tokens)
     return SVN_NO_ERROR;
 
   if (! svn_hash_gets(commit_ctx->deleted_entries, relpath))

Modified: 
subversion/branches/better-pristines/subversion/libsvn_ra_serf/options.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_ra_serf/options.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_ra_serf/options.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_ra_serf/options.c 
Tue Jan  2 19:52:28 2018
@@ -232,6 +232,11 @@ capabilities_headers_iterator_callback(v
              advertise this capability (Subversion 1.10 and greater). */
           session->supports_svndiff1 = TRUE;
         }
+      if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_LIST, vals))
+        {
+          svn_hash_sets(session->capabilities,
+                        SVN_RA_CAPABILITY_LIST, capability_yes);
+        }
       if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_SVNDIFF2, vals))
         {
           /* Same for svndiff2. */
@@ -384,6 +389,8 @@ options_response_handler(serf_request_t
                     capability_no);
       svn_hash_sets(session->capabilities, 
SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE,
                     capability_no);
+      svn_hash_sets(session->capabilities, SVN_RA_CAPABILITY_LIST,
+                    capability_no);
 
       /* Then see which ones we can discover. */
       serf_bucket_headers_do(hdrs, capabilities_headers_iterator_callback,

Modified: 
subversion/branches/better-pristines/subversion/libsvn_ra_serf/ra_serf.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_ra_serf/ra_serf.h?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_ra_serf/ra_serf.h 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_ra_serf/ra_serf.h 
Tue Jan  2 19:52:28 2018
@@ -1431,6 +1431,18 @@ svn_ra_serf__get_locks(svn_ra_session_t
                        svn_depth_t depth,
                        apr_pool_t *pool);
 
+/* Implements svn_ra__vtable_t.list(). */
+svn_error_t *
+svn_ra_serf__list(svn_ra_session_t *ra_session,
+                  const char *path,
+                  svn_revnum_t revision,
+                  const apr_array_header_t *patterns,
+                  svn_depth_t depth,
+                  apr_uint32_t dirent_fields,
+                  svn_ra_dirent_receiver_t receiver,
+                  void *receiver_baton,
+                  apr_pool_t *scratch_pool);
+
 /* Request a mergeinfo-report from the URL attached to SESSION,
    and fill in the MERGEINFO hash with the results.
 
@@ -1590,6 +1602,16 @@ svn_ra_serf__setup_svndiff_accept_encodi
 svn_boolean_t
 svn_ra_serf__is_low_latency_connection(svn_ra_serf__session_t *session);
 
+/* Return an APR array of svn_ra_serf__dav_props_t containing the
+ * properties (names and namespaces) corresponding to the flegs set
+ * in DIRENT_FIELDS.  If SESSION does not support deadprops, only
+ * the generic "DAV:allprop" will be returned.  Allocate the result
+ * in RESULT_POOL. */
+apr_array_header_t *
+svn_ra_serf__get_dirent_props(apr_uint32_t dirent_fields,
+                              svn_ra_serf__session_t *session,
+                              apr_pool_t *result_pool);
+
 /* Default limit for in-memory size of a request body. */
 #define SVN_RA_SERF__REQUEST_BODY_IN_MEM_SIZE 256 * 1024
 

Modified: subversion/branches/better-pristines/subversion/libsvn_ra_serf/serf.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_ra_serf/serf.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_ra_serf/serf.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_ra_serf/serf.c Tue 
Jan  2 19:52:28 2018
@@ -691,7 +691,7 @@ ra_serf_dup_session(svn_ra_session_t *ne
 
   if (new_sess->proxy_password)
     {
-      new_sess->proxy_username
+      new_sess->proxy_password
                 = apr_pstrdup(result_pool, new_sess->proxy_password);
     }
 
@@ -1063,7 +1063,7 @@ static const svn_ra__vtable_t serf_vtabl
   svn_ra_serf__get_deleted_rev,
   svn_ra_serf__get_inherited_props,
   NULL /* set_svn_ra_open */,
-  NULL /* svn_ra_list */,
+  svn_ra_serf__list,
   svn_ra_serf__register_editor_shim_callbacks,
   NULL /* commit_ev2 */,
   NULL /* replay_range_ev2 */

Modified: subversion/branches/better-pristines/subversion/libsvn_ra_serf/stat.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_ra_serf/stat.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_ra_serf/stat.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_ra_serf/stat.c Tue 
Jan  2 19:52:28 2018
@@ -216,64 +216,8 @@ get_dirent_props(apr_uint32_t dirent_fie
                  apr_pool_t *pool)
 {
   svn_ra_serf__dav_props_t *prop;
-  apr_array_header_t *props = apr_array_make
-    (pool, 7, sizeof(svn_ra_serf__dav_props_t));
-
-  if (session->supports_deadprop_count != svn_tristate_false
-      || ! (dirent_fields & SVN_DIRENT_HAS_PROPS))
-    {
-      if (dirent_fields & SVN_DIRENT_KIND)
-        {
-          prop = apr_array_push(props);
-          prop->xmlns = "DAV:";
-          prop->name = "resourcetype";
-        }
-
-      if (dirent_fields & SVN_DIRENT_SIZE)
-        {
-          prop = apr_array_push(props);
-          prop->xmlns = "DAV:";
-          prop->name = "getcontentlength";
-        }
-
-      if (dirent_fields & SVN_DIRENT_HAS_PROPS)
-        {
-          prop = apr_array_push(props);
-          prop->xmlns = SVN_DAV_PROP_NS_DAV;
-          prop->name = "deadprop-count";
-        }
-
-      if (dirent_fields & SVN_DIRENT_CREATED_REV)
-        {
-          svn_ra_serf__dav_props_t *p = apr_array_push(props);
-          p->xmlns = "DAV:";
-          p->name = SVN_DAV__VERSION_NAME;
-        }
-
-      if (dirent_fields & SVN_DIRENT_TIME)
-        {
-          prop = apr_array_push(props);
-          prop->xmlns = "DAV:";
-          prop->name = SVN_DAV__CREATIONDATE;
-        }
-
-      if (dirent_fields & SVN_DIRENT_LAST_AUTHOR)
-        {
-          prop = apr_array_push(props);
-          prop->xmlns = "DAV:";
-          prop->name = "creator-displayname";
-        }
-    }
-  else
-    {
-      /* We found an old subversion server that can't handle
-         the deadprop-count property in the way we expect.
-
-         The neon behavior is to retrieve all properties in this case */
-      prop = apr_array_push(props);
-      prop->xmlns = "DAV:";
-      prop->name = "allprop";
-    }
+  apr_array_header_t *props = svn_ra_serf__get_dirent_props(dirent_fields,
+                                                            session, pool);
 
   prop = apr_array_push(props);
   prop->xmlns = NULL;

Modified: subversion/branches/better-pristines/subversion/libsvn_ra_serf/util.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_ra_serf/util.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_ra_serf/util.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_ra_serf/util.c Tue 
Jan  2 19:52:28 2018
@@ -2065,3 +2065,72 @@ svn_ra_serf__is_low_latency_connection(s
   return session->conn_latency >= 0 &&
          session->conn_latency < apr_time_from_msec(5);
 }
+
+apr_array_header_t *
+svn_ra_serf__get_dirent_props(apr_uint32_t dirent_fields,
+                              svn_ra_serf__session_t *session,
+                              apr_pool_t *result_pool)
+{
+  svn_ra_serf__dav_props_t *prop;
+  apr_array_header_t *props = apr_array_make
+    (result_pool, 7, sizeof(svn_ra_serf__dav_props_t));
+
+  if (session->supports_deadprop_count != svn_tristate_false
+      || ! (dirent_fields & SVN_DIRENT_HAS_PROPS))
+    {
+      if (dirent_fields & SVN_DIRENT_KIND)
+        {
+          prop = apr_array_push(props);
+          prop->xmlns = "DAV:";
+          prop->name = "resourcetype";
+        }
+
+      if (dirent_fields & SVN_DIRENT_SIZE)
+        {
+          prop = apr_array_push(props);
+          prop->xmlns = "DAV:";
+          prop->name = "getcontentlength";
+        }
+
+      if (dirent_fields & SVN_DIRENT_HAS_PROPS)
+        {
+          prop = apr_array_push(props);
+          prop->xmlns = SVN_DAV_PROP_NS_DAV;
+          prop->name = "deadprop-count";
+        }
+
+      if (dirent_fields & SVN_DIRENT_CREATED_REV)
+        {
+          svn_ra_serf__dav_props_t *p = apr_array_push(props);
+          p->xmlns = "DAV:";
+          p->name = SVN_DAV__VERSION_NAME;
+        }
+
+      if (dirent_fields & SVN_DIRENT_TIME)
+        {
+          prop = apr_array_push(props);
+          prop->xmlns = "DAV:";
+          prop->name = SVN_DAV__CREATIONDATE;
+        }
+
+      if (dirent_fields & SVN_DIRENT_LAST_AUTHOR)
+        {
+          prop = apr_array_push(props);
+          prop->xmlns = "DAV:";
+          prop->name = "creator-displayname";
+        }
+    }
+  else
+    {
+      /* We found an old subversion server that can't handle
+         the deadprop-count property in the way we expect.
+
+         The neon behavior is to retrieve all properties in this case */
+      prop = apr_array_push(props);
+      prop->xmlns = "DAV:";
+      prop->name = "allprop";
+    }
+
+  return props;
+}
+

Modified: 
subversion/branches/better-pristines/subversion/libsvn_ra_svn/editorp.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_ra_svn/editorp.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_ra_svn/editorp.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_ra_svn/editorp.c Tue 
Jan  2 19:52:28 2018
@@ -351,17 +351,9 @@ static svn_error_t *ra_svn_apply_textdel
   svn_stream_set_write(diff_stream, ra_svn_svndiff_handler);
   svn_stream_set_close(diff_stream, ra_svn_svndiff_close_handler);
 
-  /* If the connection does not support SVNDIFF1 or if we don't want to use
-   * compression, use the non-compressing "version 0" implementation */
- /* ### TODO: Check SVN_RA_SVN_CAP_SVNDIFF2_ACCEPTED and decide between
-  * ###       svndiff1[at compression_level] and svndiff2 */
-  if (   svn_ra_svn_compression_level(b->conn) > 0
-      && svn_ra_svn_has_capability(b->conn, SVN_RA_SVN_CAP_SVNDIFF1))
-    svn_txdelta_to_svndiff3(wh, wh_baton, diff_stream, 1,
-                            b->conn->compression_level, pool);
-  else
-    svn_txdelta_to_svndiff3(wh, wh_baton, diff_stream, 0,
-                            b->conn->compression_level, pool);
+  svn_txdelta_to_svndiff3(wh, wh_baton, diff_stream,
+                          svn_ra_svn__svndiff_version(b->conn),
+                          b->conn->compression_level, pool);
   return SVN_NO_ERROR;
 }
 

Modified: 
subversion/branches/better-pristines/subversion/libsvn_ra_svn/marshal.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_ra_svn/marshal.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_ra_svn/marshal.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_ra_svn/marshal.c Tue 
Jan  2 19:52:28 2018
@@ -265,6 +265,24 @@ svn_ra_svn__set_capabilities(svn_ra_svn_
   return SVN_NO_ERROR;
 }
 
+int
+svn_ra_svn__svndiff_version(svn_ra_svn_conn_t *conn)
+{
+  /* If we don't want to use compression, use the non-compressing
+   * "version 0" implementation. */
+  if (svn_ra_svn_compression_level(conn) <= 0)
+    return 0;
+
+  /* Prefer SVNDIFF2 over SVNDIFF1. */
+  if (svn_ra_svn_has_capability(conn, SVN_RA_SVN_CAP_SVNDIFF2_ACCEPTED))
+    return 2;
+  if (svn_ra_svn_has_capability(conn, SVN_RA_SVN_CAP_SVNDIFF1))
+    return 1;
+
+  /* The connection does not support SVNDIFF1/2; default to "version 0". */
+  return 0;
+}
+
 apr_pool_t *
 svn_ra_svn__get_pool(svn_ra_svn_conn_t *conn)
 {

Modified: subversion/branches/better-pristines/subversion/libsvn_ra_svn/protocol
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_ra_svn/protocol?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_ra_svn/protocol 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_ra_svn/protocol Tue 
Jan  2 19:52:28 2018
@@ -342,7 +342,7 @@ second place for auth-request point as n
   stat
     params:   ( path:string [ rev:number ] )
     response: ( ? entry:dirent )
-    dirent:   ( name:string kind:node-kind size:number has-props:bool
+    dirent:   ( kind:node-kind size:number has-props:bool
                 created-rev:number [ created-date:string ]
                 [ last-author:string ] )
     New in svn 1.2.  If path is non-existent, an empty response is returned.

Modified: subversion/branches/better-pristines/subversion/libsvn_repos/list.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_repos/list.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_repos/list.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_repos/list.c Tue Jan 
 2 19:52:28 2018
@@ -50,6 +50,8 @@ fill_dirent(svn_dirent_t *dirent,
 
   if (dirent->kind == svn_node_file)
     SVN_ERR(svn_fs_file_length(&(dirent->size), root, path, scratch_pool));
+  else
+    dirent->size = SVN_INVALID_FILESIZE;
 
   SVN_ERR(svn_fs_node_has_props(&dirent->has_props, root, path,
                                 scratch_pool));

Modified: 
subversion/branches/better-pristines/subversion/libsvn_repos/load-fs-vtable.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_repos/load-fs-vtable.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- 
subversion/branches/better-pristines/subversion/libsvn_repos/load-fs-vtable.c 
(original)
+++ 
subversion/branches/better-pristines/subversion/libsvn_repos/load-fs-vtable.c 
Tue Jan  2 19:52:28 2018
@@ -1260,8 +1260,8 @@ svn_repos_load_fs6(svn_repos_t *repos,
                    svn_boolean_t use_pre_commit_hook,
                    svn_boolean_t use_post_commit_hook,
                    svn_boolean_t validate_props,
-                   svn_boolean_t normalize_props,
                    svn_boolean_t ignore_dates,
+                   svn_boolean_t normalize_props,
                    svn_repos_notify_func_t notify_func,
                    void *notify_baton,
                    svn_cancel_func_t cancel_func,

Modified: 
subversion/branches/better-pristines/subversion/libsvn_repos/reporter.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_repos/reporter.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_repos/reporter.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_repos/reporter.c Tue 
Jan  2 19:52:28 2018
@@ -973,11 +973,11 @@ update_entry(report_baton_t *b, svn_revn
           if (s_root == NULL)
             SVN_ERR(get_source_root(b, &s_root, s_rev));
 
-          SVN_ERR(svn_fs_props_different(&changed, s_root, s_path,
-                                         b->t_root, t_path, pool));
+          SVN_ERR(svn_fs_props_changed(&changed, s_root, s_path,
+                                       b->t_root, t_path, pool));
           if (!changed)
-            SVN_ERR(svn_fs_contents_different(&changed, s_root, s_path,
-                                              b->t_root, t_path, pool));
+            SVN_ERR(svn_fs_contents_changed(&changed, s_root, s_path,
+                                            b->t_root, t_path, pool));
         }
 
       if ((distance == 0 || !changed) && !any_path_info(b, e_path)

Modified: 
subversion/branches/better-pristines/subversion/libsvn_subr/compress_lz4.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/compress_lz4.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/compress_lz4.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/compress_lz4.c 
Tue Jan  2 19:52:28 2018
@@ -126,3 +126,19 @@ svn__decompress_lz4(const void *data, ap
 
   return SVN_NO_ERROR;
 }
+
+const char *
+svn_lz4__compiled_version(void)
+{
+  static const char lz4_version_str[] = APR_STRINGIFY(LZ4_VERSION_MAJOR) "." \
+                                        APR_STRINGIFY(LZ4_VERSION_MINOR) "." \
+                                        APR_STRINGIFY(LZ4_VERSION_RELEASE);
+
+  return lz4_version_str;
+}
+
+int
+svn_lz4__runtime_version(void)
+{
+  return LZ4_versionNumber();
+}

Modified: 
subversion/branches/better-pristines/subversion/libsvn_subr/config_file.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/config_file.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/config_file.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/config_file.c 
Tue Jan  2 19:52:28 2018
@@ -466,6 +466,7 @@ parse_value_continuation_lines(int *pch,
               else
                 {
                   /* This is a continuation line. Read it. */
+                  SVN_ERR(parser_ungetc(ctx, ch));
                   SVN_ERR(parser_get_line(ctx, ctx->line_read, &ch));
 
                   /* Trailing whitespace is ignored. */

Modified: subversion/branches/better-pristines/subversion/libsvn_subr/io.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/io.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/io.c Tue Jan  2 
19:52:28 2018
@@ -5440,3 +5440,20 @@ svn_io_file_readline(apr_file_t *file,
 
   return SVN_NO_ERROR;
 }
+
+svn_error_t *
+svn_io_stdin_readline(const char **result,
+                      apr_pool_t *result_pool,
+                      apr_pool_t *scratch_pool)
+{
+  svn_stringbuf_t *buf = NULL;
+  svn_stream_t *stdin_stream = NULL;
+  svn_boolean_t oob = FALSE;
+
+  SVN_ERR(svn_stream_for_stdin2(&stdin_stream, TRUE, scratch_pool));
+  SVN_ERR(svn_stream_readline(stdin_stream, &buf, APR_EOL_STR, &oob, 
result_pool));
+
+  *result = buf->data;
+
+  return SVN_NO_ERROR;
+}

Modified: 
subversion/branches/better-pristines/subversion/libsvn_subr/mergeinfo.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/mergeinfo.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/mergeinfo.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/mergeinfo.c Tue 
Jan  2 19:52:28 2018
@@ -271,197 +271,186 @@ combine_with_lastrange(const svn_merge_r
       APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) =
         svn_merge_range_dup(new_range, result_pool);
     }
+  else if (combine_ranges(&combined_range, lastrange, new_range,
+                     consider_inheritance))
+    {
+      *lastrange = combined_range;
+    }
   else if (!consider_inheritance)
     {
       /* We are not considering inheritance so we can merge intersecting
          ranges of different inheritability.  Of course if the ranges
          don't intersect at all we simply push NEW_RANGE onto RANGELIST. */
-      if (combine_ranges(&combined_range, lastrange, new_range, FALSE))
-        {
-          *lastrange = combined_range;
-        }
-      else
-        {
-          APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) =
+      APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) =
             svn_merge_range_dup(new_range, result_pool);
-        }
     }
   else /* Considering inheritance */
     {
-      if (combine_ranges(&combined_range, lastrange, new_range, TRUE))
-        {
-          /* Even when considering inheritance two intersection ranges
-             of the same inheritability can simply be combined. */
-          *lastrange = combined_range;
-        }
-      else
-        {
-          /* If we are here then the ranges either don't intersect or do
-             intersect but have differing inheritability.  Check for the
-             first case as that is easy to handle. */
-          intersection_type_t intersection_type;
-          svn_boolean_t sorted = FALSE;
+      /* If we are here then the ranges either don't intersect or do
+          intersect but have differing inheritability.  Check for the
+          first case as that is easy to handle. */
+      intersection_type_t intersection_type;
+      svn_boolean_t sorted = FALSE;
 
-          SVN_ERR(get_type_of_intersection(new_range, lastrange,
-                                           &intersection_type));
+      SVN_ERR(get_type_of_intersection(new_range, lastrange,
+                                        &intersection_type));
 
-          switch (intersection_type)
+      switch (intersection_type)
+        {
+          case svn__no_intersection:
+            /* NEW_RANGE and *LASTRANGE *really* don't intersect so
+                just push NEW_RANGE onto RANGELIST. */
+            APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) =
+              svn_merge_range_dup(new_range, result_pool);
+            sorted = (svn_sort_compare_ranges(&lastrange,
+                                              &new_range) < 0);
+            break;
+
+          case svn__equal_intersection:
+            /* They range are equal so all we do is force the
+                inheritability of lastrange to true. */
+            lastrange->inheritable = TRUE;
+            sorted = TRUE;
+            break;
+
+          case svn__adjoining_intersection:
+            /* They adjoin but don't overlap so just push NEW_RANGE
+                onto RANGELIST. */
+            APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) =
+              svn_merge_range_dup(new_range, result_pool);
+            sorted = (svn_sort_compare_ranges(&lastrange,
+                                              &new_range) < 0);
+            break;
+
+          case svn__overlapping_intersection:
+            /* They ranges overlap but neither is a proper subset of
+                the other.  We'll end up pusing two new ranges onto
+                RANGELIST, the intersecting part and the part unique to
+                NEW_RANGE.*/
             {
-              case svn__no_intersection:
-                /* NEW_RANGE and *LASTRANGE *really* don't intersect so
-                   just push NEW_RANGE onto RANGELIST. */
-                APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) =
-                  svn_merge_range_dup(new_range, result_pool);
-                sorted = (svn_sort_compare_ranges(&lastrange,
-                                                  &new_range) < 0);
-                break;
-
-              case svn__equal_intersection:
-                /* They range are equal so all we do is force the
-                   inheritability of lastrange to true. */
-                lastrange->inheritable = TRUE;
-                sorted = TRUE;
-                break;
-
-              case svn__adjoining_intersection:
-                /* They adjoin but don't overlap so just push NEW_RANGE
-                   onto RANGELIST. */
-                APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) =
-                  svn_merge_range_dup(new_range, result_pool);
-                sorted = (svn_sort_compare_ranges(&lastrange,
-                                                  &new_range) < 0);
-                break;
-
-              case svn__overlapping_intersection:
-                /* They ranges overlap but neither is a proper subset of
-                   the other.  We'll end up pusing two new ranges onto
-                   RANGELIST, the intersecting part and the part unique to
-                   NEW_RANGE.*/
-                {
-                  svn_merge_range_t *r1 = svn_merge_range_dup(lastrange,
-                                                              result_pool);
-                  svn_merge_range_t *r2 = svn_merge_range_dup(new_range,
-                                                              result_pool);
-
-                  /* Pop off *LASTRANGE to make our manipulations
-                     easier. */
-                  apr_array_pop(rangelist);
-
-                  /* Ensure R1 is the older range. */
-                  if (r2->start < r1->start)
-                    {
-                      /* Swap R1 and R2. */
-                      *r2 = *r1;
-                      *r1 = *new_range;
-                    }
+              svn_merge_range_t *r1 = svn_merge_range_dup(lastrange,
+                                                          result_pool);
+              svn_merge_range_t *r2 = svn_merge_range_dup(new_range,
+                                                          result_pool);
+
+              /* Pop off *LASTRANGE to make our manipulations
+                  easier. */
+              apr_array_pop(rangelist);
 
-                  /* Absorb the intersecting ranges into the
-                     inheritable range. */
-                  if (r1->inheritable)
-                    r2->start = r1->end;
-                  else
-                    r1->end = r2->start;
-
-                  /* Push everything back onto RANGELIST. */
-                  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = r1;
-                  sorted = (svn_sort_compare_ranges(&lastrange,
-                                                    &r1) < 0);
-                  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = r2;
-                  if (sorted)
-                    sorted = (svn_sort_compare_ranges(&r1, &r2) < 0);
-                  break;
+              /* Ensure R1 is the older range. */
+              if (r2->start < r1->start)
+                {
+                  /* Swap R1 and R2. */
+                  *r2 = *r1;
+                  *r1 = *new_range;
                 }
 
-              default: /* svn__proper_subset_intersection */
-                {
-                  /* One range is a proper subset of the other. */
-                  svn_merge_range_t *r1 = svn_merge_range_dup(lastrange,
-                                                              result_pool);
-                  svn_merge_range_t *r2 = svn_merge_range_dup(new_range,
-                                                              result_pool);
-                  svn_merge_range_t *r3 = NULL;
+              /* Absorb the intersecting ranges into the
+                  inheritable range. */
+              if (r1->inheritable)
+                r2->start = r1->end;
+              else
+                r1->end = r2->start;
+
+              /* Push everything back onto RANGELIST. */
+              APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = r1;
+              sorted = (svn_sort_compare_ranges(&lastrange,
+                                                &r1) < 0);
+              APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = r2;
+              if (sorted)
+                sorted = (svn_sort_compare_ranges(&r1, &r2) < 0);
+              break;
+            }
 
-                  /* Pop off *LASTRANGE to make our manipulations
-                     easier. */
-                  apr_array_pop(rangelist);
+          default: /* svn__proper_subset_intersection */
+            {
+              /* One range is a proper subset of the other. */
+              svn_merge_range_t *r1 = svn_merge_range_dup(lastrange,
+                                                          result_pool);
+              svn_merge_range_t *r2 = svn_merge_range_dup(new_range,
+                                                          result_pool);
+              svn_merge_range_t *r3 = NULL;
+
+              /* Pop off *LASTRANGE to make our manipulations
+                  easier. */
+              apr_array_pop(rangelist);
 
-                  /* Ensure R1 is the superset. */
-                  if (r2->start < r1->start || r2->end > r1->end)
-                    {
-                      /* Swap R1 and R2. */
-                      *r2 = *r1;
-                      *r1 = *new_range;
-                    }
+              /* Ensure R1 is the superset. */
+              if (r2->start < r1->start || r2->end > r1->end)
+                {
+                  /* Swap R1 and R2. */
+                  *r2 = *r1;
+                  *r1 = *new_range;
+                }
 
-                  if (r1->inheritable)
-                    {
-                      /* The simple case: The superset is inheritable, so
-                         just combine r1 and r2. */
-                      r1->start = MIN(r1->start, r2->start);
-                      r1->end = MAX(r1->end, r2->end);
-                      r2 = NULL;
-                    }
-                  else if (r1->start == r2->start)
-                    {
-                      svn_revnum_t tmp_revnum;
+              if (r1->inheritable)
+                {
+                  /* The simple case: The superset is inheritable, so
+                      just combine r1 and r2. */
+                  r1->start = MIN(r1->start, r2->start);
+                  r1->end = MAX(r1->end, r2->end);
+                  r2 = NULL;
+                }
+              else if (r1->start == r2->start)
+                {
+                  svn_revnum_t tmp_revnum;
 
-                      /* *LASTRANGE and NEW_RANGE share an end point. */
-                      tmp_revnum = r1->end;
-                      r1->end = r2->end;
-                      r2->inheritable = r1->inheritable;
-                      r1->inheritable = TRUE;
-                      r2->start = r1->end;
-                      r2->end = tmp_revnum;
-                    }
-                  else if (r1->end == r2->end)
-                    {
-                      /* *LASTRANGE and NEW_RANGE share an end point. */
-                      r1->end = r2->start;
-                      r2->inheritable = TRUE;
-                    }
-                  else
-                    {
-                      /* NEW_RANGE and *LASTRANGE share neither start
-                         nor end points. */
-                      r3 = apr_pcalloc(result_pool, sizeof(*r3));
-                      r3->start = r2->end;
-                      r3->end = r1->end;
-                      r3->inheritable = r1->inheritable;
-                      r2->inheritable = TRUE;
-                      r1->end = r2->start;
-                    }
+                  /* *LASTRANGE and NEW_RANGE share an end point. */
+                  tmp_revnum = r1->end;
+                  r1->end = r2->end;
+                  r2->inheritable = r1->inheritable;
+                  r1->inheritable = TRUE;
+                  r2->start = r1->end;
+                  r2->end = tmp_revnum;
+                }
+              else if (r1->end == r2->end)
+                {
+                  /* *LASTRANGE and NEW_RANGE share an end point. */
+                  r1->end = r2->start;
+                  r2->inheritable = TRUE;
+                }
+              else
+                {
+                  /* NEW_RANGE and *LASTRANGE share neither start
+                      nor end points. */
+                  r3 = apr_pcalloc(result_pool, sizeof(*r3));
+                  r3->start = r2->end;
+                  r3->end = r1->end;
+                  r3->inheritable = r1->inheritable;
+                  r2->inheritable = TRUE;
+                  r1->end = r2->start;
+                }
 
-                  /* Push everything back onto RANGELIST. */
-                  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = r1;
-                  sorted = (svn_sort_compare_ranges(&lastrange, &r1) < 0);
-                  if (r2)
-                    {
-                      APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = r2;
-                      if (sorted)
-                        sorted = (svn_sort_compare_ranges(&r1, &r2) < 0);
-                    }
-                  if (r3)
+              /* Push everything back onto RANGELIST. */
+              APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = r1;
+              sorted = (svn_sort_compare_ranges(&lastrange, &r1) < 0);
+              if (r2)
+                {
+                  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = r2;
+                  if (sorted)
+                    sorted = (svn_sort_compare_ranges(&r1, &r2) < 0);
+                }
+              if (r3)
+                {
+                  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = r3;
+                  if (sorted)
                     {
-                      APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = r3;
-                      if (sorted)
-                        {
-                          if (r2)
-                            sorted = (svn_sort_compare_ranges(&r2,
-                                                              &r3) < 0);
-                          else
-                            sorted = (svn_sort_compare_ranges(&r1,
-                                                              &r3) < 0);
-                        }
+                      if (r2)
+                        sorted = (svn_sort_compare_ranges(&r2,
+                                                          &r3) < 0);
+                      else
+                        sorted = (svn_sort_compare_ranges(&r1,
+                                                          &r3) < 0);
                     }
-                  break;
                 }
+              break;
             }
-
-          /* Some of the above cases might have put *RANGELIST out of
-             order, so re-sort.*/
-          if (!sorted)
-            svn_sort__array(rangelist, svn_sort_compare_ranges);
         }
+
+      /* Some of the above cases might have put *RANGELIST out of
+          order, so re-sort.*/
+      if (!sorted)
+        svn_sort__array(rangelist, svn_sort_compare_ranges);
     }
 
   return SVN_NO_ERROR;

Modified: 
subversion/branches/better-pristines/subversion/libsvn_subr/object_pool.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/object_pool.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/object_pool.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/object_pool.c 
Tue Jan  2 19:52:28 2018
@@ -172,9 +172,11 @@ add_object_ref(object_ref_t *object_ref,
   if (svn_atomic_inc(&object_ref->ref_count) == 0)
     svn_atomic_dec(&object_ref->object_pool->unused_count);
 
-  /* make sure the reference gets released automatically */
-  apr_pool_cleanup_register(pool, object_ref, object_ref_cleanup,
-                            apr_pool_cleanup_null);
+  /* Make sure the reference gets released automatically.
+     Since POOL might be a parent pool of OBJECT_REF->OBJECT_POOL,
+     to the reference counting update before destroing any of the
+     pool hierarchy. */
+  apr_pool_pre_cleanup_register(pool, object_ref, object_ref_cleanup);
 }
 
 /* Actual implementation of svn_object_pool__lookup.

Modified: subversion/branches/better-pristines/subversion/libsvn_subr/sqlite.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/sqlite.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/sqlite.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/sqlite.c Tue 
Jan  2 19:52:28 2018
@@ -65,8 +65,8 @@ extern int (*const svn_sqlite3__api_conf
 #  include <sqlite3.h>
 #endif
 
-#if !SQLITE_VERSION_AT_LEAST(3,7,12)
-#error SQLite is too old -- version 3.7.12 is the minimum required version
+#if !SQLITE_VERSION_AT_LEAST(3,8,2)
+#error SQLite is too old -- version 3.8.2 is the minimum required version
 #endif
 
 #ifndef SQLITE_DETERMINISTIC

Modified: subversion/branches/better-pristines/subversion/libsvn_subr/stream.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/stream.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/stream.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/stream.c Tue 
Jan  2 19:52:28 2018
@@ -1468,10 +1468,10 @@ seek_handler_checksum(void *baton, const
   else
     {
       if (btn->read_ctx)
-        svn_checksum_ctx_reset(btn->read_ctx);
+        SVN_ERR(svn_checksum_ctx_reset(btn->read_ctx));
 
       if (btn->write_ctx)
-        svn_checksum_ctx_reset(btn->write_ctx);
+        SVN_ERR(svn_checksum_ctx_reset(btn->write_ctx));
 
       SVN_ERR(svn_stream_reset(btn->proxy));
     }

Modified: subversion/branches/better-pristines/subversion/libsvn_subr/sysinfo.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/sysinfo.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/sysinfo.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/sysinfo.c Tue 
Jan  2 19:52:28 2018
@@ -127,7 +127,8 @@ const apr_array_header_t *
 svn_sysinfo__linked_libs(apr_pool_t *pool)
 {
   svn_version_ext_linked_lib_t *lib;
-  apr_array_header_t *array = apr_array_make(pool, 6, sizeof(*lib));
+  apr_array_header_t *array = apr_array_make(pool, 7, sizeof(*lib));
+  int lz4_version = svn_lz4__runtime_version();
 
   lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
   lib->name = "APR";
@@ -167,6 +168,15 @@ svn_sysinfo__linked_libs(apr_pool_t *poo
   lib->compiled_version = apr_pstrdup(pool, svn_zlib__compiled_version());
   lib->runtime_version = apr_pstrdup(pool, svn_zlib__runtime_version());
 
+  lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
+  lib->name = "LZ4";
+  lib->compiled_version = apr_pstrdup(pool, svn_lz4__compiled_version());
+
+  lib->runtime_version = apr_psprintf(pool, "%d.%d.%d",
+                                      lz4_version / 100 / 100,
+                                      (lz4_version / 100) % 100,
+                                      lz4_version % 100);
+
   return array;
 }
 

Propchange: 
subversion/branches/better-pristines/subversion/libsvn_subr/utf8proc/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan  2 19:52:28 2018
@@ -75,6 +75,8 @@
 
/subversion/branches/revprop-cache/subversion/libsvn_subr/utf8proc:1298521-1326293
 
/subversion/branches/revprop-caching-ng/subversion/libsvn_subr/utf8proc:1620597,1620599
 
/subversion/branches/revprop-packing/subversion/libsvn_subr/utf8proc:1143907,1143971,1143997,1144017,1144499,1144568,1146145
+/subversion/branches/shelve/subversion/libsvn_subr/utf8proc:1802592-1815226
+/subversion/branches/shelve-checkpoint/subversion/libsvn_subr/utf8proc:1801593-1801923,1801970
 
/subversion/branches/subtree-mergeinfo/subversion/libsvn_subr/utf8proc:876734-878766
 
/subversion/branches/svn-auth-x509/subversion/libsvn_subr/utf8proc:1603509-1655900
 
/subversion/branches/svn-info-detail/subversion/libsvn_subr/utf8proc:1660035-1662618
@@ -96,6 +98,6 @@
 
/subversion/branches/uris-as-urls/subversion/libsvn_subr/utf8proc:1060426-1064427
 
/subversion/branches/verify-at-commit/subversion/libsvn_subr/utf8proc:1462039-1462408
 
/subversion/branches/verify-keep-going/subversion/libsvn_subr/utf8proc:1439280-1546110
-/subversion/branches/wc-collate-path/subversion/libsvn_subr/utf8proc:1402685-1480384
-/subversion/trunk/subversion/libsvn_subr/utf8proc:1807118-1809765
+/subversion/branches/wc-collate-path/subversion/libsvn_subr/utf8proc:1402685-1405765
+/subversion/trunk/subversion/libsvn_subr/utf8proc:1807118-1819868
 /subversion/upstream/utf8proc:1405750-1809082

Modified: subversion/branches/better-pristines/subversion/libsvn_subr/utf8proc.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/utf8proc.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/utf8proc.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/utf8proc.c Tue 
Jan  2 19:52:28 2018
@@ -59,7 +59,9 @@ svn_utf__utf8proc_runtime_version(void)
   SVN_UNUSED(utf8proc_grapheme_break);
   SVN_UNUSED(utf8proc_tolower);
   SVN_UNUSED(utf8proc_toupper);
+#if UTF8PROC_VERSION_MAJOR >= 2
   SVN_UNUSED(utf8proc_totitle);
+#endif
   SVN_UNUSED(utf8proc_charwidth);
   SVN_UNUSED(utf8proc_category_string);
   SVN_UNUSED(utf8proc_NFD);

Modified: subversion/branches/better-pristines/subversion/libsvn_subr/version.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/version.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/version.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/version.c Tue 
Jan  2 19:52:28 2018
@@ -143,7 +143,7 @@ svn_version_extended(svn_boolean_t verbo
   info->build_time = __TIME__;
   info->build_host = SVN_BUILD_HOST;
   info->copyright = apr_pstrdup
-    (pool, _("Copyright (C) 2017 The Apache Software Foundation.\n"
+    (pool, _("Copyright (C) 2018 The Apache Software Foundation.\n"
              "This software consists of contributions made by many people;\n"
              "see the NOTICE file for more information.\n"
              "Subversion is open source software, see "

Modified: subversion/branches/better-pristines/subversion/libsvn_wc/wc_db.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_wc/wc_db.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_wc/wc_db.c Tue Jan  
2 19:52:28 2018
@@ -16533,8 +16533,8 @@ db_process_commit_queue(svn_wc__db_t *db
                                                         iterpool),
                                                     iterpool, iterpool));
 
-              lock_remove_txn(queue->wcroot, cqi->local_relpath, work_item,
-                              iterpool);
+              SVN_ERR(lock_remove_txn(queue->wcroot, cqi->local_relpath,
+                                      work_item, iterpool));
             }
           if (cqi->remove_changelist)
             SVN_ERR(svn_wc__db_op_set_changelist(db,

Modified: 
subversion/branches/better-pristines/subversion/libsvn_wc/wcroot_anchor.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_wc/wcroot_anchor.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_wc/wcroot_anchor.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_wc/wcroot_anchor.c 
Tue Jan  2 19:52:28 2018
@@ -183,6 +183,26 @@ svn_wc__get_wcroot(const char **wcroot_a
 
 
 svn_error_t *
+svn_wc__get_shelves_dir(char **dir,
+                        svn_wc_context_t *wc_ctx,
+                        const char *local_abspath,
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool)
+{
+  const char *wcroot_abspath;
+
+  SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, wc_ctx, local_abspath,
+                             scratch_pool, scratch_pool));
+  *dir = svn_dirent_join(wcroot_abspath, ".svn/shelves", result_pool);
+  
+  /* Ensure the directory exists. (Other versions of svn don't create it.) */
+  SVN_ERR(svn_io_make_dir_recursively(*dir, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
 svn_wc_get_actual_target2(const char **anchor,
                           const char **target,
                           svn_wc_context_t *wc_ctx,

Modified: subversion/branches/better-pristines/subversion/mod_dav_svn/dav_svn.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/mod_dav_svn/dav_svn.h?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/mod_dav_svn/dav_svn.h 
(original)
+++ subversion/branches/better-pristines/subversion/mod_dav_svn/dav_svn.h Tue 
Jan  2 19:52:28 2018
@@ -705,6 +705,7 @@ static const dav_report_elem dav_svn__re
   { SVN_XML_NAMESPACE, "get-deleted-rev-report" },
   { SVN_XML_NAMESPACE, SVN_DAV__MERGEINFO_REPORT },
   { SVN_XML_NAMESPACE, SVN_DAV__INHERITED_PROPS_REPORT },
+  { SVN_XML_NAMESPACE, "list-report" },
   { NULL, NULL },
 };
 
@@ -757,6 +758,11 @@ dav_svn__get_inherited_props_report(cons
                                     const apr_xml_doc *doc,
                                     dav_svn__output *output);
 
+dav_error *
+dav_svn__list_report(const dav_resource *resource,
+                     const apr_xml_doc *doc,
+                     dav_svn__output *output);
+
 /*** posts/ ***/
 
 /* The various POST handlers, defined in posts/, and used by repos.c.  */
@@ -1114,6 +1120,19 @@ dav_svn__get_youngest_rev(svn_revnum_t *
                           dav_svn_repos *repos,
                           apr_pool_t *scratch_pool);
 
+/* Return the liveprop-encoded form of AUTHOR, allocated in RESULT_POOL.
+ * If IS_SVN_CLIENT is set, assume that the data will be sent to a SVN
+ * client.  This mainly sanitizes AUTHOR strings with control chars in
+ * them without converting them to escape sequences etc.
+ *
+ * Use SCRATCH_POOL for temporary allocations.
+ */
+const char *
+dav_svn__fuzzy_escape_author(const char *author,
+                             svn_boolean_t is_svn_client,
+                             apr_pool_t *result_pool,
+                             apr_pool_t *scratch_pool);
+
 /*** mirror.c ***/
 
 /* Perform the fixup hook for the R request.  */

Modified: 
subversion/branches/better-pristines/subversion/mod_dav_svn/liveprops.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/mod_dav_svn/liveprops.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/mod_dav_svn/liveprops.c 
(original)
+++ subversion/branches/better-pristines/subversion/mod_dav_svn/liveprops.c Tue 
Jan  2 19:52:28 2018
@@ -423,43 +423,10 @@ insert_prop_internal(const dav_resource
         if (last_author == NULL)
           return DAV_PROP_INSERT_NOTDEF;
 
-        if (svn_xml_is_xml_safe(last_author->data, last_author->len)
-            || !resource->info->repos->is_svn_client)
-          value = apr_xml_quote_string(scratch_pool, last_author->data, 1);
-        else
-          {
-            /* We are talking to a Subversion client, which will (like any 
proper
-               xml parser) error out if we produce control characters in XML.
-
-               However Subversion clients process both the generic
-               <creator-displayname /> as the custom element for svn:author.
-
-               Let's skip outputting the invalid characters here to make the 
XML
-               valid, so clients can see the custom element.
-
-               Subversion Clients will then either use a slightly invalid
-               author (unlikely) or more likely use the second result, which
-               will be transferred with full escaping capabilities.
-
-               We have tests in place to assert proper behavior over the RA 
layer.
-             */
-            apr_size_t i;
-            svn_stringbuf_t *buf;
-
-            buf = svn_stringbuf_create_from_string(last_author, scratch_pool);
-
-            for (i = 0; i < buf->len; i++)
-              {
-                char c = buf->data[i];
-
-                if (svn_ctype_iscntrl(c))
-                  {
-                    svn_stringbuf_remove(buf, i--, 1);
-                  }
-              }
-
-            value = apr_xml_quote_string(scratch_pool, buf->data, 1);
-          }
+        /* We need to sanitize the LAST_AUTHOR. */
+        value = dav_svn__fuzzy_escape_author(last_author->data,
+                                      resource->info->repos->is_svn_client,
+                                      scratch_pool, scratch_pool);
         break;
       }
 

Modified: subversion/branches/better-pristines/subversion/mod_dav_svn/util.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/mod_dav_svn/util.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/mod_dav_svn/util.c 
(original)
+++ subversion/branches/better-pristines/subversion/mod_dav_svn/util.c Tue Jan  
2 19:52:28 2018
@@ -37,6 +37,7 @@
 #include "svn_fs.h"
 #include "svn_dav.h"
 #include "svn_base64.h"
+#include "svn_ctype.h"
 
 #include "dav_svn.h"
 #include "private/svn_fspath.h"
@@ -954,3 +955,48 @@ dav_svn__get_youngest_rev(svn_revnum_t *
    *youngest_p = repos->youngest_rev;
    return SVN_NO_ERROR;
 }
+
+const char *
+dav_svn__fuzzy_escape_author(const char *author,
+                             svn_boolean_t is_svn_client,
+                             apr_pool_t *result_pool,
+                             apr_pool_t *scratch_pool)
+{
+  apr_size_t len = strlen(author);
+  if (is_svn_client && !svn_xml_is_xml_safe(author, len))
+    {
+      /* We are talking to a Subversion client, which will (like any proper
+         xml parser) error out if we produce control characters in XML.
+
+         However Subversion clients process both the generic
+         <creator-displayname /> as the custom element for svn:author.
+
+         Let's skip outputting the invalid characters here to make the XML
+         valid, so clients can see the custom element.
+
+         Subversion Clients will then either use a slightly invalid
+         author (unlikely) or more likely use the second result, which
+         will be transferred with full escaping capabilities.
+
+         We have tests in place to assert proper behavior over the RA layer.
+       */
+      apr_size_t i;
+      svn_stringbuf_t *buf;
+
+      buf = svn_stringbuf_ncreate(author, len, scratch_pool);
+
+      for (i = 0; i < buf->len; i++)
+        {
+          char c = buf->data[i];
+
+          if (svn_ctype_iscntrl(c))
+            {
+              svn_stringbuf_remove(buf, i--, 1);
+            }
+        }
+
+      author = buf->data;
+    }
+
+  return apr_xml_quote_string(result_pool, author, 1);
+}

Modified: subversion/branches/better-pristines/subversion/mod_dav_svn/version.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/mod_dav_svn/version.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/mod_dav_svn/version.c 
(original)
+++ subversion/branches/better-pristines/subversion/mod_dav_svn/version.c Tue 
Jan  2 19:52:28 2018
@@ -155,6 +155,7 @@ get_vsn_options(apr_pool_t *p, apr_text_
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_SVNDIFF1);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_SVNDIFF2);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_PUT_RESULT_CHECKSUM);
+  apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_LIST);
   /* Mergeinfo is a special case: here we merely say that the server
    * knows how to handle mergeinfo -- whether the repository does too
    * is a separate matter.
@@ -1154,6 +1155,10 @@ deliver_report(request_rec *r,
         {
           return dav_svn__get_inherited_props_report(resource, doc, output);
         }
+      else if (strcmp(doc->root->name, "list-report") == 0)
+        {
+          return dav_svn__list_report(resource, doc, output);
+        }
       /* NOTE: if you add a report, don't forget to add it to the
        *       dav_svn__reports_list[] array.
        */

Modified: subversion/branches/better-pristines/subversion/svn/cl.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/cl.h?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/cl.h (original)
+++ subversion/branches/better-pristines/subversion/svn/cl.h Tue Jan  2 
19:52:28 2018
@@ -178,6 +178,7 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t help;            /* print usage message */
   const char *auth_username;     /* auth username */
   const char *auth_password;     /* auth password */
+  svn_boolean_t auth_password_from_stdin; /* read password from stdin */
   const char *extensions;        /* subprocess extension args */
   apr_array_header_t *targets;   /* target list from file */
   svn_boolean_t xml;             /* output in xml, e.g., "svn log --xml" */
@@ -255,6 +256,7 @@ typedef struct svn_cl__opt_state_t
   const char *show_item;           /* print only the given item */
   svn_boolean_t adds_as_modification; /* update 'add vs add' no tree conflict 
*/
   svn_boolean_t vacuum_pristines; /* remove unreferenced pristines */
+  svn_boolean_t list;
   svn_version_t *compatible_version; /* working copy compatibility version */
 } svn_cl__opt_state_t;
 
@@ -303,6 +305,9 @@ svn_opt_subcommand_t
   svn_cl__revert,
   svn_cl__resolve,
   svn_cl__resolved,
+  svn_cl__shelve,
+  svn_cl__unshelve,
+  svn_cl__shelves,
   svn_cl__status,
   svn_cl__switch,
   svn_cl__unlock,

Modified: 
subversion/branches/better-pristines/subversion/svn/conflict-callbacks.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/conflict-callbacks.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/conflict-callbacks.c 
(original)
+++ subversion/branches/better-pristines/subversion/svn/conflict-callbacks.c 
Tue Jan  2 19:52:28 2018
@@ -115,7 +115,7 @@ show_diff(svn_client_conflict_t *conflic
        * as it appears after the merge operation).
        *
        * For conflicts recorded by the 'update' and 'switch' operations,
-       * show a diff beween 'theirs' (the new pristine version of the
+       * show a diff between 'theirs' (the new pristine version of the
        * file) and 'merged' (the version of the file as it appears with
        * local changes merged with the new pristine version).
        *
@@ -1654,8 +1654,8 @@ prompt_move_target_path(int *preferred_m
         {
           char buf[1024];
 
-          svn_cmdline_fprintf(stderr, iterpool, "%s\n",
-                              svn_err_best_message(err, buf, sizeof(buf)));
+          SVN_ERR(svn_cmdline_fprintf(stderr, iterpool, "%s\n",
+                                      svn_err_best_message(err, buf, 
sizeof(buf))));
           svn_error_clear(err);
           continue;
         }

Modified: subversion/branches/better-pristines/subversion/svn/help-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/help-cmd.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/help-cmd.c (original)
+++ subversion/branches/better-pristines/subversion/svn/help-cmd.c Tue Jan  2 
19:52:28 2018
@@ -148,21 +148,24 @@ svn_cl__help(apr_getopt_t *os,
                            _("\nThe following authentication credential caches 
are available:\n\n"));
 
   /*### There is no API to query available providers at run time. */
+  if (config_path)
+    {
 #if (defined(WIN32) && !defined(__MINGW32__))
-  version_footer =
-    svn_stringbuf_create(apr_psprintf(pool, _("%s* Wincrypt cache in %s\n"),
-                                      version_footer->data,
-                                      svn_dirent_local_style(config_path,
-                                                             pool)),
-                         pool);
+      version_footer =
+        svn_stringbuf_create(apr_psprintf(pool, _("%s* Wincrypt cache in 
%s\n"),
+                                          version_footer->data,
+                                          svn_dirent_local_style(config_path,
+                                                                 pool)),
+                             pool);
 #elif !defined(SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE)
-  version_footer =
-    svn_stringbuf_create(apr_psprintf(pool, _("%s* Plaintext cache in %s\n"),
-                                      version_footer->data,
-                                      svn_dirent_local_style(config_path,
-                                                             pool)),
-                         pool);
+      version_footer =
+        svn_stringbuf_create(apr_psprintf(pool, _("%s* Plaintext cache in 
%s\n"),
+                                          version_footer->data,
+                                          svn_dirent_local_style(config_path,
+                                                                 pool)),
+                             pool);
 #endif
+    }
 #ifdef SVN_HAVE_GNOME_KEYRING
   svn_stringbuf_appendcstr(version_footer, "* Gnome Keyring\n");
 #endif

Modified: subversion/branches/better-pristines/subversion/svn/list-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/list-cmd.c?rev=1819877&r1=1819876&r2=1819877&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/list-cmd.c (original)
+++ subversion/branches/better-pristines/subversion/svn/list-cmd.c Tue Jan  2 
19:52:28 2018
@@ -385,14 +385,20 @@ svn_cl__list(apr_getopt_t *os,
               apr_array_header_t *pattern_group
                 = APR_ARRAY_IDX(opt_state->search_patterns, k,
                                 apr_array_header_t *);
+              const char *pattern;
 
               /* Should never fail but ... */
               if (pattern_group->nelts != 1)
                 return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                                   _("'search-and' option is not supported"));
 
-              APR_ARRAY_PUSH(patterns, const char *)
-                = APR_ARRAY_IDX(pattern_group, 0, const char *);
+              pattern = APR_ARRAY_IDX(pattern_group, 0, const char *);
+#if defined(WIN32)
+              /* As we currently can't pass glob patterns via the Windows
+                 CLI, fall back to sub-string search. */
+              pattern = apr_psprintf(subpool, "*%s*", pattern);
+#endif
+              APR_ARRAY_PUSH(patterns, const char *) = pattern;
             }
         }
 


Reply via email to