Return-Path: Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: (qmail 52985 invoked from network); 22 Apr 2010 19:40:53 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Apr 2010 19:40:53 -0000 Received: (qmail 24157 invoked by uid 500); 22 Apr 2010 19:40:53 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 24131 invoked by uid 500); 22 Apr 2010 19:40:53 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 24124 invoked by uid 99); 22 Apr 2010 19:40:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 19:40:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 19:40:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D261323888EA; Thu, 22 Apr 2010 19:40:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r937033 - /subversion/trunk/subversion/libsvn_repos/dump.c Date: Thu, 22 Apr 2010 19:40:07 -0000 To: commits@subversion.apache.org From: pburba@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100422194007.D261323888EA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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/dump.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)); } svn_pool_destroy(subpool);