subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1713862 - in /subversion/branches/move-tracking-2/subversion: include/private/svn_debug.h libsvn_subr/debug.c svnmover/svnmover.c
Date Wed, 11 Nov 2015 14:55:58 GMT
Author: julianfoad
Date: Wed Nov 11 14:55:58 2015
New Revision: 1713862

URL: http://svn.apache.org/viewvc?rev=1713862&view=rev
Log:
On the 'move-tracking-2' branch: Remove a special debug message suppression
control that I added to the branch in r1663372.

* subversion/include/private/svn_debug.h,
  subversion/libsvn_subr/debug.c
  (_quiet_mode,
   svn_dbg__set_quiet_mode,
   svn_dbg__quiet_mode): Delete.
  (svn_dbg__preamble,
   debug_vprintf): Return to just honouring the 'SVN_DBG_QUIET' env-var.

* subversion/svnmover/svnmover.c
  (parse_actions,
   sub_main): Let the '-v' option control the local notifications mode
    instead of the debug message mode.

Modified:
    subversion/branches/move-tracking-2/subversion/include/private/svn_debug.h
    subversion/branches/move-tracking-2/subversion/libsvn_subr/debug.c
    subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c

Modified: subversion/branches/move-tracking-2/subversion/include/private/svn_debug.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/include/private/svn_debug.h?rev=1713862&r1=1713861&r2=1713862&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/include/private/svn_debug.h (original)
+++ subversion/branches/move-tracking-2/subversion/include/private/svn_debug.h Wed Nov 11
14:55:58 2015
@@ -63,17 +63,6 @@ svn_dbg__print_props(apr_hash_t *props,
 #define SVN_DBG_OUTPUT stdout
 
 
-/* If QUIET_MODE is true, switch debug output off; if false, let it be
- * controlled by the presence of the environment variable SVN_DBG_QUIET.
- */
-void svn_dbg__set_quiet_mode(svn_boolean_t quiet_mode);
-
-/* Return true iff debug output is turned off, either by a call to
- * svn_dbg__set_quiet_mode(TRUE) or by the environment variable
- * SVN_DBG_QUIET being present.
- */
-svn_boolean_t svn_dbg__quiet_mode(void);
-
 /* Defining this symbol in the source file, BEFORE INCLUDING THIS HEADER,
    will switch off the output. Calls will still be made to svn_dbg__preamble()
    for breakpoints.  */

Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/debug.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/debug.c?rev=1713862&r1=1713861&r2=1713862&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_subr/debug.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_subr/debug.c Wed Nov 11 14:55:58
2015
@@ -46,17 +46,10 @@ static long debug_line = 0;
 static FILE * volatile debug_output = NULL;
 
 
-static svn_boolean_t _quiet_mode = FALSE;
-
-void svn_dbg__set_quiet_mode(svn_boolean_t quiet_mode)
-{
-  _quiet_mode = quiet_mode;
-}
-
-svn_boolean_t
-svn_dbg__quiet_mode(void)
+static svn_boolean_t
+quiet_mode(void)
 {
-  return _quiet_mode || getenv("SVN_DBG_QUIET") != NULL;
+  return getenv("SVN_DBG_QUIET") != NULL;
 }
 
 
@@ -65,7 +58,7 @@ svn_dbg__preamble(const char *file, long
 {
   debug_output = output;
 
-  if (output != NULL && !svn_dbg__quiet_mode())
+  if (output != NULL && !quiet_mode())
     {
       /* Quick and dirty basename() code.  */
       const char *slash = strrchr(file, '/');
@@ -91,7 +84,7 @@ debug_vprintf(const char *fmt, va_list a
   char *s = buffer;
   int n;
 
-  if (output == NULL || svn_dbg__quiet_mode())
+  if (output == NULL || quiet_mode())
     return;
 
   n = apr_snprintf(prefix, sizeof(prefix), DBG_FLAG "%s:%4ld: ",

Modified: subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c?rev=1713862&r1=1713861&r2=1713862&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c Wed Nov 11 14:55:58
2015
@@ -3403,11 +3403,8 @@ parse_actions(apr_array_header_t **actio
       if (! strcmp(action_string, "--verbose")
           || ! strcmp(action_string, "-v"))
         {
-          svn_boolean_t be_quiet = svn_dbg__quiet_mode();
-
-          be_quiet = !be_quiet;
-          svn_dbg__set_quiet_mode(be_quiet);
-          svnmover_notify("verbose debug messages %s", be_quiet ? "off" : "on");
+          quiet = !quiet;
+          svnmover_notify("verbose mode %s", quiet ? "off" : "on");
           continue;
         }
       for (j = 0; j < sizeof(action_defn) / sizeof(action_defn[0]); j++)
@@ -3644,9 +3641,6 @@ sub_main(int *exit_code, int argc, const
   /* Check library versions */
   SVN_ERR(check_lib_versions());
 
-  /* Suppress debug message unless '-v' given. */
-  svn_dbg__set_quiet_mode(TRUE);
-
   config_options = apr_array_make(pool, 0,
                                   sizeof(svn_cmdline__config_argument_t*));
 
@@ -3666,7 +3660,7 @@ sub_main(int *exit_code, int argc, const
       switch(opt)
         {
         case 'v':
-          svn_dbg__set_quiet_mode(FALSE);
+          quiet = FALSE;
           break;
         case 'q':
           quiet = TRUE;



Mime
View raw message