subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1135986 - in /subversion/trunk/subversion: include/ libsvn_delta/ libsvn_fs_fs/ libsvn_ra_svn/ mod_dav_svn/ svnrdump/ svnserve/
Date Wed, 15 Jun 2011 10:12:22 GMT
Author: julianfoad
Date: Wed Jun 15 10:12:21 2011
New Revision: 1135986

URL: http://svn.apache.org/viewvc?rev=1135986&view=rev
Log:
Rename the new SVN_..._COMPRESSION_LEVEL constants to have a common prefix.

* subversion/include/svn_delta.h
  (SVN_NO_COMPRESSION_LEVEL): Rename to SVN_DELTA_COMPRESSION_LEVEL_NONE.
  (SVN_MAX_COMPRESSION_LEVEL): Rename to SVN_DELTA_COMPRESSION_LEVEL_MAX.
  (SVN_DEFAULT_COMPRESSION_LEVEL): Rename to
    SVN_DELTA_COMPRESSION_LEVEL_DEFAULT.
  (svn_txdelta_to_svndiff2): Track the rename in the doc string.

* subversion/include/svn_ra_svn.h
  (svn_ra_svn_create_conn): Same.

* subversion/libsvn_delta/svndiff.c
  (svn_txdelta_to_svndiff2, svn_txdelta_to_svndiff): Track the rename.

* subversion/libsvn_fs_fs/fs_fs.c
  (rep_write_get_baton): Same.

* subversion/libsvn_ra_svn/client.c
  (handle_child_process_error, make_tunnel, open_session): Same.

* subversion/libsvn_ra_svn/marshal.c
  (svn_ra_svn_create_conn): Same.

* subversion/mod_dav_svn/mod_dav_svn.c
  (svn__compression_level, SVNCompressionLevel_cmd): Same.

* subversion/svnrdump/dump_editor.c
  (apply_textdelta): Same.

* subversion/svnserve/main.c
  (main): Same.

* subversion/svnserve/server.h
  (serve_params_t): Same.

Modified:
    subversion/trunk/subversion/include/svn_delta.h
    subversion/trunk/subversion/include/svn_ra_svn.h
    subversion/trunk/subversion/libsvn_delta/svndiff.c
    subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
    subversion/trunk/subversion/libsvn_ra_svn/client.c
    subversion/trunk/subversion/libsvn_ra_svn/marshal.c
    subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c
    subversion/trunk/subversion/svnrdump/dump_editor.c
    subversion/trunk/subversion/svnserve/main.c
    subversion/trunk/subversion/svnserve/server.h

