subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
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 GMT
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):



Mime
View raw message