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

RE: svn commit: r937033 - /subversion/trunk/subversion/libsvn_repos/dump.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Fri, 23 Apr 2010 10:14:26 +0200

> -----Original Message-----
> From: pburba_at_apache.org [mailto:pburba_at_apache.org]
> Sent: donderdag 22 april 2010 21:40
> To: commits_at_subversion.apache.org
> Subject: svn commit: r937033 -
> /subversion/trunk/subversion/libsvn_repos/dump.c
>
> Author: pburba
> Date: Thu Apr 22 19:40:07 2010
> New Revision: 937033
>
> URL: http://svn.apache.org/viewvc?rev=937033&view=rev
> Log:
> Issue an end-of-dump summary warning to supplement any in-line
> copy-source warnings so the latter don't get missed in a sea of output.
>
> See http://svn.haxx.se/dev/archive-2010-04/0475.shtml
>
> * subversion/libsvn_repos/dump.c
>
> (edit_baton): Add new member found_old_reference.
>
> (dump_node): Set new edit baton member if an old reference warning is
> issued.
>
> (svn_repos_dump_fs3): Possibly issue new summary warning.
>
> Modified:
> subversion/trunk/subversion/libsvn_repos/dump.c
>
> Modified: subversion/trunk/subversion/libsvn_repos/dump.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/d
> ump.c?rev=937033&r1=937032&r2=937033&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_repos/dump.c (original)
> +++ subversion/trunk/subversion/libsvn_repos/dump.c Thu Apr 22 19:40:07
> 2010
> @@ -196,6 +196,10 @@ struct edit_baton
> /* The first revision dumped in this dumpstream. */
> svn_revnum_t oldest_dumped_rev;
>
> + /* Set to true if any references to revisions older than
> + OLDEST_DUMPED_REV were found in the dumpstream. */
> + svn_boolean_t found_old_reference;
> +
> /* reusable buffer for writing file contents */
> char buffer[SVN__STREAM_CHUNK_SIZE];
> apr_size_t bufsize;
> @@ -428,7 +432,7 @@ dump_node(struct edit_baton *eb,
> " into an empty repository\n"
> "WARNING: will fail.\n"),
> cmp_rev, eb->oldest_dumped_rev);
> -
> + eb->found_old_reference = TRUE;
> SVN_ERR(eb->progress_func(eb->progress_baton,
> eb->oldest_dumped_rev, warning, pool));
> }
> @@ -982,6 +986,7 @@ svn_repos_dump_fs3(svn_repos_t *repos,
> svn_revnum_t youngest;
> const char *uuid;
> int version;
> + svn_boolean_t found_old_reference = FALSE;
>
> /* Determine the current youngest revision of the filesystem. */
> SVN_ERR(svn_fs_youngest_rev(&youngest, fs, pool));
> @@ -1109,6 +1114,23 @@ svn_repos_dump_fs3(svn_repos_t *repos,
> loop_end:
> if (progress_func)
> SVN_ERR(progress_func(progress_baton, to_rev, NULL, subpool));
> +
> + if (((struct edit_baton *)dump_edit_baton)->found_old_reference)
> + found_old_reference = TRUE;
> + }
> +
> + /* 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)
> + {
> + const char *warning = apr_psprintf(
> + subpool,
> + _("WARNING: The range of revisions dumped contained references
> to\n"
> + "WARNING: copy sources outside that range.\n"));
> + SVN_ERR(progress_func(progress_baton, SVN_INVALID_REVNUM,
> warning,
> + subpool));
> }

This block needs a test for progress_func being NULL. (And doesn't need the apr_psprintf, but Greg already noticed that)

        Bert
Received on 2010-04-23 10:15:06 CEST

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