Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A991D10510 for ; Mon, 2 Dec 2013 14:52:48 +0000 (UTC) Received: (qmail 31873 invoked by uid 500); 2 Dec 2013 14:52:27 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 31846 invoked by uid 500); 2 Dec 2013 14:52:24 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 31827 invoked by uid 99); 2 Dec 2013 14:52:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Dec 2013 14:52:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Dec 2013 14:52:21 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 0097C2388993; Mon, 2 Dec 2013 14:52:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1547042 - in /subversion/branches/fsfs-ucsnorm: BRANCH-README subversion/libsvn_fs_fs/fs.h subversion/libsvn_fs_fs/fs_fs.c Date: Mon, 02 Dec 2013 14:52:00 -0000 To: commits@subversion.apache.org From: brane@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131202145201.0097C2388993@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: brane Date: Mon Dec 2 14:52:00 2013 New Revision: 1547042 URL: http://svn.apache.org/r1547042 Log: On the fsfs-ucsnorm branch: Rename the normalization option in fsfs.conf, add parsing code, and clarify semantics in BRANCH-README. * BRANCH-README: Update the documented semantics of the proposed change. * subversion/libsvn_fs_fs/fs.h (CONFIG_OPTION_NORMALIZED_LOOKUP): Renamed from CONFIG_OPTION_ENABLE_NORMALIZED_LOOKUP. (SVN_FS_FS__MIN_DEFAULT_NORMALIZED_LOOKUP_FORMAT): New. Normalization will be enabled by default in FSFSv7 and above. (fs_fs_data_t): New member 'normalized_lookup'. * subversion/libsvn_fs_fs/fs_fs.c (read_config): Parse the normalized-lookup option into the fs_fs_data_t stuct. (write_config): Update normalization doc and option name. Modified: subversion/branches/fsfs-ucsnorm/BRANCH-README subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/fs.h subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/fs_fs.c Modified: subversion/branches/fsfs-ucsnorm/BRANCH-README URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/BRANCH-README?rev=1547042&r1=1547041&r2=1547042&view=diff ============================================================================== --- subversion/branches/fsfs-ucsnorm/BRANCH-README [UTF-8] (original) +++ subversion/branches/fsfs-ucsnorm/BRANCH-README [UTF-8] Mon Dec 2 14:52:00 2013 @@ -17,23 +17,29 @@ option can be disabled or enabled at any the repository; however, it is not safe to enable it without first running: - svnadmin verify REPOS --check-ucs-normalization + svnadmin verify REPOS --check-normalization Proposed argument to 'svnadmin create': svnadmin create REPOS --disable-normalized-lookup + Without this option, normalized lookup will be enabled by + default. + Proposed argument to 'svnadmin upgrade': svnadmin upgrade REPOS --enable-normalized-lookup + Without this option, normalized lookup will be disabled during + format upgrade, unless it was already enabled in fsfs.conf. + Proposed option in fsfs.conf: [normalization] - enable-normalized-lookup = true|false + normalized-lookup = true|false - Default value: true + Default value: true (in FSFSv7; false for older formats) References Modified: subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/fs.h URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/fs.h?rev=1547042&r1=1547041&r2=1547042&view=diff ============================================================================== --- subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/fs.h (original) +++ subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/fs.h Mon Dec 2 14:52:00 2013 @@ -102,7 +102,7 @@ extern "C" { #define CONFIG_OPTION_REVPROP_PACK_SIZE "revprop-pack-size" #define CONFIG_OPTION_COMPRESS_PACKED_REVPROPS "compress-packed-revprops" #define CONFIG_SECTION_NORMALIZATION "normalization" -#define CONFIG_OPTION_ENABLE_NORMALIZED_LOOKUP "enable-normalized-lookup" +#define CONFIG_OPTION_NORMALIZED_LOOKUP "normalized-lookup" /* The format number of this filesystem. This is independent of the repository format number, and @@ -153,6 +153,9 @@ extern "C" { /* Minimum format number that will record moves */ #define SVN_FS_FS__MIN_MOVE_SUPPORT_FORMAT 7 +/* Minimum format where normalized lookup should be enabled by default. */ +#define SVN_FS_FS__MIN_DEFAULT_NORMALIZED_LOOKUP_FORMAT 7 + /* The minimum format number that supports a configuration file (fsfs.conf) */ #define SVN_FS_FS__MIN_CONFIG_FILE 4 @@ -401,6 +404,9 @@ typedef struct fs_fs_data_t * deltification history after which skip deltas will be used. */ apr_int64_t max_linear_deltification; + /* Whether normalization-insensitive path lookup is enabled. */ + svn_boolean_t normalized_lookup; + /* Pointer to svn_fs_open. */ svn_error_t *(*svn_fs_open_)(svn_fs_t **, const char *, apr_hash_t *, apr_pool_t *); Modified: subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/fs_fs.c URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/fs_fs.c?rev=1547042&r1=1547041&r2=1547042&view=diff ============================================================================== --- subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/fs_fs.c (original) +++ subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/fs_fs.c Mon Dec 2 14:52:00 2013 @@ -420,6 +420,9 @@ read_config(fs_fs_data_t *ffd, const char *fs_path, apr_pool_t *pool) { + const svn_boolean_t default_normalized_lookup = + (ffd->format >= SVN_FS_FS__MIN_DEFAULT_NORMALIZED_LOOKUP_FORMAT); + SVN_ERR(svn_config_read3(&ffd->config, svn_dirent_join(fs_path, PATH_CONFIG, pool), FALSE, FALSE, FALSE, pool)); @@ -482,6 +485,16 @@ read_config(fs_fs_data_t *ffd, ffd->compress_packed_revprops = FALSE; } + /* Initialize normalization settings in ffd. + + Note: enable-normalized-lookups does not affect the filesystem + contents; therefore, its availability does not have to be + limited to any particular FS format version. */ + SVN_ERR(svn_config_get_bool(ffd->config, &ffd->normalized_lookup, + CONFIG_SECTION_NORMALIZATION, + CONFIG_OPTION_NORMALIZED_LOOKUP, + default_normalized_lookup)); + return SVN_NO_ERROR; } @@ -634,14 +647,14 @@ write_config(svn_fs_t *fs, "### filesystem. The representation of new paths will still be preserved;" NL "### FSFS will not normalize them, and will return them from queries in the" NL "### same form in which they were created." NL -"### Normalized lookup is enabled by default for new FSFS repositories." NL -"# " CONFIG_OPTION_ENABLE_NORMALIZED_LOOKUP " = true" NL +"### Normalized lookup is enabled by default for new FSFSv7 repositories." NL +"# " CONFIG_OPTION_NORMALIZED_LOOKUP " = true" NL "###" NL "### WARNING: Before enabling this option for existing repositories, you " NL "### must verify that there are no extant name collisions by" NL "### running the following command:" NL "###" NL -"### svnadmin verify --check-ucs-normalization" NL +"### svnadmin verify --check-normalization" NL ; #undef NL return svn_io_file_create(svn_dirent_join(fs->path, PATH_CONFIG, pool),