subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1200837 - in /subversion/trunk/subversion: svn/commit-cmd.c svn/copy-cmd.c svn/delete-cmd.c svn/import-cmd.c svn/mkdir-cmd.c svn/move-cmd.c tests/cmdline/basic_tests.py
Date Fri, 11 Nov 2011 12:07:49 GMT
Author: philip
Date: Fri Nov 11 12:07:49 2011
New Revision: 1200837

URL: http://svn.apache.org/viewvc?rev=1200837&view=rev
Log:
Don't display the "Committed revision N." message when --quiet is
given.  This restores the behaviour to that of 1.6.

* subversion/svn/copy-cmd.c
  (svn_cl__copy): Don't report committed rev with --quiet.

* subversion/svn/delete-cmd.c
  (svn_cl__delete): Don't report committed rev with --quiet.

* subversion/svn/import-cmd.c
  (svn_cl__import): Don't report committed rev with --quiet.

* subversion/svn/mkdir-cmd.c
  (svn_cl__mkdir): Don't report committed rev with --quiet.

* subversion/svn/move-cmd.c
  (svn_cl__move): Don't report committed rev with --quiet.

* subversion/svn/commit-cmd.c
  (svn_cl__commit): Tweak to use same code pattern as other functions.

* subversion/tests/cmdline/basic_tests.py
  (quiet_commits): New test.
  (test_list): Add new test.

Modified:
    subversion/trunk/subversion/svn/commit-cmd.c
    subversion/trunk/subversion/svn/copy-cmd.c
    subversion/trunk/subversion/svn/delete-cmd.c
    subversion/trunk/subversion/svn/import-cmd.c
    subversion/trunk/subversion/svn/mkdir-cmd.c
    subversion/trunk/subversion/svn/move-cmd.c
    subversion/trunk/subversion/tests/cmdline/basic_tests.py

Modified: subversion/trunk/subversion/svn/commit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/commit-cmd.c?rev=1200837&r1=1200836&r2=1200837&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/commit-cmd.c (original)
+++ subversion/trunk/subversion/svn/commit-cmd.c Fri Nov 11 12:07:49 2011
@@ -175,8 +175,8 @@ svn_cl__commit(apr_getopt_t *os,
                            opt_state->include_externals, /* dir externals */
                            opt_state->changelists,
                            opt_state->revprop_table,
-                           ! opt_state->quiet
-                                ? svn_cl__print_commit_info : NULL,
+                           (opt_state->quiet
+                            ? NULL : svn_cl__print_commit_info),
                            NULL,
                            ctx,
                            pool);

Modified: subversion/trunk/subversion/svn/copy-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/copy-cmd.c?rev=1200837&r1=1200836&r2=1200837&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/copy-cmd.c (original)
+++ subversion/trunk/subversion/svn/copy-cmd.c Fri Nov 11 12:07:49 2011
@@ -136,7 +136,8 @@ svn_cl__copy(apr_getopt_t *os,
   err = svn_client_copy6(sources, dst_path, TRUE,
                          opt_state->parents, opt_state->ignore_externals,
                          opt_state->revprop_table,
-                         svn_cl__print_commit_info, NULL,
+                         (opt_state->quiet ? NULL : svn_cl__print_commit_info),
+                         NULL,
                          ctx, pool);
 
   if (ctx->log_msg_func3)

Modified: subversion/trunk/subversion/svn/delete-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/delete-cmd.c?rev=1200837&r1=1200836&r2=1200837&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/delete-cmd.c (original)
+++ subversion/trunk/subversion/svn/delete-cmd.c Fri Nov 11 12:07:49 2011
@@ -79,7 +79,9 @@ svn_cl__delete(apr_getopt_t *os,
   SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
   err = svn_client_delete4(targets, opt_state->force, opt_state->keep_local,
-                           opt_state->revprop_table, svn_cl__print_commit_info,
+                           opt_state->revprop_table,
+                           (opt_state->quiet
+                            ? NULL : svn_cl__print_commit_info),
                            NULL, ctx, pool);
   if (err)
     err = svn_cl__may_need_force(err);

Modified: subversion/trunk/subversion/svn/import-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/import-cmd.c?rev=1200837&r1=1200836&r2=1200837&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/import-cmd.c (original)
+++ subversion/trunk/subversion/svn/import-cmd.c Fri Nov 11 12:07:49 2011
@@ -120,7 +120,8 @@ svn_cl__import(apr_getopt_t *os,
                               opt_state->no_ignore,
                               opt_state->force,
                               opt_state->revprop_table,
-                              svn_cl__print_commit_info,
+                              (opt_state->quiet
+                               ? NULL : svn_cl__print_commit_info),
                               NULL,
                               ctx,
                               pool), pool));

