[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Don't create lock directory in repos if not needed

From: Mathias Weinert <mathias.weinert_at_gfa-net.de>
Date: 2006-09-11 14:12:27 CEST


while updating my repository (FSFS) to 1.4.0 I noticed that the content
of the two files in the lock directory changed, now saying:
  This file is not used by Subversion 1.3.x or later.
  However, its existence is required for compatibility with
  Subversion 1.2.x or earlier.

As a repository created with version 1.4.0 (or later) without using the
option --pre-1.4-compatible isn't accessible by any older Subversion
version (on the server side) I think that in this case these files don't
have to be created at all.

Please find attached a patch that tries to solve this 'problem' (I am
not sure if this already is the whole story).



Don't create lock directory while creating a repository if it's
an FSFS repository of format 5 or newer (i. e. 1.4.0 or newer
without option --pre-1.4-compatible set).

* subversion/libsvn_repos/repos.c
  Don't create lock directory if it's an FSFS repository of format 5
  or newer.


--- subversion/libsvn_repos/repos.c.orig 2006-08-23 15:37:25.000000000 +0200
+++ subversion/libsvn_repos/repos.c 2006-09-11 12:47:55.221245300 +0200
@@ -1563,8 +1563,9 @@
   SVN_ERR_W(create_repos_dir(repos->dav_path, pool),
             _("Creating DAV sandbox dir"));

- /* Create the lock directory. */
- SVN_ERR(create_locks(repos, pool));
+ /* Create the lock directory if neccessary. */
+ if (strcmp(repos->fs_type, SVN_FS_TYPE_BDB) == 0 || repos->format < 5)
+ SVN_ERR(create_locks(repos, pool));

   /* Create the hooks directory. */
   SVN_ERR(create_hooks(repos, pool));

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Sep 11 14:13:03 2006

This is an archived mail posted to the Subversion Dev mailing list.