You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/02/18 22:40:23 UTC

svn commit: r1447511 - /subversion/trunk/subversion/svn/svn.c

Author: rhuijben
Date: Mon Feb 18 21:40:23 2013
New Revision: 1447511

URL: http://svn.apache.org/r1447511
Log:
* subversion/svn/svn.c
  (sub_main): Don't take an exclusive lock by default on Windows. TortoiseSVN
    appears to be our most used client, and would be unable to share working
    copies with 'svn' because of this default, as would other popular Windows
    clients. I can't speak for other platforms, but on Windows the average
    user uses more than 'svn' and as such likes clients to work together like
    they used to during Subversion 1.X instead of blocking each other.

    Without this optimization 1.8 is faster on Windows than 1.7 was and 1.7
    already was much faster than older versions.

    Also make it easier for other distributions to opt-out of this behavior
    change by using a specific define.

Modified:
    subversion/trunk/subversion/svn/svn.c

Modified: subversion/trunk/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/svn.c?rev=1447511&r1=1447510&r2=1447511&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/svn.c (original)
+++ subversion/trunk/subversion/svn/svn.c Mon Feb 18 21:40:23 2013
@@ -1691,7 +1691,6 @@ sub_main(int argc, const char *argv[], a
   svn_boolean_t force_interactive = FALSE;
   svn_boolean_t use_notifier = TRUE;
   apr_hash_t *changelists;
-  const char *sqlite_exclusive;
   apr_hash_t *cfg_hash;
 
   received_opts = apr_array_make(pool, SVN_OPT_MAX_OPTIONS, sizeof(int));
@@ -2526,10 +2525,14 @@ sub_main(int argc, const char *argv[], a
                                             "svn: ", "--config-option"));
     }
 
-  svn_config_get(cfg_config, &sqlite_exclusive,
-                 SVN_CONFIG_SECTION_WORKING_COPY,
-                 SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE,
-                 NULL);
+#if !defined(SVN_CL_NO_DEFAULT_EXCLUSIVE_LOCK) && !defined(WIN32)
+  {
+    const char *sqlite_exclusive;
+
+    svn_config_get(cfg_config, &sqlite_exclusive,
+                   SVN_CONFIG_SECTION_WORKING_COPY,
+                   SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE,
+                   NULL);
   /* #########################################################################
      This blocks every other application from accessing our wc.db at the same
      time as this process. So instead of using the working copy lock functions
@@ -2541,11 +2544,13 @@ sub_main(int argc, const char *argv[], a
          first. This behavior should be opt-in, not opt-out until 2.0.
      #########################################################################
    */
-  if (!sqlite_exclusive)
-    svn_config_set(cfg_config,
-                   SVN_CONFIG_SECTION_WORKING_COPY,
-                   SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE,
-                   "true");
+    if (!sqlite_exclusive)
+      svn_config_set(cfg_config,
+                     SVN_CONFIG_SECTION_WORKING_COPY,
+                     SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE,
+                     "true");
+  }
+#endif
 
   /* Create a client context object. */
   command_baton.opt_state = &opt_state;