You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ko...@apache.org on 2015/10/29 14:44:46 UTC

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

Author: kotkov
Date: Thu Oct 29 13:44:45 2015
New Revision: 1711251

URL: http://svn.apache.org/viewvc?rev=1711251&view=rev
Log:
Create a backport branch for r1706428, r1706437, r1709388 and r1711250.

The new test required resolving a text conflict in the test list within
/subversion/tests/cmdline/svnadmin_tests.py.

Added:
    subversion/branches/1.9.x-r1706428/   (props changed)
      - copied from r1711250, subversion/branches/1.9.x/
Modified:
    subversion/branches/1.9.x-r1706428/notes/   (props changed)
    subversion/branches/1.9.x-r1706428/notes/api-errata/1.9/fs001.txt
    subversion/branches/1.9.x-r1706428/subversion/include/svn_fs.h
    subversion/branches/1.9.x-r1706428/subversion/include/svn_ra.h
    subversion/branches/1.9.x-r1706428/subversion/include/svn_repos.h
    subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_base/dag.c
    subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_base/fs.h
    subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/dag.c
    subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/fs.h
    subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/fs_fs.h
    subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/tree.c
    subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/delta.c
    subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/dump.c
    subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/reporter.c
    subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/rev_hunt.c
    subversion/branches/1.9.x-r1706428/subversion/tests/cmdline/svnadmin_tests.py