Modified: subversion/trunk/subversion/include/svn_delta.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_delta.h?rev=1135986&r1=1135985&r2=1135986&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_delta.h (original)
+++ subversion/trunk/subversion/include/svn_delta.h Wed Jun 15 10:12:21 2011
@@ -53,13 +53,13 @@ extern "C" {
  *
  * @since New in 1.7.
  */
-#define SVN_NO_COMPRESSION_LEVEL 0
+#define SVN_DELTA_COMPRESSION_LEVEL_NONE 0
 
 /** This is the maximum compression level we can pass to zlib.
  *
  * @since New in 1.7.
  */
-#define SVN_MAX_COMPRESSION_LEVEL 9
+#define SVN_DELTA_COMPRESSION_LEVEL_MAX 9
 
 /** This is the default compression level we pass to zlib.  It
  * should be between 0 and 9, with higher numbers resulting in
@@ -67,7 +67,7 @@ extern "C" {
  *
  * @since New in 1.7.
  */
-#define SVN_DEFAULT_COMPRESSION_LEVEL 5
+#define SVN_DELTA_COMPRESSION_LEVEL_DEFAULT 5
 
 /**
  * Get libsvn_delta version information.
@@ -487,7 +487,7 @@ svn_txdelta_to_svndiff3(svn_txdelta_wind
                         apr_pool_t *pool);
 
 /** Similar to svn_txdelta_to_svndiff3(), but always using the SVN default
- * compression level (#SVN_DEFAULT_COMPRESSION_LEVEL).
+ * compression level (#SVN_DELTA_COMPRESSION_LEVEL_DEFAULT).
  *
  * @since New in 1.4.
  * @deprecated Provided for backward compatibility with the 1.6 API.

Modified: subversion/trunk/subversion/include/svn_ra_svn.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_ra_svn.h?rev=1135986&r1=1135985&r2=1135986&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_ra_svn.h (original)
+++ subversion/trunk/subversion/include/svn_ra_svn.h Wed Jun 15 10:12:21 2011
@@ -174,7 +174,7 @@ svn_ra_svn_create_conn2(apr_socket_t *so
                         apr_pool_t *pool);
 
 /** Similar to svn_ra_svn_create_conn2() but uses default
- * compression level (#SVN_DEFAULT_COMPRESSION_LEVEL) for network
+ * compression level (#SVN_DELTA_COMPRESSION_LEVEL_DEFAULT) for network
  * transmissions.
  * 
  * @deprecated Provided for backward compatibility with the 1.6 API.

Modified: subversion/trunk/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/svndiff.c?rev=1135986&r1=1135985&r2=1135986&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/trunk/subversion/libsvn_delta/svndiff.c Wed Jun 15 10:12:21 2011
@@ -308,8 +308,8 @@ svn_txdelta_to_svndiff2(svn_txdelta_wind
                         int svndiff_version,
                         apr_pool_t *pool)
 {
-  svn_txdelta_to_svndiff3(handler, handler_baton, output,
-                          svndiff_version, SVN_DEFAULT_COMPRESSION_LEVEL, pool);
+  svn_txdelta_to_svndiff3(handler, handler_baton, output, svndiff_version,
+                          SVN_DELTA_COMPRESSION_LEVEL_DEFAULT, pool);
 }
 
 void
@@ -318,8 +318,8 @@ svn_txdelta_to_svndiff(svn_stream_t *out
                        svn_txdelta_window_handler_t *handler,
                        void **handler_baton)
 {
-  svn_txdelta_to_svndiff3(handler, handler_baton, output,
-                          0, SVN_DEFAULT_COMPRESSION_LEVEL, pool);
+  svn_txdelta_to_svndiff3(handler, handler_baton, output, 0,
+                          SVN_DELTA_COMPRESSION_LEVEL_DEFAULT, pool);
 }
 
 

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1135986&r1=1135985&r2=1135986&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Wed Jun 15 10:12:21 2011
@@ -5675,7 +5675,7 @@ rep_write_get_baton(struct rep_write_bat
                           &whb,
                           b->rep_stream,
                           diff_version,
-                          SVN_DEFAULT_COMPRESSION_LEVEL,
+                          SVN_DELTA_COMPRESSION_LEVEL_DEFAULT,
                           pool);
 
   b->delta_stream = svn_txdelta_target_push(wh, whb, source, b->pool);

Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/client.c?rev=1135986&r1=1135985&r2=1135986&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/client.c Wed Jun 15 10:12:21 2011
@@ -455,7 +455,7 @@ static void handle_child_process_error(a
     return;
 
   conn = svn_ra_svn_create_conn2(NULL, in_file, out_file,
-                                 SVN_DEFAULT_COMPRESSION_LEVEL, pool);
+                                 SVN_DELTA_COMPRESSION_LEVEL_DEFAULT, pool);
   err = svn_error_wrap_apr(status, _("Error in child process: %s"), desc);
   svn_error_clear(svn_ra_svn_write_cmd_failure(conn, pool, err));
   svn_error_clear(err);
@@ -523,7 +523,7 @@ static svn_error_t *make_tunnel(const ch
 
   /* Guard against dotfile output to stdout on the server. */
   *conn = svn_ra_svn_create_conn2(NULL, proc->out, proc->in,
-                                  SVN_DEFAULT_COMPRESSION_LEVEL, pool);
+                                  SVN_DELTA_COMPRESSION_LEVEL_DEFAULT, pool);
   err = svn_ra_svn_skip_leading_garbage(*conn, pool);
   if (err)
     return svn_error_quick_wrap(
@@ -593,7 +593,8 @@ static svn_error_t *open_session(svn_ra_
     {
       SVN_ERR(make_connection(uri->hostname, uri->port, &sock, pool));
       conn = svn_ra_svn_create_conn2(sock, NULL, NULL,
-                                     SVN_DEFAULT_COMPRESSION_LEVEL, pool);
+                                     SVN_DELTA_COMPRESSION_LEVEL_DEFAULT,
+                                     pool);
     }
 
   /* Make sure we set conn->session before reading from it,

Modified: subversion/trunk/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/marshal.c?rev=1135986&r1=1135985&r2=1135986&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/marshal.c Wed Jun 15 10:12:21 2011
@@ -102,7 +102,7 @@ svn_ra_svn_conn_t *svn_ra_svn_create_con
                                           apr_pool_t *pool)
 {
   return svn_ra_svn_create_conn2(sock, in_file, out_file, 
-                                 SVN_DEFAULT_COMPRESSION_LEVEL, pool);
+                                 SVN_DELTA_COMPRESSION_LEVEL_DEFAULT, pool);
 }
 
 svn_error_t *svn_ra_svn_set_capabilities(svn_ra_svn_conn_t *conn,

Modified: subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c?rev=1135986&r1=1135985&r2=1135986&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c Wed Jun 15 10:12:21 2011
@@ -105,7 +105,7 @@ static authz_svn__subreq_bypass_func_t p
 
 /* The compression level we will pass to svn_txdelta_to_svndiff3()
  * for wire-compression */
-static int svn__compression_level = SVN_DEFAULT_COMPRESSION_LEVEL;
+static int svn__compression_level = SVN_DELTA_COMPRESSION_LEVEL_DEFAULT;
 
 static int
 init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
@@ -485,13 +485,14 @@ SVNCompressionLevel_cmd(cmd_parms *cmd, 
       return "Invalid decimal number for the SVN compression level.";
     }
 
-  if ((value < SVN_NO_COMPRESSION_LEVEL) || (value > SVN_MAX_COMPRESSION_LEVEL))
+  if ((value < SVN_DELTA_COMPRESSION_LEVEL_NONE)
+      || (value > SVN_DELTA_COMPRESSION_LEVEL_MAX))
     return apr_psprintf(cmd->pool,
                         "%d is not a valid compression level. "
                         "The valid range is %d .. %d.",
                         value,
-                        (int)SVN_NO_COMPRESSION_LEVEL,
-                        (int)SVN_MAX_COMPRESSION_LEVEL);
+                        (int)SVN_DELTA_COMPRESSION_LEVEL_NONE,
+                        (int)SVN_DELTA_COMPRESSION_LEVEL_MAX);
 
   svn__compression_level = value;
 

