Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D80F4F1E9 for ; Tue, 23 Apr 2013 16:23:14 +0000 (UTC) Received: (qmail 9074 invoked by uid 500); 23 Apr 2013 16:23:14 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 9045 invoked by uid 500); 23 Apr 2013 16:23:14 -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 9038 invoked by uid 99); 23 Apr 2013 16:23:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Apr 2013 16:23:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.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; Tue, 23 Apr 2013 16:23:12 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E896A23888CD; Tue, 23 Apr 2013 16:22:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1471028 - in /subversion/trunk/subversion: libsvn_repos/fs-wrap.c svnadmin/svnadmin.c tests/cmdline/svnadmin_tests.py Date: Tue, 23 Apr 2013 16:22:50 -0000 To: commits@subversion.apache.org From: philip@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130423162250.E896A23888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: philip Date: Tue Apr 23 16:22:50 2013 New Revision: 1471028 URL: http://svn.apache.org/r1471028 Log: Fix issue 4359, incorrect/missing pack notification. * subversion/libsvn_repos/fs-wrap.c (pack_notify_func): Correct action conversion. * subversion/svnadmin/svnadmin.c (subcommand_pack): Notify to stdout not stderr. * subversion/tests/cmdline/svnadmin_tests.py (hotcopy_incremental_packed): Expect packed notifications. Modified: subversion/trunk/subversion/libsvn_repos/fs-wrap.c subversion/trunk/subversion/svnadmin/svnadmin.c subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py Modified: subversion/trunk/subversion/libsvn_repos/fs-wrap.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/fs-wrap.c?rev=1471028&r1=1471027&r2=1471028&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_repos/fs-wrap.c (original) +++ subversion/trunk/subversion/libsvn_repos/fs-wrap.c Tue Apr 23 16:22:50 2013 @@ -740,7 +740,14 @@ pack_notify_func(void *baton, struct pack_notify_baton *pnb = baton; svn_repos_notify_t *notify; - notify = svn_repos_notify_create(pack_action + 3, pool); + /* Simple conversion works for these values. */ + SVN_ERR_ASSERT(pack_action >= svn_fs_pack_notify_start + && pack_action <= svn_fs_pack_notify_end_revprop); + + notify = svn_repos_notify_create(pack_action + + svn_repos_notify_pack_shard_start + - svn_fs_pack_notify_start, + pool); notify->shard = shard; pnb->notify_func(pnb->notify_baton, notify, pool); Modified: subversion/trunk/subversion/svnadmin/svnadmin.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/svnadmin.c?rev=1471028&r1=1471027&r2=1471028&view=diff ============================================================================== --- subversion/trunk/subversion/svnadmin/svnadmin.c (original) +++ subversion/trunk/subversion/svnadmin/svnadmin.c Tue Apr 23 16:22:50 2013 @@ -1537,7 +1537,7 @@ subcommand_pack(apr_getopt_t *os, void * /* Progress feedback goes to STDOUT, unless they asked to suppress it. */ if (! opt_state->quiet) - progress_stream = recode_stream_create(stderr, pool); + progress_stream = recode_stream_create(stdout, pool); return svn_error_trace( svn_repos_fs_pack2(repos, !opt_state->quiet ? repos_notify_handler : NULL, Modified: subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py?rev=1471028&r1=1471027&r2=1471028&view=diff ============================================================================== --- subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py Tue Apr 23 16:22:50 2013 @@ -1621,7 +1621,8 @@ def hotcopy_incremental_packed(sbox): # Pack revisions 0 and 1. svntest.actions.run_and_verify_svnadmin( - None, None, [], "pack", os.path.join(cwd, sbox.repo_dir)) + None, ['Packing revisions in shard 0...done.\n'], [], "pack", + os.path.join(cwd, sbox.repo_dir)) # Commit 5 more revs, hotcopy and pack after each commit. for i in [1, 2, 3, 4, 5]: @@ -1637,8 +1638,12 @@ def hotcopy_incremental_packed(sbox): if i < 5: sbox.simple_mkdir("newdir-%i" % i) sbox.simple_commit() + if not i % 2: + expected_output = ['Packing revisions in shard %d...done.\n' % (i/2)] + else: + expected_output = [] svntest.actions.run_and_verify_svnadmin( - None, None, [], "pack", os.path.join(cwd, sbox.repo_dir)) + None, expected_output, [], "pack", os.path.join(cwd, sbox.repo_dir)) def locking(sbox):