Propchange: subversion/branches/1.9.x-r1706428/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Thu Oct 29 13:44:45 2015
@@ -0,0 +1,2 @@
+[Ii]ssues?:?(\s*(,|and)?\s*#\d+)+
+(\d+)

Propchange: subversion/branches/1.9.x-r1706428/
------------------------------------------------------------------------------
    bugtraq:url = http://subversion.tigris.org/issues/show_bug.cgi?id=%BUGID%

Propchange: subversion/branches/1.9.x-r1706428/
------------------------------------------------------------------------------
--- svn:auto-props (added)
+++ svn:auto-props Thu Oct 29 13:44:45 2015
@@ -0,0 +1,13 @@
+*.c = svn:eol-style=native
+*.cpp = svn:eol-style=native
+*.h = svn:eol-style=native
+*.hpp = svn:eol-style=native
+*.java = svn:eol-style=native
+*.py = svn:eol-style=native
+*.pl = svn:eol-style=native
+*.rb = svn:eol-style=native
+*.sql = svn:eol-style=native
+*.txt = svn:eol-style=native
+README = svn:eol-style=native
+BRANCH-README = svn:eol-style=native
+STATUS = svn:eol-style=native

Propchange: subversion/branches/1.9.x-r1706428/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Oct 29 13:44:45 2015
@@ -0,0 +1,57 @@
+ChangeLog*
+Makefile
+config.cache
+config.log
+config.nice
+config.status
+configure
+libtool
+.gdb_history
+.swig_checked
+*.orig
+*.rej
+TAGS
+tags
+neon
+build-outputs.mk
+autogen-standalone.mk
+autom4te.cache
+gen-make.opts
+tests.log*
+fails.log*
+db4-win32
+db
+*.o
+*~
+.*~
+apr
+apr-util
+apr-iconv
+Release
+Debug
+ipch
+subversion_msvc.dsw
+subversion_msvc.ncb
+subversion_msvc.opt
+subversion_msvc.plg
+subversion_vcnet.sln
+subversion_vcnet.ncb
+subversion_vcnet.suo
+subversion_vcnet.v11.suo
+subversion_vcnet.sdf
+subversion_vcnet.opensdf
+mkmf.log
+.project
+.classpath
+.cdtproject
+.settings
+.cproject
+zlib
+sqlite-amalgamation
+serf
+gmock-fused
+.git
+.gitignore
+compile_commands.json
+.kdev4
+*.kdev4

Propchange: subversion/branches/1.9.x-r1706428/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Oct 29 13:44:45 2015
@@ -0,0 +1,97 @@
+/subversion/branches/1.10-cache-improvements:1675666-1677522,1679679,1679681,1679859
+/subversion/branches/1.5.x-r30215:870312
+/subversion/branches/1.7.x-fs-verify:1146708,1161180
+/subversion/branches/1.9-cache-improvements:1678948-1679863
+/subversion/branches/1.9.x-r1664664:1674265-1674433
+/subversion/branches/1.9.x-r1667233:1673207-1673638
+/subversion/branches/1.9.x-r1700215:1701365-1703825
+/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
+/subversion/branches/auto-props-sdc:1384106-1401643
+/subversion/branches/bdb-reverse-deltas:872050-872529
+/subversion/branches/cache-server:1458643-1476567
+/subversion/branches/diff-callbacks3:870059-870761
+/subversion/branches/diff-optimizations:1031270-1037352
+/subversion/branches/diff-optimizations-bytes:1037353-1067789
+/subversion/branches/dont-save-plaintext-passwords-by-default:870728-871118
+/subversion/branches/double-delete:870511-872970
+/subversion/branches/dump-load-cross-check:1654853-1657295
+/subversion/branches/ev2-export:1325914,1332738,1413107
+/subversion/branches/explore-wc:875486,875493,875497,875507,875511,875514,875559,875580-875581,875584,875587,875611,875627,875647,875667-875668,875711-875712,875733-875734,875736,875744-875748,875751,875758,875782,875795-875796,875830,875836,875838,875842,875852,875855,875864,875870,875873,875880,875885-875888,875890,875897-875898,875905,875907-875909,875935,875943-875944,875946,875979,875982-875983,875985-875986,875990,875997
+/subversion/branches/file-externals:871779-873302
+/subversion/branches/fs-rep-sharing:869036-873803
+/subversion/branches/fsfs-format7:1426304,1430673,1433848,1438408,1438982,1441129,1442051,1442068,1442504,1442910,1443171,1443803,1444690,1444693,1444695,1445040,1445080,1446103,1451129,1453590,1454307,1460579,1461851,1461865,1462837,1462904,1463120,1467362,1467382,1469487,1471208,1477166,1478055,1481447,1489817,1489949,1490673-1490674,1491784,1493042,1498029,1498103,1498155,1500054,1507729-1507731,1507735-1507736
+/subversion/branches/fsfs-improvements:1499981-1547039
+/subversion/branches/fsfs-lock-many:1571740-1577217
+/subversion/branches/fsfs-pack:873717-874575
+/subversion/branches/fsx:1507845-1509914
+/subversion/branches/fsx-id:1645603-1649011
+/subversion/branches/gnome-keyring:870558-871410
+/subversion/branches/gpg-agent-password-store:1005036-1150766
+/subversion/branches/gtest_addition:1452117-1502138
+/subversion/branches/http-protocol-v2:874395-876041
+/subversion/branches/in-memory-cache:869829-871452
+/subversion/branches/in-repo-authz:1414342-1424779
+/subversion/branches/inheritable-props:1297080-1395089
+/subversion/branches/integrate-cache-item-serialization:1068724-1068739
+/subversion/branches/integrate-cache-membuffer:998649-998852
+/subversion/branches/integrate-compression-level:1068651-1072287
+/subversion/branches/integrate-io-improvements:1068684-1072297
+/subversion/branches/integrate-is-cachable:1072568-1074082
+/subversion/branches/integrate-partial-getter:1072558-1076552
+/subversion/branches/integrate-readline-speedup:1072553-1072555
+/subversion/branches/integrate-stream-api-extensions:1068695-1072516
+/subversion/branches/integrate-string-improvements:1068251-1190617
+/subversion/branches/integrate-txdelta-caching:1072541-1078213
+/subversion/branches/issue-2779-dev:965496-984198
+/subversion/branches/issue-2843-dev:871432-874179
+/subversion/branches/issue-3000:871713,871716-871719,871721-871726,871728,871734
+/subversion/branches/issue-3067-deleted-subtrees:873375-874084
+/subversion/branches/issue-3148-dev:875193-875204
+/subversion/branches/issue-3220-dev:872210-872226
+/subversion/branches/issue-3242-dev:879653-896436
+/subversion/branches/issue-3334-dirs:875156-875867
+/subversion/branches/issue-3975:1152931-1160746
+/subversion/branches/issue-4116-dev:1424719-1425040
+/subversion/branches/issue-4194-dev:1410507-1414880
+/subversion/branches/javahl-ra:991978-1494640
+/subversion/branches/kwallet:870785-871314
+/subversion/branches/log-addressing:1509279-1546844
+/subversion/branches/log-g-performance:870941-871032
+/subversion/branches/merge-skips-obstructions:874525-874615
+/subversion/branches/move-tracking-2:1607334
+/subversion/branches/multi-layer-moves:1239019-1300930
+/subversion/branches/nfc-nfd-aware-client:870276,870376
+/subversion/branches/node_pool:1304828-1305388
+/subversion/branches/performance:979193,980118,981087,981090,981189,981194,981287,981684,981827,982043,982355,983398,983406,983430,983474,983488,983490,983760,983764,983766,983770,984927,984973,984984,985014,985037,985046,985472,985477,985482,985487-985488,985493,985497,985500,985514,985601,985603,985606,985669,985673,985695,985697,986453,986465,986485,986491-986492,986517,986521,986605,986608,986817,986832,987865,987868-987869,987872,987886-987888,987893,988319,988898,990330,990533,990535-990537,990541,990568,990572,990574-990575,990600,990759,992899,992904,992911,993127,993141,994956,995478,995507,995603,998012,998858,999098,1001413,1001417,1004291,1022668,1022670,1022676,1022715,1022719,1025660,1025672,1027193,1027203,1027206,1027214,1027227,1028077,1028092,1028094,1028104,1028107,1028111,1028354,1029038,1029042-1029043,1029054-1029055,1029062-1029063,1029078,1029080,1029090,1029092-1029093,1029111,1029151,1029158,1029229-1029230,1029232,1029335-1029336,1029339-1029340,1029342,10
 29344,1030763,1030827,1031203,1031235,1032285,1032333,1033040,1033057,1033294,1035869,1035882,1039511,1043705,1053735,1056015,1066452,1067683,1067697-1078365
+/subversion/branches/pin-externals:1643757-1659392
+/subversion/branches/py-tests-as-modules:956579-1033052
+/subversion/branches/ra_serf-digest-authn:875693-876404
+/subversion/branches/reintegrate-improvements:873853-874164
+/subversion/branches/remote-only-status:1581845-1586090
+/subversion/branches/revprop-cache:1298521-1326293
+/subversion/branches/revprop-caching-ng:1620597,1620599
+/subversion/branches/revprop-packing:1143907,1143971,1143997,1144017,1144499,1144568,1146145
+/subversion/branches/subtree-mergeinfo:876734-878766
+/subversion/branches/svn-auth-x509:1603509-1655900
+/subversion/branches/svn-info-detail:1660035-1662618
+/subversion/branches/svn-mergeinfo-enhancements:870119-870195,870197-870288
+/subversion/branches/svn-patch-improvements:918519-934609
+/subversion/branches/svn_mutex:1141683-1182099
+/subversion/branches/svnpatch-diff:865738-876477
+/subversion/branches/svnraisetc:874709-875149
+/subversion/branches/svnserve-logging:869828-870893
+/subversion/branches/tc-issue-3334:874697-874773
+/subversion/branches/tc-merge-notify:874017-874062
+/subversion/branches/tc-resolve:874191-874239
+/subversion/branches/tc_url_rev:874351-874483
+/subversion/branches/tree-conflicts:868291-873154
+/subversion/branches/tree-conflicts-notify:873926-874008
+/subversion/branches/tristate-chunked-request:1502394-1502681
+/subversion/branches/tweak-build-take-two:1424288-1425049,1425051-1425613
+/subversion/branches/uris-as-urls:1060426-1064427
+/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,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,1703675,1703740,1705060,1705062,1705064,1705088,1705328,1705843,1706241,1706323-1706324,1706428,1706437,1709388-1709389,1709562,1710104,1710215,1710290,1710558,1711250

Propchange: subversion/branches/1.9.x-r1706428/
------------------------------------------------------------------------------
    tsvn:logwidthmarker = 78

Propchange: subversion/branches/1.9.x-r1706428/
------------------------------------------------------------------------------
    webviewer:revision = http://svn.apache.org/r%REVISION%

Propchange: subversion/branches/1.9.x-r1706428/notes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Oct 29 13:44:45 2015
@@ -39,3 +39,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-r1706428/notes/api-errata/1.9/fs001.txt
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/notes/api-errata/1.9/fs001.txt?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/notes/api-errata/1.9/fs001.txt (original)
+++ subversion/branches/1.9.x-r1706428/notes/api-errata/1.9/fs001.txt Thu Oct 29 13:44:45 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-r1706428/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/subversion/include/svn_fs.h?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/subversion/include/svn_fs.h (original)
+++ subversion/branches/1.9.x-r1706428/subversion/include/svn_fs.h Thu Oct 29 13:44:45 2015
@@ -1872,9 +1872,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 +1880,13 @@ 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.
+ * Also see #svn_fs_contents_changed and issue 4598 for notes about this
+ * pair of functions.
+ *
+ * @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.
  */
 svn_error_t *
 svn_fs_props_changed(svn_boolean_t *changed_p,
@@ -2410,7 +2406,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
@@ -2428,9 +2424,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 +2432,17 @@ 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. But we try to preserve that fact
+ * when dumping rather than claim that the file didn't change at all (despite
+ * there being a change of modified parent directories and an associated
+ * `changes' table entry which claim otherwise.) Also see issue 4598.
  */
 svn_error_t *
 svn_fs_contents_changed(svn_boolean_t *changed_p,

Modified: subversion/branches/1.9.x-r1706428/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/subversion/include/svn_ra.h?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/subversion/include/svn_ra.h (original)
+++ subversion/branches/1.9.x-r1706428/subversion/include/svn_ra.h Thu Oct 29 13:44:45 2015
@@ -1796,11 +1796,10 @@ svn_ra_get_location_segments(svn_ra_sess
  * to support reversion of the revision range for @a include_merged_revision
  * @c FALSE reporting by switching  @a end with @a start.
  *
- * @note Prior to Subversion 1.9, this function may request delta handlers
- * from @a handler even for empty text deltas.  Starting with 1.9, the
- * delta handler / baton return arguments passed to @a handler will be
- * #NULL unless there is an actual difference in the file contents between
- * the current and the previous call.
+ * @note In Subversion 1.9.0-1.9.2, the delta handler / baton return
+ * arguments passed to @a handler were set to #NULL in case of an empty
+ * text delta.  All other versions may request delta handlers from
+ * @a handler even for empty text deltas.
  *
  * @since New in 1.5.
  */

Modified: subversion/branches/1.9.x-r1706428/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/subversion/include/svn_repos.h?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/subversion/include/svn_repos.h (original)
+++ subversion/branches/1.9.x-r1706428/subversion/include/svn_repos.h Thu Oct 29 13:44:45 2015
@@ -2087,11 +2087,10 @@ svn_repos_fs_get_mergeinfo(svn_mergeinfo
  * the revision range for @a include_merged_revision @c FALSE reporting by
  * switching @a start with @a end.
  *
- * @note Prior to Subversion 1.9, this function may request delta handlers
- * from @a handler even for empty text deltas.  Starting with 1.9, the
- * delta handler / baton return arguments passed to @a handler will be
- * #NULL unless there is an actual difference in the file contents between
- * the current and the previous call.
+ * @note In Subversion 1.9.0-1.9.2, the delta handler / baton return
+ * arguments passed to @a handler were set to #NULL in case of an empty
+ * text delta.  All other versions may request delta handlers from
+ * @a handler even for empty text deltas.
  *
  * @since New in 1.5.
  */

Modified: subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_base/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_base/dag.c?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_base/dag.c (original)
+++ subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_base/dag.c Thu Oct 29 13:44:45 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-r1706428/subversion/libsvn_fs_base/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_base/fs.h?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_base/fs.h (original)
+++ subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_base/fs.h Thu Oct 29 13:44:45 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-r1706428/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/dag.c?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/dag.c Thu Oct 29 13:44:45 2015
@@ -1307,34 +1307,61 @@ 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.
+         These functions are currently not being used in our codebase, but
+         we released them as a part of 1.9, and keep them for compatibility
+         reasons.
+
+         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;
+        }
     }
-
-  /* Compare contents keys. */
-  if (contents_changed != NULL)
+  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-r1706428/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/fs.h?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/fs.h Thu Oct 29 13:44:45 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-r1706428/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/fs_fs.c?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/fs_fs.c Thu Oct 29 13:44:45 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-r1706428/subversion/libsvn_fs_fs/fs_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/fs_fs.h?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/fs_fs.h (original)
+++ subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/fs_fs.h Thu Oct 29 13:44:45 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-r1706428/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/tree.c?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/1.9.x-r1706428/subversion/libsvn_fs_fs/tree.c Thu Oct 29 13:44:45 2015
@@ -1882,7 +1882,6 @@ merge(svn_stringbuf_t *conflict_p,
   */
   {
     node_revision_t *tgt_nr, *anc_nr, *src_nr;
-    svn_boolean_t same;
     apr_pool_t *scratch_pool;
 
     /* Get node revisions for our id's. */
@@ -1899,15 +1898,16 @@ 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));
-    if (! same)
+       different contents.  But merge() isn't concerned with contents;
+       it doesn't do a brute-force comparison on textual contents, so
+       it won't do that here either.  Checking to see if the propkey
+       atoms are `equal' is enough. */
+    if (! svn_fs_fs__noderev_same_rep_key(src_nr->prop_rep, anc_nr->prop_rep))
       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));
