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:39:56 UTC

svn commit: r1711250 - in /subversion/trunk: notes/api-errata/1.9/fs001.txt subversion/include/svn_fs.h

Author: kotkov
Date: Thu Oct 29 13:39:56 2015
New Revision: 1711250

URL: http://svn.apache.org/viewvc?rev=1711250&view=rev
Log:
Following up on r1709388, update the necessary documentation and the
API errata.

* notes/api-errata/1.9/fs001.txt
  (): Add a note about the scope of this erratum.  Provide references to the
   issue tracker and to relevant discussions in the mailing list.

* subversion/include/svn_fs.h
  (svn_fs_props_changed, svn_fs_contents_different, svn_fs_contents_changed):
   Update the docstrings for these functions.  Link the documentation for
   svn_fs_props_changed() to svn_fs_contents_changed() and state the design
   rationale for the latter.  Mention issue 4598 in the docstrings.

Modified:
    subversion/trunk/notes/api-errata/1.9/fs001.txt
    subversion/trunk/subversion/include/svn_fs.h

Modified: subversion/trunk/notes/api-errata/1.9/fs001.txt
URL: http://svn.apache.org/viewvc/subversion/trunk/notes/api-errata/1.9/fs001.txt?rev=1711250&r1=1711249&r2=1711250&view=diff
==============================================================================
--- subversion/trunk/notes/api-errata/1.9/fs001.txt (original)
+++ subversion/trunk/notes/api-errata/1.9/fs001.txt Thu Oct 29 13:39:56 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/trunk/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_fs.h?rev=1711250&r1=1711249&r2=1711250&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_fs.h (original)
+++ subversion/trunk/subversion/include/svn_fs.h Thu Oct 29 13:39:56 2015
@@ -1888,9 +1888,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
@@ -1898,15 +1896,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,
@@ -2426,7 +2422,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
@@ -2444,9 +2440,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
@@ -2454,10 +2448,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,