Modified: subversion/trunk/subversion/svn/mkdir-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/mkdir-cmd.c?rev=1200837&r1=1200836&r2=1200837&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/mkdir-cmd.c (original)
+++ subversion/trunk/subversion/svn/mkdir-cmd.c Fri Nov 11 12:07:49 2011
@@ -78,7 +78,8 @@ svn_cl__mkdir(apr_getopt_t *os,
   SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
   err = svn_client_mkdir4(targets, opt_state->parents,
-                          opt_state->revprop_table, svn_cl__print_commit_info,
+                          opt_state->revprop_table,
+                          (opt_state->quiet ? NULL : svn_cl__print_commit_info),
                           NULL, ctx, pool);
 
   if (ctx->log_msg_func3)

Modified: subversion/trunk/subversion/svn/move-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/move-cmd.c?rev=1200837&r1=1200836&r2=1200837&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/move-cmd.c (original)
+++ subversion/trunk/subversion/svn/move-cmd.c Fri Nov 11 12:07:49 2011
@@ -86,7 +86,8 @@ svn_cl__move(apr_getopt_t *os,
 
   err = svn_client_move6(targets, dst_path,
                          TRUE, opt_state->parents, opt_state->revprop_table,
-                         svn_cl__print_commit_info, NULL, ctx, pool);
+                         (opt_state->quiet ? NULL : svn_cl__print_commit_info),
+                         NULL, ctx, pool);
 
   if (err)
     err = svn_cl__may_need_force(err);

Modified: subversion/trunk/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/basic_tests.py?rev=1200837&r1=1200836&r2=1200837&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/basic_tests.py Fri Nov 11 12:07:49 2011
@@ -2821,6 +2821,63 @@ def add_multiple_targets(sbox):
                                      'status', wc_dir)
 
 
+def quiet_commits(sbox):
+  "commits with --quiet"
+
+  sbox.build()
+
+  svntest.main.file_append(sbox.ospath('A/mu'), 'xxx')
+
+  svntest.actions.run_and_verify_svn(None, [], [],
+                                     'commit', sbox.wc_dir,
+                                     '--message', 'commit', '--quiet')
+
+  svntest.actions.run_and_verify_svn(None, [], [],
+                                     'mkdir', sbox.repo_url + '/X',
+                                     '--message', 'mkdir URL', '--quiet')
+
+  svntest.actions.run_and_verify_svn(None, [], [],
+                                     'import', sbox.ospath('A/mu'),
+                                     sbox.repo_url + '/f',
+                                     '--message', 'import', '--quiet')
+
+  svntest.actions.run_and_verify_svn(None, [], [],
+                                     'rm', sbox.repo_url + '/f',
+                                     '--message', 'rm URL', '--quiet')
+
+  svntest.actions.run_and_verify_svn(None, [], [],
+                                     'copy', sbox.repo_url + '/X',
+                                     sbox.repo_url + '/Y',
+                                     '--message', 'cp URL URL', '--quiet')
+
+  svntest.actions.run_and_verify_svn(None, [], [],
+                                     'move', sbox.repo_url + '/Y',
+                                     sbox.repo_url + '/Z',
+                                     '--message', 'mv URL URL', '--quiet')
+
+  # Not fully testing each command, just that they all commit and
+  # produce no output.
+  expected_output = wc.State(sbox.wc_dir, {
+    'X' : Item(status='A '),
+    'Z' : Item(status='A '),
+    })
+  expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 7)
+  expected_status.add({
+      'X'   : Item(status='  ', wc_rev=7),
+      'Z'   : Item(status='  ', wc_rev=7),
+      })
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.tweak('A/mu',
+                      contents=expected_disk.desc['A/mu'].contents
+                      + 'xxx')
+  expected_disk.add({
+    'X' : Item(),
+    'Z' : Item()
+    })
+  svntest.actions.run_and_verify_update(sbox.wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status)
 
 ########################################################################
 # Run the tests
@@ -2885,6 +2942,7 @@ test_list = [ None,
               ls_url_special_characters,
               ls_multiple_and_non_existent_targets,
               add_multiple_targets,
+              quiet_commits,
              ]
 
 if __name__ == '__main__':



Mime
View raw message