[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Improve wording of svn_delta_editor_t's absent_(file|directory) callback functions.

From: Trent Nelson <trent_at_snakebite.org>
Date: Tue, 10 Jan 2012 20:56:27 -0800

Howdy folks,

    The current wording of svn_delta_editor_t's absent_(file|directory)
    callback functions is a bit misleading:

        "In the (file|directory) ... but cannot be conveyed to the
         consumer (perhaps because of authorization restrictions)."
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    Because of that wording, I just spent a chunk of time looking through
    the code trying to find if these callbacks would be invoked for any
    reason *other* than an authorization restriction.

    I've concluded that no, they wouldn't :-)

    (The only code path that triggers delta.c:absent_file_or_dir() is
     wrapped up in an authz test in delta.c:add_file_or_dir().)

    Attached patch improves the wording so that there's no ambiguity
    as to when absent_(file|directory) callbacks would be invoked.

    Regards,

        Trent.

[[[
Improve docstrings for svn_delta_editor_t's absent_(file|directory) callbacks.

* subversion/include/svn_delta.h
  (svn_delta_editor_t): the absent_(file|directory)
   callbacks will *only* be invoked due to authz
   restrictions; state this clearly in the docstrings.

Patch by: Trent Nelson <trent_at_snakebite.org>
]]]

Index: subversion/include/svn_delta.h
===================================================================
--- subversion/include/svn_delta.h (revision 1229889)
+++ subversion/include/svn_delta.h (working copy)
@@ -916,8 +916,8 @@

   /** In the directory represented by @a parent_baton, indicate that
    * @a path is present as a subdirectory in the edit source, but
- * cannot be conveyed to the edit consumer (perhaps because of
- * authorization restrictions).
+ * cannot be conveyed to the edit consumer because of authorization
+ * restrictions.
    *
    * Any temporary allocations may be performed in @a scratch_pool.
    */
@@ -1040,8 +1040,8 @@

   /** In the directory represented by @a parent_baton, indicate that
    * @a path is present as a file in the edit source, but cannot be
- * conveyed to the edit consumer (perhaps because of authorization
- * restrictions).
+ * conveyed to the edit consumer because of authorization
+ * restrictions.
    *
    * Any temporary allocations may be performed in @a scratch_pool.
    */

Received on 2012-01-11 05:57:24 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.