Modified: subversion/trunk/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/dump_editor.c?rev=1135986&r1=1135985&r2=1135986&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/dump_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/dump_editor.c Wed Jun 15 10:12:21 2011
@@ -723,8 +723,8 @@ apply_textdelta(void *file_baton, const 
 
   /* Prepare to write the delta to the delta_filestream */
   svn_txdelta_to_svndiff3(&(hb->apply_handler), &(hb->apply_baton),
-                          delta_filestream, 0, SVN_DEFAULT_COMPRESSION_LEVEL,
-                          pool);
+                          delta_filestream, 0,
+                          SVN_DELTA_COMPRESSION_LEVEL_DEFAULT, pool);
 
   eb->dump_text = TRUE;
   eb->base_checksum = apr_pstrdup(eb->pool, base_checksum);

Modified: subversion/trunk/subversion/svnserve/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/main.c?rev=1135986&r1=1135985&r2=1135986&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/main.c (original)
+++ subversion/trunk/subversion/svnserve/main.c Wed Jun 15 10:12:21 2011
@@ -469,7 +469,7 @@ int main(int argc, const char *argv[])
   params.cfg = NULL;
   params.pwdb = NULL;
   params.authzdb = NULL;
-  params.compression_level = SVN_DEFAULT_COMPRESSION_LEVEL;
+  params.compression_level = SVN_DELTA_COMPRESSION_LEVEL_DEFAULT;
   params.log_file = NULL;
   params.username_case = CASE_ASIS;
   params.memory_cache_size = (apr_uint64_t)-1;
@@ -589,10 +589,10 @@ int main(int argc, const char *argv[])
 
         case 'c':
           params.compression_level = atoi(arg);
-          if (params.compression_level < SVN_NO_COMPRESSION_LEVEL)
-            params.compression_level = SVN_NO_COMPRESSION_LEVEL;
-          if (params.compression_level > SVN_MAX_COMPRESSION_LEVEL)
-            params.compression_level = SVN_MAX_COMPRESSION_LEVEL;
+          if (params.compression_level < SVN_DELTA_COMPRESSION_LEVEL_NONE)
+            params.compression_level = SVN_DELTA_COMPRESSION_LEVEL_NONE;
+          if (params.compression_level > SVN_DELTA_COMPRESSION_LEVEL_MAX)
+            params.compression_level = SVN_DELTA_COMPRESSION_LEVEL_MAX;
           break;
 
         case 'M':

Modified: subversion/trunk/subversion/svnserve/server.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/server.h?rev=1135986&r1=1135985&r2=1135986&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/server.h (original)
+++ subversion/trunk/subversion/svnserve/server.h Wed Jun 15 10:12:21 2011
@@ -122,7 +122,7 @@ typedef struct serve_params_t {
   /* Data compression level to reduce for network traffic. If this
      is 0, no compression should be applied and the protocol may
      fall back to svndiff "version 0" bypassing zlib entirely.
-     Defaults to SVN_DEFAULT_COMPRESSION_LEVEL. */
+     Defaults to SVN_DELTA_COMPRESSION_LEVEL_DEFAULT. */
   int compression_level;
 
 } serve_params_t;



Mime
View raw message