-    if (! same)
+    if (! svn_fs_fs__noderev_same_rep_key(tgt_nr->prop_rep, anc_nr->prop_rep))
       {
         /* There is an incoming prop change for this directory.
            We will accept it only if the directory changes were mere updates

Modified: subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/delta.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/delta.c?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/delta.c (original)
+++ subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/delta.c Thu Oct 29 13:44:45 2015
@@ -523,8 +523,8 @@ delta_proplists(struct context *c,
       svn_boolean_t changed;
 
       /* Is this deltification worth our time? */
-      SVN_ERR(svn_fs_props_different(&changed, c->target_root, target_path,
-                                     c->source_root, source_path, subpool));
+      SVN_ERR(svn_fs_props_changed(&changed, c->target_root, target_path,
+                                   c->source_root, source_path, subpool));
       if (! changed)
         goto cleanup;
 
@@ -604,8 +604,62 @@ svn_repos__compare_files(svn_boolean_t *
                          const char *path2,
                          apr_pool_t *pool)
 {
-  return svn_error_trace(svn_fs_contents_different(changed_p, root1, path1,
-                                                   root2, path2, pool));
+  svn_filesize_t size1, size2;
+  svn_checksum_t *checksum1, *checksum2;
+  svn_stream_t *stream1, *stream2;
+  svn_boolean_t same;
+
+  /* If the filesystem claims the things haven't changed, then they
+     haven't changed. */
+  SVN_ERR(svn_fs_contents_changed(changed_p, root1, path1,
+                                  root2, path2, pool));
+  if (!*changed_p)
+    return SVN_NO_ERROR;
+
+  /* If the SHA1 checksums match for these things, we'll claim they
+     have the same contents.  (We don't give quite as much weight to
+     MD5 checksums.)  */
+  SVN_ERR(svn_fs_file_checksum(&checksum1, svn_checksum_sha1,
+                               root1, path1, FALSE, pool));
+  SVN_ERR(svn_fs_file_checksum(&checksum2, svn_checksum_sha1,
+                               root2, path2, FALSE, pool));
+  if (checksum1 && checksum2)
+    {
+      *changed_p = !svn_checksum_match(checksum1, checksum2);
+      return SVN_NO_ERROR;
+    }
+
+  /* From this point on, our default answer is "Nothing's changed". */
+  *changed_p = FALSE;
+
+  /* Different filesizes means the contents are different. */
+  SVN_ERR(svn_fs_file_length(&size1, root1, path1, pool));
+  SVN_ERR(svn_fs_file_length(&size2, root2, path2, pool));
+  if (size1 != size2)
+    {
+      *changed_p = TRUE;
+      return SVN_NO_ERROR;
+    }
+
+  /* Different MD5 checksums means the contents are different. */
+  SVN_ERR(svn_fs_file_checksum(&checksum1, svn_checksum_md5, root1, path1,
+                               FALSE, pool));
+  SVN_ERR(svn_fs_file_checksum(&checksum2, svn_checksum_md5, root2, path2,
+                               FALSE, pool));
+  if (!svn_checksum_match(checksum1, checksum2))
+    {
+      *changed_p = TRUE;
+      return SVN_NO_ERROR;
+    }
+
+  /* And finally, different contents means the ... uh ... contents are
+     different. */
+  SVN_ERR(svn_fs_file_contents(&stream1, root1, path1, pool));
+  SVN_ERR(svn_fs_file_contents(&stream2, root2, path2, pool));
+  SVN_ERR(svn_stream_contents_same2(&same, stream1, stream2, pool));
+  *changed_p = !same;
+
+  return SVN_NO_ERROR;
 }
 
 
@@ -632,7 +686,19 @@ delta_files(struct context *c,
 
   if (source_path)
     {
-      SVN_ERR(svn_fs_contents_different(&changed,
+      /* Is this delta calculation worth our time?  If we are ignoring
+         ancestry, then our editor implementor isn't concerned by the
+         theoretical differences between "has contents which have not
+         changed with respect to" and "has the same actual contents
+         as".  We'll do everything we can to avoid transmitting even
+         an empty text-delta in that case.  */
+      if (c->ignore_ancestry)
+        SVN_ERR(svn_repos__compare_files(&changed,
+                                         c->target_root, target_path,
+                                         c->source_root, source_path,
+                                         subpool));
+      else
+        SVN_ERR(svn_fs_contents_changed(&changed,
                                         c->target_root, target_path,
                                         c->source_root, source_path,
                                         subpool));

Modified: subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/dump.c?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/dump.c Thu Oct 29 13:44:45 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-r1706428/subversion/libsvn_repos/reporter.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/reporter.c?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/reporter.c (original)
+++ subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/reporter.c Thu Oct 29 13:44:45 2015
@@ -576,8 +576,8 @@ delta_proplists(report_baton_t *b, svn_r
       SVN_ERR(get_source_root(b, &s_root, s_rev));
 
       /* Is this deltification worth our time? */
-      SVN_ERR(svn_fs_props_different(&changed, b->t_root, t_path, s_root,
-                                     s_path, pool));
+      SVN_ERR(svn_fs_props_changed(&changed, b->t_root, t_path, s_root,
+                                   s_path, pool));
       if (! changed)
         return SVN_NO_ERROR;
 

Modified: subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/rev_hunt.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/rev_hunt.c?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/rev_hunt.c (original)
+++ subversion/branches/1.9.x-r1706428/subversion/libsvn_repos/rev_hunt.c Thu Oct 29 13:44:45 2015
@@ -1367,31 +1367,17 @@ send_path_revision(struct path_revision
   SVN_ERR(svn_prop_diffs(&prop_diffs, props, sb->last_props,
                          sb->iterpool));
 
-  /* Check if the contents *may* have changed. */
+  /* Check if the contents changed. */
   if (! sb->last_root)
     {
       /* Special case: In the first revision, we always provide a delta. */
       contents_changed = TRUE;
     }
-  else if (sb->include_merged_revisions
-           && strcmp(sb->last_path, path_rev->path))
-    {
-      /* ### This is a HACK!!!
-       * Blame -g, in older clients anyways, relies on getting a notification
-       * whenever the path changes - even if there was no content change.
-       *
-       * TODO: A future release should take an extra parameter and depending
-       * on that either always send a text delta or only send it if there
-       * is a difference. */
-      contents_changed = TRUE;
-    }
   else
     {
-      /* Did the file contents actually change?
-       * It could e.g. be a property-only change. */
-      SVN_ERR(svn_fs_contents_different(&contents_changed, sb->last_root,
-                                        sb->last_path, root, path_rev->path,
-                                        sb->iterpool));
+      SVN_ERR(svn_fs_contents_changed(&contents_changed, sb->last_root,
+                                      sb->last_path, root, path_rev->path,
+                                      sb->iterpool));
     }
 
   /* We have all we need, give to the handler. */

Modified: subversion/branches/1.9.x-r1706428/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1706428/subversion/tests/cmdline/svnadmin_tests.py?rev=1711251&r1=1711250&r2=1711251&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1706428/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/1.9.x-r1706428/subversion/tests/cmdline/svnadmin_tests.py Thu Oct 29 13:44:45 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__':