You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/05/28 21:24:03 UTC
svn commit: r949266 - in /subversion/trunk/subversion: include/svn_repos.h
libsvn_repos/deprecated.c libsvn_repos/dump.c
Author: hwright
Date: Fri May 28 19:24:03 2010
New Revision: 949266
URL: http://svn.apache.org/viewvc?rev=949266&view=rev
Log:
Rename svn_repos_progress_func_t to svn_repos_notify_func_t, with the
associated variables and batons.
* subversion/include/svn_repos.h
(svn_repos_progress_func_t): Renamed from this...
(svn_repos_notify_func_t): ...to this.
[elsewhere]: Update variable names and references.
* subversion/libsvn_repos/deprecated.c,
subversion/libsvn_repos/dump.c:
Update variable names and references.
Modified:
subversion/trunk/subversion/include/svn_repos.h
subversion/trunk/subversion/libsvn_repos/deprecated.c
subversion/trunk/subversion/libsvn_repos/dump.c
Modified: subversion/trunk/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_repos.h?rev=949266&r1=949265&r2=949266&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_repos.h (original)
+++ subversion/trunk/subversion/include/svn_repos.h Fri May 28 19:24:03 2010
@@ -2119,10 +2119,10 @@ enum svn_repos_load_uuid
* the repository.
*
* @since New in 1.7. */
-typedef svn_error_t *(*svn_repos_progress_func_t)(void *baton,
- svn_revnum_t rev,
- const char *warning_text,
- apr_pool_t *scratch_pool);
+typedef svn_error_t *(*svn_repos_notify_func_t)(void *baton,
+ svn_revnum_t rev,
+ const char *warning_text,
+ apr_pool_t *scratch_pool);
/**
@@ -2135,9 +2135,9 @@ typedef svn_error_t *(*svn_repos_progres
* revision 0. If @a end_rev is #SVN_INVALID_REVNUM, then verify
* through the @c HEAD revision.
*
- * For every verified revision call @a progress_func with @a rev set to
+ * For every verified revision call @a notify_func with @a rev set to
* the verified revision and @a warning_text @c NULL. For warnings call @a
- * progress_func with @a warning_text set.
+ * notify_func with @a warning_text set.
*
* If @a cancel_func is not @c NULL, call it periodically with @a
* cancel_baton as argument to see if the caller wishes to cancel the
@@ -2149,15 +2149,15 @@ svn_error_t *
svn_repos_verify_fs2(svn_repos_t *repos,
svn_revnum_t start_rev,
svn_revnum_t end_rev,
- svn_repos_progress_func_t progress,
- void *progress_baton,
+ svn_repos_notify_func_t notify_func,
+ void *notify_baton,
svn_cancel_func_t cancel,
void *cancel_baton,
apr_pool_t *scratch_pool);
/**
* Similar to svn_repos_verify_fs2(), but with a feedback_stream instead of
- * handling feedback via the progress_func handler
+ * handling feedback via the notify_func handler
*
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.6 API.
@@ -2195,9 +2195,9 @@ svn_repos_verify_fs(svn_repos_t *repos,
* be done with full plain text. A dump with @a use_deltas set cannot
* be loaded by Subversion 1.0.x.
*
- * If @a progress_func is not @c NULL, then for every dumped revision call
- * @a progress_func with @a rev set to the dumped revision and @a warning_text
- * @c NULL. For warnings call @a progress_func with @a warning_text.
+ * If @a notify_func is not @c NULL, then for every dumped revision call
+ * @a notify_func with @a rev set to the dumped revision and @a warning_text
+ * @c NULL. For warnings call @a notify_func with @a warning_text.
*
* If @a cancel_func is not @c NULL, it is called periodically with
* @a cancel_baton as argument to see if the client wishes to cancel
@@ -2212,15 +2212,15 @@ svn_repos_dump_fs3(svn_repos_t *repos,
svn_revnum_t end_rev,
svn_boolean_t incremental,
svn_boolean_t use_deltas,
- svn_repos_progress_func_t progress_func,
- void *progress_baton,
+ svn_repos_notify_func_t notify_func,
+ void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/**
* Similar to svn_repos_dump_fs3(), but with a feedback_stream instead of
- * handling feedback via the progress_func handler
+ * handling feedback via the notify_func handler
*
* @since New in 1.1.
* @deprecated Provided for backward compatibility with the 1.6 API.
Modified: subversion/trunk/subversion/libsvn_repos/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/deprecated.c?rev=949266&r1=949265&r2=949266&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_repos/deprecated.c Fri May 28 19:24:03 2010
@@ -429,13 +429,13 @@ svn_repos_dump_fs(svn_repos_t *repos,
}
/* Baton for repos_progress_handler */
-struct progress_baton
+struct notify_baton
{
svn_boolean_t dumping;
svn_stream_t *feedback_stream;
};
-/* Implementation of svn_repos_progress_func_t to wrap the output to a
+/* Implementation of svn_repos_notify_func_t to wrap the output to a
response stream for svn_repos_dump_fs2() and svn_repos_verify_fs() */
static svn_error_t *
repos_progress_handler(void * baton,
@@ -443,16 +443,16 @@ repos_progress_handler(void * baton,
const char *warning_text,
apr_pool_t *scratch_pool)
{
- struct progress_baton *pb = baton;
+ struct notify_baton *nb = baton;
if (warning_text != NULL)
{
apr_size_t len = strlen(warning_text);
- SVN_ERR(svn_stream_write(pb->feedback_stream, warning_text, &len));
+ SVN_ERR(svn_stream_write(nb->feedback_stream, warning_text, &len));
}
else
- SVN_ERR(svn_stream_printf(pb->feedback_stream, scratch_pool,
- pb->dumping
+ SVN_ERR(svn_stream_printf(nb->feedback_stream, scratch_pool,
+ nb->dumping
? _("* Dumped revision %ld.\n")
: _("* Verified revision %ld.\n"),
revision));
@@ -473,9 +473,9 @@ svn_repos_dump_fs2(svn_repos_t *repos,
void *cancel_baton,
apr_pool_t *pool)
{
- struct progress_baton pb;
- pb.dumping = (stream != NULL); /* Show verify messages if stream is NULL */
- pb.feedback_stream = feedback_stream;
+ struct notify_baton nb;
+ nb.dumping = (stream != NULL); /* Show verify messages if stream is NULL */
+ nb.feedback_stream = feedback_stream;
return svn_error_return(svn_repos_dump_fs3(repos,
stream,
@@ -486,7 +486,7 @@ svn_repos_dump_fs2(svn_repos_t *repos,
feedback_stream
? repos_progress_handler
: NULL,
- &pb,
+ &nb,
cancel_func,
cancel_baton,
pool));
@@ -501,9 +501,9 @@ svn_repos_verify_fs(svn_repos_t *repos,
void *cancel_baton,
apr_pool_t *pool)
{
- struct progress_baton pb;
- pb.dumping = FALSE;
- pb.feedback_stream = feedback_stream;
+ struct notify_baton nb;
+ nb.dumping = FALSE;
+ nb.feedback_stream = feedback_stream;
return svn_error_return(svn_repos_verify_fs2(repos,
start_rev,
@@ -511,7 +511,7 @@ svn_repos_verify_fs(svn_repos_t *repos,
feedback_stream
? repos_progress_handler
: NULL,
- &pb,
+ &nb,
cancel_func,
cancel_baton,
pool));
Modified: subversion/trunk/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/dump.c?rev=949266&r1=949265&r2=949266&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/dump.c (original)
+++ subversion/trunk/subversion/libsvn_repos/dump.c Fri May 28 19:24:03 2010
@@ -181,8 +181,8 @@ struct edit_baton
svn_stream_t *stream;
/* Send feedback here, if non-NULL */
- svn_repos_progress_func_t progress_func;
- void *progress_baton;
+ svn_repos_notify_func_t notify_func;
+ void *notify_baton;
/* The fs revision root, so we can read the contents of paths. */
svn_fs_root_t *fs_root;
@@ -427,7 +427,7 @@ dump_node(struct edit_baton *eb,
else
{
if (!eb->verify && cmp_rev < eb->oldest_dumped_rev
- && eb->progress_func)
+ && eb->notify_func)
{
const char *warning = apr_psprintf(
pool,
@@ -438,7 +438,7 @@ dump_node(struct edit_baton *eb,
"WARNING: will fail.\n"),
cmp_rev, eb->oldest_dumped_rev);
eb->found_old_reference = TRUE;
- SVN_ERR(eb->progress_func(eb->progress_baton,
+ SVN_ERR(eb->notify_func(eb->notify_baton,
eb->oldest_dumped_rev, warning, pool));
}
@@ -513,7 +513,7 @@ dump_node(struct edit_baton *eb,
/* If this is a partial dump, then issue a warning if we dump mergeinfo
properties that refer to revisions older than the first revision
dumped. */
- if (eb->progress_func && eb->oldest_dumped_rev > 1)
+ if (eb->notify_func && eb->oldest_dumped_rev > 1)
{
svn_string_t *mergeinfo_str = apr_hash_get(prophash,
SVN_PROP_MERGEINFO,
@@ -539,7 +539,7 @@ dump_node(struct edit_baton *eb,
eb->oldest_dumped_rev);
eb->found_old_mergeinfo = TRUE;
- SVN_ERR(eb->progress_func(eb->progress_baton,
+ SVN_ERR(eb->notify_func(eb->notify_baton,
SVN_INVALID_REVNUM,
warning, pool));
}
@@ -898,8 +898,8 @@ get_dump_editor(const svn_delta_editor_t
svn_revnum_t to_rev,
const char *root_path,
svn_stream_t *stream,
- svn_repos_progress_func_t progress_func,
- void *progress_baton,
+ svn_repos_notify_func_t notify_func,
+ void *notify_baton,
svn_revnum_t oldest_dumped_rev,
svn_boolean_t use_deltas,
svn_boolean_t verify,
@@ -913,8 +913,8 @@ get_dump_editor(const svn_delta_editor_t
/* Set up the edit baton. */
eb->stream = stream;
- eb->progress_func = progress_func;
- eb->progress_baton = progress_baton;
+ eb->notify_func = notify_func;
+ eb->notify_baton = notify_baton;
eb->oldest_dumped_rev = oldest_dumped_rev;
eb->bufsize = sizeof(eb->buffer);
eb->path = apr_pstrdup(pool, root_path);
@@ -1014,8 +1014,8 @@ svn_repos_dump_fs3(svn_repos_t *repos,
svn_revnum_t end_rev,
svn_boolean_t incremental,
svn_boolean_t use_deltas,
- svn_repos_progress_func_t progress_func,
- void *progress_baton,
+ svn_repos_notify_func_t notify_func,
+ void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool)
@@ -1123,7 +1123,7 @@ svn_repos_dump_fs3(svn_repos_t *repos,
non-incremental dump. */
use_deltas_for_rev = use_deltas && (incremental || i != start_rev);
SVN_ERR(get_dump_editor(&dump_editor, &dump_edit_baton, fs, to_rev,
- "/", stream, progress_func, progress_baton,
+ "/", stream, notify_func, notify_baton,
start_rev, use_deltas_for_rev, FALSE, subpool));
/* Drive the editor in one way or another. */
@@ -1155,8 +1155,8 @@ svn_repos_dump_fs3(svn_repos_t *repos,
}
loop_end:
- if (progress_func)
- SVN_ERR(progress_func(progress_baton, to_rev, NULL, subpool));
+ if (notify_func)
+ SVN_ERR(notify_func(notify_baton, to_rev, NULL, subpool));
if (dump_edit_baton) /* We never get an edit baton for r0. */
{
@@ -1167,14 +1167,14 @@ svn_repos_dump_fs3(svn_repos_t *repos,
}
}
- if (progress_func)
+ if (notify_func)
{
/* Did we issue any warnings about references to revisions older than
the oldest dumped revision? If so, then issue a final generic
warning, since the inline warnings already issued might easily be
missed. */
if (found_old_reference)
- SVN_ERR(progress_func(progress_baton, SVN_INVALID_REVNUM,
+ SVN_ERR(notify_func(notify_baton, SVN_INVALID_REVNUM,
_("WARNING: The range of revisions dumped "
"contained references to\n"
"WARNING: copy sources outside that "
@@ -1184,7 +1184,7 @@ svn_repos_dump_fs3(svn_repos_t *repos,
/* Ditto if we issued any warnings about old revisions referenced
in dumped mergeinfo. */
if (found_old_mergeinfo)
- SVN_ERR(progress_func(progress_baton, SVN_INVALID_REVNUM,
+ SVN_ERR(notify_func(notify_baton, SVN_INVALID_REVNUM,
_("WARNING: The range of revisions dumped "
"contained mergeinfo\n"
"WARNING: which reference revisions outside "
@@ -1264,8 +1264,8 @@ svn_error_t *
svn_repos_verify_fs2(svn_repos_t *repos,
svn_revnum_t start_rev,
svn_revnum_t end_rev,
- svn_repos_progress_func_t progress_func,
- void *progress_baton,
+ svn_repos_notify_func_t notify_func,
+ void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool)
@@ -1311,7 +1311,7 @@ svn_repos_verify_fs2(svn_repos_t *repos,
SVN_ERR(get_dump_editor((const svn_delta_editor_t **)&dump_editor,
&dump_edit_baton, fs, rev, "",
svn_stream_empty(pool),
- progress_func, progress_baton,
+ notify_func, notify_baton,
start_rev,
FALSE, TRUE, /* use_deltas, verify */
iterpool));
@@ -1328,8 +1328,8 @@ svn_repos_verify_fs2(svn_repos_t *repos,
NULL, NULL, iterpool));
SVN_ERR(svn_fs_revision_proplist(&props, fs, rev, iterpool));
- if (progress_func)
- SVN_ERR(progress_func(progress_baton, rev, NULL, iterpool));
+ if (notify_func)
+ SVN_ERR(notify_func(notify_baton, rev, NULL, iterpool));
}
svn_pool_destroy(iterpool);