Author: danielsh
Date: Fri Jul 15 08:02:27 2011
New Revision: 1147003

URL: http://svn.apache.org/viewvc?rev=1147003&view=rev
Log:
On the fs-progress branch, make the code reflect the original intent of
being a future extensibility hook:

Make the additional parameter to svn_fs_progress_notify_func_t be
a non-defined opaque struct type.

* subversion/include/svn_fs.h
  (svn_fs_progress_info_t): New opaque struct type.
  (svn_fs_progress_notify_func_t): Take the new struct type.
    Update docs.

* subversion/include/svn_repos.h
  (svn_repos_notify_t):
    Track type change.

* subversion/libsvn_repos/dump.c
  (progress_to_notify):
    Track signature change.  Assert the "is NULL" promise.

Modified:
    subversion/branches/fs-progress/subversion/include/svn_fs.h
    subversion/branches/fs-progress/subversion/include/svn_repos.h
    subversion/branches/fs-progress/subversion/libsvn_repos/dump.c

Modified: subversion/branches/fs-progress/subversion/include/svn_fs.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/fs-progress/subversion/include/svn_fs.h?rev=1147003&r1=1147002&r2=1147003&view=diff
==============================================================================
--- subversion/branches/fs-progress/subversion/include/svn_fs.h (original)
+++ subversion/branches/fs-progress/subversion/include/svn_fs.h Fri Jul 15 
08:02:27 2011
@@ -246,20 +246,26 @@ svn_fs_upgrade(const char *path,
                apr_pool_t *pool);
 
 /**
+ * This is an opaque struct passed to #svn_fs_progress_notify_func_t.  In
+ * a future release it may be defined.
+ *
+ * @since New in 1.8.
+ */
+typedef struct svn_fs_progress_info_t svn_fs_progress_info_t;
+
+/**
  * Callback function type for progress notification.
  *
- * @a progress is the number of steps already completed, @a total is
- * the total number of steps in this stage, @a stage is the number of
- * stages (for extensibility), @a baton is the callback baton.
+ * @a progress is the number of steps already completed, out of @a total steps.
+ * @a info must be @c NULL in Subversion 1.8.  @a baton is the callback baton.
  *
- * @note The number of stages may vary depending on the backend, library
- * version, and so on.  @a total may be a best-effort estimate.
+ * @note @a total may be a best-effort estimate.
  *
  * @since New in 1.8.
  */
 typedef void (*svn_fs_progress_notify_func_t)(apr_int64_t progress,
                                               apr_int64_t total,
-                                              int stage,
+                                              svn_fs_progress_info_t *info,
                                               void *baton,
                                               apr_pool_t *scratch_pool);
 

Modified: subversion/branches/fs-progress/subversion/include/svn_repos.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/fs-progress/subversion/include/svn_repos.h?rev=1147003&r1=1147002&r2=1147003&view=diff
==============================================================================
--- subversion/branches/fs-progress/subversion/include/svn_repos.h (original)
+++ subversion/branches/fs-progress/subversion/include/svn_repos.h Fri Jul 15 
08:02:27 2011
@@ -331,7 +331,7 @@ typedef struct svn_repos_notify_t
       see svn_fs_progress_notify_func_t. */
   apr_int64_t progress_progress;
   apr_int64_t progress_total;
-  int progress_stage;
+  svn_fs_progress_info_t *progress_stage;
 
   /* NOTE: Add new fields at the end to preserve binary compatibility.
      Also, if you add fields here, you have to update

Modified: subversion/branches/fs-progress/subversion/libsvn_repos/dump.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fs-progress/subversion/libsvn_repos/dump.c?rev=1147003&r1=1147002&r2=1147003&view=diff
==============================================================================
--- subversion/branches/fs-progress/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/fs-progress/subversion/libsvn_repos/dump.c Fri Jul 15 
08:02:27 2011
@@ -1256,11 +1256,14 @@ struct progress_to_notify_baton
 static void
 progress_to_notify(apr_int64_t progress,
                    apr_int64_t total,
-                   int stage,
+                   svn_fs_progress_info_t *stage,
                    void *baton,
                    apr_pool_t *scratch_pool)
 {
   struct progress_to_notify_baton *ptnb = baton;
+
+  SVN_ERR_ASSERT_NO_RETURN(stage == NULL);
+
   ptnb->notify->progress_progress = progress;
   ptnb->notify->progress_total = total;
   ptnb->notify->progress_stage = stage;


Reply via email to