You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2015/11/26 05:00:16 UTC

svn commit: r1716561 - in /subversion/branches/1.9.x: ./ notes/ notes/api-errata/1.9/ subversion/include/ subversion/libsvn_fs_base/ subversion/libsvn_fs_fs/ subversion/libsvn_repos/ subversion/tests/cmdline/

Author: svn-role
Date: Thu Nov 26 04:00:16 2015
New Revision: 1716561

URL: http://svn.apache.org/viewvc?rev=1716561&view=rev
Log:
Merge the 1.9.x-r1706428 branch:

 * r1706428, r1706437, r1709388, r1711250, r1711507, r1711510
   Fix issue #4598, "No-op changes no longer dumped by 'svnadmin dump' in 1.9"
   Justification:
     Possible loss of information, different dumps produced by svnadmin and
     svnrdump.  Repository dumps can be used for backup purposes.  Regression
     from 1.8.
   Notes:
     Whole discussion is in http://svn.haxx.se/dev/archive-2015-09/0269.shtml
     (Subject: "No-op changes no longer dumped by 'svnadmin dump' in 1.9").
     .
     r1706428, r1706437 add a regression test.  r1709388, r1711507 fix the
     issue.  r1711250, r1711510 update documentation.  Backport branch is
     required due to conflict in /subversion/tests/cmdline/svnadmin_tests.py
   Branch:
     ^/subversion/branches/1.9.x-r1706428
   Votes:
     +1: kotkov, ivan, stefan2

Modified:
    subversion/branches/1.9.x/   (props changed)
    subversion/branches/1.9.x/STATUS
    subversion/branches/1.9.x/notes/   (props changed)
    subversion/branches/1.9.x/notes/api-errata/1.9/fs001.txt
    subversion/branches/1.9.x/subversion/include/svn_fs.h
    subversion/branches/1.9.x/subversion/libsvn_fs_base/dag.c
    subversion/branches/1.9.x/subversion/libsvn_fs_base/fs.h
    subversion/branches/1.9.x/subversion/libsvn_fs_fs/dag.c
    subversion/branches/1.9.x/subversion/libsvn_fs_fs/fs.h
    subversion/branches/1.9.x/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/1.9.x/subversion/libsvn_fs_fs/fs_fs.h
    subversion/branches/1.9.x/subversion/libsvn_fs_fs/tree.c
    subversion/branches/1.9.x/subversion/libsvn_repos/dump.c
    subversion/branches/1.9.x/subversion/tests/cmdline/svnadmin_tests.py

Propchange: subversion/branches/1.9.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 26 04:00:16 2015
@@ -6,6 +6,7 @@
 /subversion/branches/1.9.x-r1667233:1673207-1673638
 /subversion/branches/1.9.x-r1700215:1701365-1703825
 /subversion/branches/1.9.x-r1703581:1703613-1713071
+/subversion/branches/1.9.x-r1706428:1711251-1716560
 /subversion/branches/10Gb:1388102,1388163-1388190,1388195,1388202,1388205,1388211,1388276,1388362,1388375,1388394,1388636,1388639-1388640,1388643-1388644,1388654,1388720,1388789,1388795,1388801,1388805,1388807,1388810,1388816,1389044,1389276,1389289,1389662,1389867,1390017,1390209,1390216,1390407,1390409,1390414,1390419,1390955
 /subversion/branches/atomic-revprop:965046-1000689
 /subversion/branches/authzperf:1615360
@@ -95,4 +96,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663530,1663671,1663697,1663706,1663738,1663749,1663791,1663991,1664035,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664489-1664490,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664593-1664594,1664596,1664653,1664664,1664672,1664674,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665213,1665259,1665318,1665437-1665438,1665609,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666258,1666270,1666272,1666379,1666449,1666690,1666832,1666851,1666965,1667101,1667106-1667107,1667120,1667228,1667233-1667235,1667249-1667250,1667258,1667290,1667301,1667471,1667691-1667693,1667699-1667700,1667715,1667941,1667976,1668320,1668598-1668600,1668602-1668603,1668607-1668608,1668618,1669743,1669746,1669749,1669945,1670139,1670149,1670152,1670329,1670337,167
 0347,1670353,1671164,1671388,1672295,1672311,1672372,1672404,1672511-1672512,1672578,1672728,1673044,1673062-1673063,1673065,1673153,1673170,1673172,1673197,1673202,1673204,1673228,1673282,1673445,1673691-1673692,1673746,1673785,1673803,1674015,1674032,1674170,1674301,1674305,1674308,1674339-1674340,1674406,1674415,1674455-1674456,1674475,1674487,1674522,1674580,1674626-1674627,1674785,1674891,1675771,1675774,1676526,1676535,1676538,1676555,1676564,1676570,1676665,1676667,1676769,1677003,1677191,1677267,1677440,1678147,1678149,1678494,1678571,1678734,1678742,1678745-1678746,1678755,1678839,1678846,1678894,1678950,1678963,1679166,1679169,1679228,1679230,1679240,1679287,1679864,1679866,1679909,1680242,1680264,1680495,1680705,1680819,1681317,1682714,1682854,1683071,1683126,1683135,1683290,1683303,1683311,1683378,1683387,1684034,1684077,1684322,1684325,1684344,1684412,1684940,1685034,1685085,1686175,1686239,1686478,1686541,1686543,1686554,1686557,1686802,1686888,1686984,1687029,1687304,
 1687389,1687769,1687776,1687812,1688258,1688273,1688395,1689214,1689216,1689721,1689729,1691712-1691713,1691924,1691928,1692091,1692093,1692098,1692448,1692469-1692470,1692798-1692799,1693135,1693138,1693159,1693886,1694023,1694194,1694481,1694929,1695022,1695600,1695606,1695681,1696222,1696225,1696387,1696695,1697381,1697384,1697387,1697664,1697824,1697835,1697845,1697914,1697967,1698106,1698312,1700215,1700219-1700220,1700740,1700951,1701064,1701206,1701270,1701298,1701598,1701603,1701611,1701633,1701638,1701646,1701736,1701792,1701797,1701838,1701997,1702198,1702200,1702203,1702218,1702231,1702237-1702239,1702247,1702288,1702299-1702300,1702310,1702397,1702407,1702467,1702472,1702474,1702478,1702533,1702549,1702553,1702565,1702891,1702974,1702991,1703581,1703675,1703740,1704847,1705060,1705062,1705064,1705088,1705328,1705843,1706241,1706323-1706324,1706783,1706983,1706999,1708699,1709389,1709553,1709562,1710104,1710215,1710290,1710558,1711346,1714314,1714358,1715224,1715232,17152
 62
+/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663530,1663671,1663697,1663706,1663738,1663749,1663791,1663991,1664035,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664489-1664490,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664593-1664594,1664596,1664653,1664664,1664672,1664674,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665213,1665259,1665318,1665437-1665438,1665609,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666258,1666270,1666272,1666379,1666449,1666690,1666832,1666851,1666965,1667101,1667106-1667107,1667120,1667228,1667233-1667235,1667249-1667250,1667258,1667290,1667301,1667471,1667691-1667693,1667699-1667700,1667715,1667941,1667976,1668320,1668598-1668600,1668602-1668603,1668607-1668608,1668618,1669743,1669746,1669749,1669945,1670139,1670149,1670152,1670329,1670337,167
 0347,1670353,1671164,1671388,1672295,1672311,1672372,1672404,1672511-1672512,1672578,1672728,1673044,1673062-1673063,1673065,1673153,1673170,1673172,1673197,1673202,1673204,1673228,1673282,1673445,1673691-1673692,1673746,1673785,1673803,1674015,1674032,1674170,1674301,1674305,1674308,1674339-1674340,1674406,1674415,1674455-1674456,1674475,1674487,1674522,1674580,1674626-1674627,1674785,1674891,1675771,1675774,1676526,1676535,1676538,1676555,1676564,1676570,1676665,1676667,1676769,1677003,1677191,1677267,1677440,1678147,1678149,1678494,1678571,1678734,1678742,1678745-1678746,1678755,1678839,1678846,1678894,1678950,1678963,1679166,1679169,1679228,1679230,1679240,1679287,1679864,1679866,1679909,1680242,1680264,1680495,1680705,1680819,1681317,1682714,1682854,1683071,1683126,1683135,1683290,1683303,1683311,1683378,1683387,1684034,1684077,1684322,1684325,1684344,1684412,1684940,1685034,1685085,1686175,1686239,1686478,1686541,1686543,1686554,1686557,1686802,1686888,1686984,1687029,1687304,
 1687389,1687769,1687776,1687812,1688258,1688273,1688395,1689214,1689216,1689721,1689729,1691712-1691713,1691924,1691928,1692091,1692093,1692098,1692448,1692469-1692470,1692798-1692799,1693135,1693138,1693159,1693886,1694023,1694194,1694481,1694929,1695022,1695600,1695606,1695681,1696222,1696225,1696387,1696695,1697381,1697384,1697387,1697664,1697824,1697835,1697845,1697914,1697967,1698106,1698312,1700215,1700219-1700220,1700740,1700951,1701064,1701206,1701270,1701298,1701598,1701603,1701611,1701633,1701638,1701646,1701736,1701792,1701797,1701838,1701997,1702198,1702200,1702203,1702218,1702231,1702237-1702239,1702247,1702288,1702299-1702300,1702310,1702397,1702407,1702467,1702472,1702474,1702478,1702533,1702549,1702553,1702565,1702891,1702974,1702991,1703581,1703675,1703740,1704847,1705060,1705062,1705064,1705088,1705328,1705843,1706241,1706323-1706324,1706428,1706437,1706783,1706983,1706999,1708699,1709388-1709389,1709553,1709562,1710104,1710215,1710290,1710558,1711250,1711346,17115
 07,1711510,1714314,1714358,1715224,1715232,1715262

Modified: subversion/branches/1.9.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/STATUS?rev=1716561&r1=1716560&r2=1716561&view=diff
==============================================================================
--- subversion/branches/1.9.x/STATUS (original)
+++ subversion/branches/1.9.x/STATUS Thu Nov 26 04:00:16 2015
@@ -89,24 +89,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1706428, r1706437, r1709388, r1711250, r1711507, r1711510
-   Fix issue #4598, "No-op changes no longer dumped by 'svnadmin dump' in 1.9"
-   Justification:
-     Possible loss of information, different dumps produced by svnadmin and
-     svnrdump.  Repository dumps can be used for backup purposes.  Regression
-     from 1.8.
-   Notes:
-     Whole discussion is in http://svn.haxx.se/dev/archive-2015-09/0269.shtml
-     (Subject: "No-op changes no longer dumped by 'svnadmin dump' in 1.9").
-     .
-     r1706428, r1706437 add a regression test.  r1709388, r1711507 fix the
-     issue.  r1711250, r1711510 update documentation.  Backport branch is
-     required due to conflict in /subversion/tests/cmdline/svnadmin_tests.py
-   Branch:
-     ^/subversion/branches/1.9.x-r1706428
-   Votes:
-     +1: kotkov, ivan, stefan2
-
  * r1715793
    Do not read TXN props on every svn_fs_txn_open() call in libsvn_fs_fs: FSFS
    doesn't use transaction_t.proplist (and never used). This code seems to
@@ -118,4 +100,3 @@ Approved changes:
      request on transaction.
    Votes:
      +1: ivan, rhuijben, stefan2
-

Propchange: subversion/branches/1.9.x/notes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 26 04:00:16 2015
@@ -1,4 +1,5 @@
 /subversion/branches/1.5.x-r30215/notes:870312
+/subversion/branches/1.9.x-r1706428/notes:1711251-1716560
 /subversion/branches/bdb-reverse-deltas/notes:872050-872529
 /subversion/branches/diff-callbacks3/notes:870059-870761
 /subversion/branches/dont-save-plaintext-passwords-by-default/notes:870728-871118
@@ -39,3 +40,4 @@
 /subversion/branches/tc_url_rev/notes:874351-874483
 /subversion/branches/tree-conflicts/notes:868291-873154
 /subversion/branches/tree-conflicts-notify/notes:873926-874008
+/subversion/trunk/notes:1711250

Modified: subversion/branches/1.9.x/notes/api-errata/1.9/fs001.txt
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/notes/api-errata/1.9/fs001.txt?rev=1716561&r1=1716560&r2=1716561&view=diff
==============================================================================
--- subversion/branches/1.9.x/notes/api-errata/1.9/fs001.txt (original)
+++ subversion/branches/1.9.x/notes/api-errata/1.9/fs001.txt Thu Nov 26 04:00:16 2015
@@ -3,9 +3,22 @@ API ERRATA -- $Id$
 Root Cause of Errata: implementation/docstring mismatch
  Library(s) Affected: libsvn_fs_fs, libsvn_fs_base
 Function(s) Affected: svn_fs_props_changed, svn_fs_contents_changed
-     New Behavior in: 1.9
-      Related Issues: n/a
+     New Behavior in: 1.9.0-1.9.2 (only, see note below)
+      Related Issues: 4598
 
+[ Note: This only applies to Subversion 1.9.0-1.9.2; later versions
+        restore the original behavior of svn_fs_props_changed and
+        svn_fs_contents_changed.  The new svn_fs_props_different
+        svn_fs_contents_different functions are available for the
+        API users as well.
+
+        References:
+
+        https://issues.apache.org/jira/browse/SVN-4598
+        https://mail-archives.apache.org/mod_mbox/subversion-dev/201509.mbox/%3CCAB84uBVe8QnEpbPVAb__yQjiDDoYjFn2+M9mPcdBXZCwMCpOLw@mail.gmail.com%3E
+        ("No-op changes no longer dumped by 'svnadmin dump' in 1.9")
+        https://mail-archives.apache.org/mod_mbox/subversion-dev/201302.mbox/%3C510B6AE9.9070106@collab.net%3E
+        ("Re: Reintegrate-like merges and diff_ignore_ancestry") ]
 
 == Details ==
 

Modified: subversion/branches/1.9.x/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/svn_fs.h?rev=1716561&r1=1716560&r2=1716561&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/svn_fs.h (original)
+++ subversion/branches/1.9.x/subversion/include/svn_fs.h Thu Nov 26 04:00:16 2015
@@ -1861,6 +1861,15 @@ svn_fs_change_node_prop(svn_fs_root_t *r
  * both roots must be in the same filesystem.
  * Do any necessary temporary allocation in @a scratch_pool.
  *
+ * @note For the purposes of preserving accurate history, certain bits of
+ * code (such as the repository dump code) need to care about the distinction
+ * between situations when the properties are "different" and "have changed
+ * across two points in history".  We have a pair of functions that can
+ * answer both of these questions, svn_fs_props_different() and
+ * svn_fs_props_changed().  See issue 4598 for more details.
+ *
+ * @see svn_fs_props_changed
+ *
  * @since New in 1.9.
  */
 svn_error_t *
@@ -1872,9 +1881,7 @@ svn_fs_props_different(svn_boolean_t *di
                        apr_pool_t *scratch_pool);
 
 
-/** Determine if the properties of two path/root combinations are different.
- * In contrast to #svn_fs_props_different, we only perform a quick test and
- * allow for false positives.
+/** Determine if the properties of two path/root combinations have changed.
  *
  * Set @a *changed_p to #TRUE if the properties at @a path1 under @a root1
  * differ from those at @a path2 under @a root2, or set it to #FALSE if they
@@ -1882,15 +1889,19 @@ svn_fs_props_different(svn_boolean_t *di
  * both roots must be in the same filesystem.
  * Do any necessary temporary allocation in @a pool.
  *
- * @note The behavior is implementation dependent in that the false
- * positives reported may differ from release to release and backend to
- * backend.  There is also no guarantee that there will be false positives
- * at all.
- *
- * @note Prior to Subversion 1.9, this function would return false negatives
- * for FSFS: If @a root1 and @a root2 were both transaction roots
- * and the proplists of both paths had been changed in their respective
- * transactions, @a changed_p would be set to #FALSE.
+ * @note For the purposes of preserving accurate history, certain bits of
+ * code (such as the repository dump code) need to care about the distinction
+ * between situations when the properties are "different" and "have changed
+ * across two points in history".  We have a pair of functions that can
+ * answer both of these questions, svn_fs_props_different() and
+ * svn_fs_props_changed().  See issue 4598 for more details.
+ *
+ * @note This function can currently return false negatives for FSFS:
+ * If @a root1 and @a root2 were both transaction roots and the proplists
+ * of both paths had been changed in their respective transactions,
+ * @a changed_p would be set to #FALSE.
+ *
+ * @see svn_fs_props_different
  */
 svn_error_t *
 svn_fs_props_changed(svn_boolean_t *changed_p,
@@ -2410,7 +2421,7 @@ svn_fs_apply_text(svn_stream_t **content
                   apr_pool_t *pool);
 
 
-/** Check if the contents of two root/path combos have changed.
+/** Check if the contents of two root/path combos are different.
  *
  * Set @a *different_p to #TRUE if the file contents at @a path1 under
  * @a root1 differ from those at @a path2 under @a root2, or set it to
@@ -2418,6 +2429,16 @@ svn_fs_apply_text(svn_stream_t **content
  * respective roots, and both roots must be in the same filesystem.
  * Do any necessary temporary allocation in @a scratch_pool.
  *
+ * @note For the purposes of preserving accurate history, certain bits of
+ * code (such as the repository dump code) need to care about the distinction
+ * between situations when two files have "different" content and when the
+ * contents of a given file "have changed" across two points in its history.
+ * We have a pair of functions that can answer both of these questions,
+ * svn_fs_contents_different() and svn_fs_contents_changed().  See issue
+ * 4598 for more details.
+ *
+ * @see svn_fs_contents_changed
+ *
  * @since New in 1.9.
  */
 svn_error_t *
@@ -2428,9 +2449,7 @@ svn_fs_contents_different(svn_boolean_t
                           const char *path2,
                           apr_pool_t *scratch_pool);
 
-/** Check if the contents of two root/path combos have changed.  In
- * contrast to #svn_fs_contents_different, we only perform a quick test
- * and allow for false positives.
+/** Check if the contents of two root/path combos have changed.
  *
  * Set @a *changed_p to #TRUE if the file contents at @a path1 under
  * @a root1 differ from those at @a path2 under @a root2, or set it to
@@ -2438,10 +2457,18 @@ svn_fs_contents_different(svn_boolean_t
  * respective roots, and both roots must be in the same filesystem.
  * Do any necessary temporary allocation in @a pool.
  *
- * @note The behavior is implementation dependent in that the false
- * positives reported may differ from release to release and backend to
- * backend.  There is also no guarantee that there will be false positives
- * at all.
+ * @note svn_fs_contents_changed() was not designed to be used to detect
+ * when two files have different content, but really to detect when the
+ * contents of a given file have changed across two points in its history.
+ * For the purposes of preserving accurate history, certain bits of code
+ * (such as the repository dump code) need to care about this distinction.
+ * For example, it's not an error from the FS API point of view to call
+ * svn_fs_apply_textdelta() and explicitly set a file's contents to exactly
+ * what they were before the edit was made.  We have a pair of functions
+ * that can answer both of these questions, svn_fs_contents_changed() and
+ * svn_fs_contents_different().  See issue 4598 for more details.
+ *
+ * @see svn_fs_contents_different
  */
 svn_error_t *
 svn_fs_contents_changed(svn_boolean_t *changed_p,

Modified: subversion/branches/1.9.x/subversion/libsvn_fs_base/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs_base/dag.c?rev=1716561&r1=1716560&r2=1716561&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs_base/dag.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs_base/dag.c Thu Nov 26 04:00:16 2015
@@ -1657,8 +1657,14 @@ svn_fs_base__things_different(svn_boolea
 
   /* Compare contents keys and their (optional) uniquifiers. */
   if (contents_changed != NULL)
-    *contents_changed = (! svn_fs_base__same_keys(noderev1->data_key,
-                                                  noderev2->data_key));
+    *contents_changed =
+      (! (svn_fs_base__same_keys(noderev1->data_key,
+                                 noderev2->data_key)
+          /* Technically, these uniquifiers aren't used and "keys",
+             but keys are base-36 stringified numbers, so we'll take
+             this liberty. */
+          && (svn_fs_base__same_keys(noderev1->data_key_uniquifier,
+                                     noderev2->data_key_uniquifier))));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/1.9.x/subversion/libsvn_fs_base/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs_base/fs.h?rev=1716561&r1=1716560&r2=1716561&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs_base/fs.h (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs_base/fs.h Thu Nov 26 04:00:16 2015
@@ -195,11 +195,7 @@ typedef struct node_revision_t
      only because one or both of us decided to pick up a shared
      representation after-the-fact."  May be NULL (if this node
      revision isn't using a shared rep, or isn't the original
-     "assignee" of a shared rep).
-
-     This is no longer used by the 1.9 code but we have to keep
-     reading and writing it to remain compatible with 1.8, and
-     earlier, that require it. */
+     "assignee" of a shared rep). */
   const char *data_key_uniquifier;
 
   /* representation key for this node's text-data-in-progess (files

Modified: subversion/branches/1.9.x/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs_fs/dag.c?rev=1716561&r1=1716560&r2=1716561&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs_fs/dag.c Thu Nov 26 04:00:16 2015
@@ -1307,34 +1307,58 @@ svn_fs_fs__dag_things_different(svn_bool
                                 apr_pool_t *pool)
 {
   node_revision_t *noderev1, *noderev2;
-  svn_fs_t *fs;
-  svn_boolean_t same;
 
   /* If we have no place to store our results, don't bother doing
      anything. */
   if (! props_changed && ! contents_changed)
     return SVN_NO_ERROR;
 
-  fs = svn_fs_fs__dag_get_fs(node1);
-
   /* The node revision skels for these two nodes. */
   SVN_ERR(get_node_revision(&noderev1, node1));
   SVN_ERR(get_node_revision(&noderev2, node2));
 
-  /* Compare property keys. */
-  if (props_changed != NULL)
+  if (strict)
     {
-      SVN_ERR(svn_fs_fs__prop_rep_equal(&same, fs, noderev1, noderev2,
-                                        strict, pool));
-      *props_changed = !same;
-    }
+      /* In strict mode, compare text and property representations in the
+         svn_fs_contents_different() / svn_fs_props_different() manner.
 
-  /* Compare contents keys. */
-  if (contents_changed != NULL)
+         See the "No-op changes no longer dumped by 'svnadmin dump' in 1.9"
+         discussion (http://svn.haxx.se/dev/archive-2015-09/0269.shtml) and
+         issue #4598 (https://issues.apache.org/jira/browse/SVN-4598). */
+      svn_fs_t *fs = svn_fs_fs__dag_get_fs(node1);
+      svn_boolean_t same;
+
+      /* Compare property keys. */
+      if (props_changed != NULL)
+        {
+          SVN_ERR(svn_fs_fs__prop_rep_equal(&same, fs, noderev1,
+                                            noderev2, pool));
+          *props_changed = !same;
+        }
+
+      /* Compare contents keys. */
+      if (contents_changed != NULL)
+        {
+          SVN_ERR(svn_fs_fs__file_text_rep_equal(&same, fs, noderev1,
+                                                 noderev2, pool));
+          *contents_changed = !same;
+        }
+    }
+  else
     {
-      SVN_ERR(svn_fs_fs__file_text_rep_equal(&same, fs, noderev1, noderev2,
-                                             strict, pool));
-      *contents_changed = !same;
+      /* Otherwise, compare representation keys -- as in Subversion 1.8. */
+
+      /* Compare property keys. */
+      if (props_changed != NULL)
+        *props_changed =
+          !svn_fs_fs__noderev_same_rep_key(noderev1->prop_rep,
+                                           noderev2->prop_rep);
+
+      /* Compare contents keys. */
+      if (contents_changed != NULL)
+        *contents_changed =
+          !svn_fs_fs__noderev_same_rep_key(noderev1->data_rep,
+                                           noderev2->data_rep);
     }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/1.9.x/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs_fs/fs.h?rev=1716561&r1=1716560&r2=1716561&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs_fs/fs.h Thu Nov 26 04:00:16 2015
@@ -536,13 +536,7 @@ typedef struct representation_t
   /* For rep-sharing, we need a way of uniquifying node-revs which share the
      same representation (see svn_fs_fs__noderev_same_rep_key() ).  So, we
      store the original txn of the node rev (not the rep!), along with some
-     intra-node uniqification content.
-
-     This is no longer used by the 1.9 code but we have to keep
-     reading and writing it for old formats to remain compatible with
-     1.8, and earlier, that require it.  We also read/write it in
-     format 7 even though it is not currently required by any code
-     that handles that format. */
+     intra-node uniqification content. */
   struct
     {
       /* unique context, i.e. txn ID, in which the noderev (!) got created */

Modified: subversion/branches/1.9.x/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs_fs/fs_fs.c?rev=1716561&r1=1716560&r2=1716561&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs_fs/fs_fs.c Thu Nov 26 04:00:16 2015
@@ -1414,12 +1414,30 @@ svn_fs_fs__file_length(svn_filesize_t *l
   return SVN_NO_ERROR;
 }
 
+svn_boolean_t
+svn_fs_fs__noderev_same_rep_key(representation_t *a,
+                                representation_t *b)
+{
+  if (a == b)
+    return TRUE;
+
+  if (a == NULL || b == NULL)
+    return FALSE;
+
+  if (a->item_index != b->item_index)
+    return FALSE;
+
+  if (a->revision != b->revision)
+    return FALSE;
+
+  return memcmp(&a->uniquifier, &b->uniquifier, sizeof(a->uniquifier)) == 0;
+}
+
 svn_error_t *
 svn_fs_fs__file_text_rep_equal(svn_boolean_t *equal,
                                svn_fs_t *fs,
                                node_revision_t *a,
                                node_revision_t *b,
-                               svn_boolean_t strict,
                                apr_pool_t *scratch_pool)
 {
   svn_stream_t *contents_a, *contents_b;
@@ -1464,19 +1482,6 @@ svn_fs_fs__file_text_rep_equal(svn_boole
       return SVN_NO_ERROR;
     }
 
-  /* Old repositories may not have the SHA1 checksum handy.
-     This check becomes expensive.  Skip it unless explicitly required.
-
-     We already have seen that the ID is different, so produce a likely
-     false negative as allowed by the API description - even though the
-     MD5 matched, there is an extremely slim chance that the SHA1 wouldn't.
-   */
-  if (!strict)
-    {
-      *equal = FALSE;
-      return SVN_NO_ERROR;
-    }
-
   SVN_ERR(svn_fs_fs__get_contents(&contents_a, fs, rep_a, TRUE,
                                   scratch_pool));
   SVN_ERR(svn_fs_fs__get_contents(&contents_b, fs, rep_b, TRUE,
@@ -1492,7 +1497,6 @@ svn_fs_fs__prop_rep_equal(svn_boolean_t
                           svn_fs_t *fs,
                           node_revision_t *a,
                           node_revision_t *b,
-                          svn_boolean_t strict,
                           apr_pool_t *scratch_pool)
 {
   representation_t *rep_a = a->prop_rep;
@@ -1526,14 +1530,6 @@ svn_fs_fs__prop_rep_equal(svn_boolean_t
       return SVN_NO_ERROR;
     }
 
-  /* Skip the expensive bits unless we are in strict mode.
-     Simply assume that there is a difference. */
-  if (!strict)
-    {
-      *equal = FALSE;
-      return SVN_NO_ERROR;
-    }
-
   /* At least one of the reps has been modified in a txn.
      Fetch and compare them. */
   SVN_ERR(svn_fs_fs__get_proplist(&proplist_a, fs, a, scratch_pool));

Modified: subversion/branches/1.9.x/subversion/libsvn_fs_fs/fs_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs_fs/fs_fs.h?rev=1716561&r1=1716560&r2=1716561&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs_fs/fs_fs.h (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs_fs/fs_fs.h Thu Nov 26 04:00:16 2015
@@ -81,28 +81,29 @@ svn_error_t *svn_fs_fs__file_length(svn_
                                     node_revision_t *noderev,
                                     apr_pool_t *pool);
 
+/* Return TRUE if the representation keys in A and B both point to the
+   same representation, else return FALSE. */
+svn_boolean_t svn_fs_fs__noderev_same_rep_key(representation_t *a,
+                                              representation_t *b);
+
 /* Set *EQUAL to TRUE if the text representations in A and B within FS
-   have equal contents, else set it to FALSE.  If STRICT is not set, allow
-   for false negatives.
+   have equal contents, else set it to FALSE.
    Use SCRATCH_POOL for temporary allocations. */
 svn_error_t *
 svn_fs_fs__file_text_rep_equal(svn_boolean_t *equal,
                                svn_fs_t *fs,
                                node_revision_t *a,
                                node_revision_t *b,
-                               svn_boolean_t strict,
                                apr_pool_t *scratch_pool);
 
 /* Set *EQUAL to TRUE if the property representations in A and B within FS
-   have equal contents, else set it to FALSE.  If STRICT is not set, allow
-   for false negatives.
+   have equal contents, else set it to FALSE.
    Use SCRATCH_POOL for temporary allocations. */
 svn_error_t *
 svn_fs_fs__prop_rep_equal(svn_boolean_t *equal,
                           svn_fs_t *fs,
                           node_revision_t *a,
                           node_revision_t *b,
-                          svn_boolean_t strict,
                           apr_pool_t *scratch_pool);
 
 

Modified: subversion/branches/1.9.x/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs_fs/tree.c?rev=1716561&r1=1716560&r2=1716561&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs_fs/tree.c Thu Nov 26 04:00:16 2015
@@ -1900,13 +1900,13 @@ merge(svn_stringbuf_t *conflict_p,
     /* Now compare the prop-keys of the skels.  Note that just because
        the keys are different -doesn't- mean the proplists have
        different contents. */
-    SVN_ERR(svn_fs_fs__prop_rep_equal(&same, fs, src_nr, anc_nr, TRUE, pool));
+    SVN_ERR(svn_fs_fs__prop_rep_equal(&same, fs, src_nr, anc_nr, pool));
     if (! same)
       return conflict_err(conflict_p, target_path);
 
     /* The directory entries got changed in the repository but the directory
        properties did not. */
-    SVN_ERR(svn_fs_fs__prop_rep_equal(&same, fs, tgt_nr, anc_nr, TRUE, pool));
+    SVN_ERR(svn_fs_fs__prop_rep_equal(&same, fs, tgt_nr, anc_nr, pool));
     if (! same)
       {
         /* There is an incoming prop change for this directory.

Modified: subversion/branches/1.9.x/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_repos/dump.c?rev=1716561&r1=1716560&r2=1716561&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_repos/dump.c Thu Nov 26 04:00:16 2015
@@ -1164,13 +1164,13 @@ dump_node(struct edit_baton *eb,
                                    svn_fs_root_fs(eb->fs_root),
                                    compare_rev, pool));
 
-      SVN_ERR(svn_fs_props_different(&must_dump_props,
-                                     compare_root, compare_path,
-                                     eb->fs_root, path, pool));
+      SVN_ERR(svn_fs_props_changed(&must_dump_props,
+                                   compare_root, compare_path,
+                                   eb->fs_root, path, pool));
       if (kind == svn_node_file)
-        SVN_ERR(svn_fs_contents_different(&must_dump_text,
-                                          compare_root, compare_path,
-                                          eb->fs_root, path, pool));
+        SVN_ERR(svn_fs_contents_changed(&must_dump_text,
+                                        compare_root, compare_path,
+                                        eb->fs_root, path, pool));
       break;
 
     case svn_node_action_delete:
@@ -1293,16 +1293,16 @@ dump_node(struct edit_baton *eb,
 
           /* Need to decide if the copied node had any extra textual or
              property mods as well.  */
-          SVN_ERR(svn_fs_props_different(&must_dump_props,
-                                         compare_root, compare_path,
-                                         eb->fs_root, path, pool));
+          SVN_ERR(svn_fs_props_changed(&must_dump_props,
+                                       compare_root, compare_path,
+                                       eb->fs_root, path, pool));
           if (kind == svn_node_file)
             {
               svn_checksum_t *checksum;
               const char *hex_digest;
-              SVN_ERR(svn_fs_contents_different(&must_dump_text,
-                                                compare_root, compare_path,
-                                                eb->fs_root, path, pool));
+              SVN_ERR(svn_fs_contents_changed(&must_dump_text,
+                                              compare_root, compare_path,
+                                              eb->fs_root, path, pool));
 
               SVN_ERR(svn_fs_file_checksum(&checksum, svn_checksum_md5,
                                            compare_root, compare_path,

Modified: subversion/branches/1.9.x/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/tests/cmdline/svnadmin_tests.py?rev=1716561&r1=1716560&r2=1716561&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/1.9.x/subversion/tests/cmdline/svnadmin_tests.py Thu Nov 26 04:00:16 2015
@@ -3066,6 +3066,48 @@ def hotcopy_read_only(sbox):
     logger.warn("Error: hotcopy failed")
     raise SVNUnexpectedStderr(errput)
 
+@XFail(svntest.main.is_fs_type_fsx)
+@Issue(4598)
+def dump_no_op_change(sbox):
+  "svnadmin dump with no-op changes"
+
+  sbox.build(create_wc=False, empty=True)
+  empty_file = sbox.get_tempname()
+  svntest.main.file_write(empty_file, '')
+
+  svntest.actions.run_and_verify_svnmucc(None, [],
+                                         '-U', sbox.repo_url,
+                                         '-m', svntest.main.make_log_msg(),
+                                         'put', empty_file, 'bar')
+  # Commit a no-op change.
+  svntest.actions.run_and_verify_svnmucc(None, [],
+                                         '-U', sbox.repo_url,
+                                         '-m', svntest.main.make_log_msg(),
+                                         'put', empty_file, 'bar')
+  # Dump and load the repository.
+  _, dump, _ = svntest.actions.run_and_verify_svnadmin(None, [],
+                                                       'dump', '-q',
+                                                       sbox.repo_dir)
+  sbox2 = sbox.clone_dependent()
+  sbox2.build(create_wc=False, empty=True)
+  load_and_verify_dumpstream(sbox2, None, [], None, False, dump)
+
+  # We expect svn log -v to yield identical results for both original and
+  # reconstructed repositories.  This used to fail as described in the
+  # Issue 4598 (https://issues.apache.org/jira/browse/SVN-4598), at least
+  # around r1706415.
+  #
+  # Test svn log -v for r2:
+  _, expected, _ = svntest.actions.run_and_verify_svn(None, [], 'log', '-v',
+                                                      '-r2', sbox.repo_url)
+  svntest.actions.run_and_verify_svn(expected, [], 'log',  '-v',
+                                     '-r2', sbox2.repo_url)
+  # Test svn log -v for /bar:
+  _, expected, _ = svntest.actions.run_and_verify_svn(None, [], 'log', '-v',
+                                                      sbox.repo_url + '/bar')
+  svntest.actions.run_and_verify_svn(expected, [], 'log',  '-v',
+                                     sbox2.repo_url + '/bar')
+
 ########################################################################
 # Run the tests
 
@@ -3123,6 +3165,7 @@ test_list = [ None,
               load_txdelta,
               load_no_svndate_r0,
               hotcopy_read_only,
+              dump_no_op_change,
              ]
 
 if __name__ == '__main__':