svn commit: r1158010 - /subversion/branches/fs-py/subversion/python/svn/fs/__init__.py
Author: hwright Date: Mon Aug 15 21:06:35 2011 New Revision: 1158010 URL: http://svn.apache.org/viewvc?rev=1158010&view=rev Log: On the fs-py branch: Fix a failing test. We need to be bug-for-bug compatible with FSFS! (at least initially.) * subversion/python/svn/fs/__init__.py (FS._get_youngest): If we can't parse the current value, just return 0. Modified: subversion/branches/fs-py/subversion/python/svn/fs/__init__.py Modified: subversion/branches/fs-py/subversion/python/svn/fs/__init__.py URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/python/svn/fs/__init__.py?rev=1158010&r1=1158009&r2=1158010&view=diff == --- subversion/branches/fs-py/subversion/python/svn/fs/__init__.py (original) +++ subversion/branches/fs-py/subversion/python/svn/fs/__init__.py Mon Aug 15 21:06:35 2011 @@ -176,7 +176,12 @@ class FS(object): return f.readline().split() def _get_youngest(self): -return int(self.__read_current()[0]) +try: +return int(self.__read_current()[0]) +except: +### This is a little bug-for-bug compat. See svnadmin tests 13 +### about how atol() converts 'fish' to '0'. +return 0 def youngest_rev(self): self._youngest_rev_cache = self._get_youngest()
svn commit: r1158004 - /subversion/branches/fs-py/subversion/libsvn_fs_py/rep-cache.c
Author: hwright Date: Mon Aug 15 20:45:18 2011 New Revision: 1158004 URL: http://svn.apache.org/viewvc?rev=1158004&view=rev Log: On the fs-py branch: * subversion/libsvn_fs_py/rep-cache.c (svn_fs_py__walk_rep_reference): Declare variables first! Modified: subversion/branches/fs-py/subversion/libsvn_fs_py/rep-cache.c Modified: subversion/branches/fs-py/subversion/libsvn_fs_py/rep-cache.c URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_fs_py/rep-cache.c?rev=1158004&r1=1158003&r2=1158004&view=diff == --- subversion/branches/fs-py/subversion/libsvn_fs_py/rep-cache.c (original) +++ subversion/branches/fs-py/subversion/libsvn_fs_py/rep-cache.c Mon Aug 15 20:45:18 2011 @@ -154,12 +154,11 @@ svn_fs_py__walk_rep_reference(svn_fs_t * svn_sqlite__stmt_t *stmt; svn_boolean_t have_row; int iterations = 0; + apr_pool_t *iterpool = svn_pool_create(pool); int format; SVN_ERR(svn_fs_py__get_int_attr(&format, ffd->p_fs, "format")); - apr_pool_t *iterpool = svn_pool_create(pool); - /* Don't check ffd->rep_sharing_allowed. */ SVN_ERR_ASSERT(format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT);
svn commit: r1158003 - in /subversion/branches/fs-py/subversion: libsvn_fs_py/rep-cache.c python/svn/fs/__init__.py
Author: hwright Date: Mon Aug 15 20:42:51 2011 New Revision: 1158003 URL: http://svn.apache.org/viewvc?rev=1158003&view=rev Log: On the fs-py branch: Fix an attempt to reference an instance-private variable which was hid due to Python name-mangling. * subversion/python/svn/fs/__init__.py (FS.youngest_rev, FS._ensure_revision_exists, FS._create_fs, FS._open_fs): Update references to self._youngest_rev_cache. * subversion/libsvn_fs_py/rep-cache.c (rep_hash_been_born): Update reference when fetch the youngest_rev_cache value. Modified: subversion/branches/fs-py/subversion/libsvn_fs_py/rep-cache.c subversion/branches/fs-py/subversion/python/svn/fs/__init__.py Modified: subversion/branches/fs-py/subversion/libsvn_fs_py/rep-cache.c URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_fs_py/rep-cache.c?rev=1158003&r1=1158002&r2=1158003&view=diff == --- subversion/branches/fs-py/subversion/libsvn_fs_py/rep-cache.c (original) +++ subversion/branches/fs-py/subversion/libsvn_fs_py/rep-cache.c Mon Aug 15 20:42:51 2011 @@ -63,7 +63,7 @@ rep_has_been_born(representation_t *rep, SVN_ERR_ASSERT(rep); SVN_ERR(svn_fs_py__get_int_attr(&youngest, ffd->p_fs, - "__youngest_rev_cache")); + "_youngest_rev_cache")); if (youngest < rep->revision) { /* Stale cache. */ Modified: subversion/branches/fs-py/subversion/python/svn/fs/__init__.py URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/python/svn/fs/__init__.py?rev=1158003&r1=1158002&r2=1158003&view=diff == --- subversion/branches/fs-py/subversion/python/svn/fs/__init__.py (original) +++ subversion/branches/fs-py/subversion/python/svn/fs/__init__.py Mon Aug 15 20:42:51 2011 @@ -179,8 +179,8 @@ class FS(object): return int(self.__read_current()[0]) def youngest_rev(self): -self.__youngest_rev_cache = self._get_youngest() -return self.__youngest_rev_cache +self._youngest_rev_cache = self._get_youngest() +return self._youngest_rev_cache def set_uuid(self, uuid_in = None): '''Set the UUID for the filesystem. If UUID_IN is not given, generate @@ -220,12 +220,12 @@ class FS(object): "Invalid revision number '%ld'" % rev) # Did the revision exist the last time we checked the current file? -if rev <= self.__youngest_rev_cache: +if rev <= self._youngest_rev_cache: return # Check again -self.__youngest_rev_cache = self._get_youngest() -if rev <= self.__youngest_rev_cache: +self._youngest_rev_cache = self._get_youngest() +if rev <= self._youngest_rev_cache: return raise svn.SubversionException(svn.err.FS_NO_SUCH_REVISION, @@ -293,7 +293,7 @@ class FS(object): def _create_fs(self, config): 'Create a new Subversion filesystem' -self.__youngest_rev_cache = 0 +self._youngest_rev_cache = 0 self.__min_unpacked_rev = 0 # See if compatibility with older versions was explicitly requested. @@ -369,7 +369,7 @@ class FS(object): if self.format >= MIN_PACKED_FORMAT: self.__update_min_unpacked_rev() -self.__youngest_rev_cache = self._get_youngest() +self._youngest_rev_cache = self._get_youngest() def __setup_paths(self):
svn commit: r1157991 - in /subversion/branches/fs-py/subversion/python/svn: fs.py fs/ fs/__init__.py
Author: hwright Date: Mon Aug 15 20:30:32 2011 New Revision: 1157991 URL: http://svn.apache.org/viewvc?rev=1157991&view=rev Log: On the fs-py branch: Move the svn.fs module into a proper subdirectory. * subversion/python/svn/fs.py: Move from here... * subversion/python/svn/fs/__init__.py: ...to here. Added: subversion/branches/fs-py/subversion/python/svn/fs/ (with props) subversion/branches/fs-py/subversion/python/svn/fs/__init__.py - copied unchanged from r1157972, subversion/branches/fs-py/subversion/python/svn/fs.py Removed: subversion/branches/fs-py/subversion/python/svn/fs.py Propchange: subversion/branches/fs-py/subversion/python/svn/fs/ -- --- svn:ignore (added) +++ svn:ignore Mon Aug 15 20:30:32 2011 @@ -0,0 +1 @@ +*.pyc
svn commit: r1157972 - in /subversion/branches/fs-py/subversion: libsvn_fs_py/fs_fs.c python/svn/fs.py
Author: hwright Date: Mon Aug 15 20:03:41 2011 New Revision: 1157972 URL: http://svn.apache.org/viewvc?rev=1157972&view=rev Log: On the fs-py branch: Implement the write_format() function in Python, thereby allowing the entire "create a filesystem" functionality to live all in Python. * subversion/python/svn/fs.py (_write_format): New. (FS._create_fs): Write the format file upon creation. * subversion/libsvn_fs_py/fs_fs.c (svn_fs_py__create): Remove any remaining C, just let the Python method do the work! Modified: subversion/branches/fs-py/subversion/libsvn_fs_py/fs_fs.c subversion/branches/fs-py/subversion/python/svn/fs.py Modified: subversion/branches/fs-py/subversion/libsvn_fs_py/fs_fs.c URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_fs_py/fs_fs.c?rev=1157972&r1=1157971&r2=1157972&view=diff == --- subversion/branches/fs-py/subversion/libsvn_fs_py/fs_fs.c (original) +++ subversion/branches/fs-py/subversion/libsvn_fs_py/fs_fs.c Mon Aug 15 20:03:41 2011 @@ -6271,8 +6271,6 @@ svn_fs_py__create(svn_fs_t *fs, apr_pool_t *pool) { fs_fs_data_t *ffd = fs->fsap_data; - int max_files_per_dir; - int format; fs->path = apr_pstrdup(pool, path); @@ -6282,14 +6280,6 @@ svn_fs_py__create(svn_fs_t *fs, apr_pool_cleanup_register(fs->pool, ffd->p_fs, svn_fs_py__destroy_py_object, apr_pool_cleanup_null); - SVN_ERR(svn_fs_py__get_int_attr(&format, ffd->p_fs, "format")); - SVN_ERR(svn_fs_py__get_int_attr(&max_files_per_dir, ffd->p_fs, - "max_files_per_dir")); - - /* This filesystem is ready. Stamp it with a format number. */ - SVN_ERR(write_format(path_format(fs, pool), - format, max_files_per_dir, FALSE, pool)); - return SVN_NO_ERROR; } Modified: subversion/branches/fs-py/subversion/python/svn/fs.py URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/python/svn/fs.py?rev=1157972&r1=1157971&r2=1157972&view=diff == --- subversion/branches/fs-py/subversion/python/svn/fs.py (original) +++ subversion/branches/fs-py/subversion/python/svn/fs.py Mon Aug 15 20:03:41 2011 @@ -113,6 +113,31 @@ _DEFAULT_CONFIG_CONTENTS = \ CONFIG_OPTION_ENABLE_REP_SHARING) +def _write_format(path, format, max_files_per_dir, overwrite=True): +assert 1 <= format and format <= FORMAT_NUMBER + +if format >= MIN_LAYOUT_FORMAT_OPTION_FORMAT: +if max_files_per_dir: +contents = "%d\nlayout sharded %d\n" % (format, max_files_per_dir) +else: +contents = "%d\nlayout linear\n" % (format, max_files_per_dir) +else: +format = "%d\n" % format + +if not overwrite: +with open(path, 'wb') as f: +f.write(contents) +else: +tempf = tempfile.NamedTemporaryFile(dir=os.path.dirname(path), +delete=False) +tempf.write(contents) +tempf.close() +os.rename(tempf.name, path) + +# And set the perms to make it read only +os.chmod(path, stat.S_IREAD) + + class FS(object): def __path_rev_shard(self, rev): assert self.max_files_per_dir @@ -330,6 +355,10 @@ class FS(object): with open(self.__path_txn_current_lock, 'wb') as f: f.write('') +# This filesystem is ready. Stamp it with a format number. +_write_format(self.__path_format, self.format, self.max_files_per_dir, + False) + def _open_fs(self): 'Open an existing Subvesion filesystem'
svn commit: r1157971 - /subversion/site/publish/docs/release-notes/1.7.html
Author: cmpilato Date: Mon Aug 15 19:55:05 2011 New Revision: 1157971 URL: http://svn.apache.org/viewvc?rev=1157971&view=rev Log: * site/publish/docs/release-notes/1.7.html Complete an incomplete sentence. Modified: subversion/site/publish/docs/release-notes/1.7.html Modified: subversion/site/publish/docs/release-notes/1.7.html URL: http://svn.apache.org/viewvc/subversion/site/publish/docs/release-notes/1.7.html?rev=1157971&r1=1157970&r2=1157971&view=diff == --- subversion/site/publish/docs/release-notes/1.7.html (original) +++ subversion/site/publish/docs/release-notes/1.7.html Mon Aug 15 19:55:05 2011 @@ -492,9 +492,10 @@ practical to simply checkout a new worki Over the years, many people have complained about the performance issues with Subversion's use of HTTP as a repository access mechanism. This largely stems from the developers' original intent to implement as much of the WebDAV -http://www.webdav.org/deltav/";>DeltaV specification. Alas, this -specification was not widely implemented, so none of the supposed benefits of -the DeltaV overhead ever materialized. +http://www.webdav.org/deltav/";>DeltaV specification as +possible. Alas, this specification was not widely implemented, so +none of the supposed benefits of the DeltaV overhead ever +materialized. Subversion 1.7 offers a simpler HTTP protocol variant that can be used when connecting to supported servers. This simpler protocol (sometimes referred to
svn commit: r1157959 - /subversion/branches/fs-py/subversion/python/svn/fs.py
Author: hwright Date: Mon Aug 15 19:31:28 2011 New Revision: 1157959 URL: http://svn.apache.org/viewvc?rev=1157959&view=rev Log: On the fs-py branch: * subversion/python/svn/fs.py (FS._set_revision_proplist): Use a higher-level file object for a temporary file operation. Modified: subversion/branches/fs-py/subversion/python/svn/fs.py Modified: subversion/branches/fs-py/subversion/python/svn/fs.py URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/python/svn/fs.py?rev=1157959&r1=1157958&r2=1157959&view=diff == --- subversion/branches/fs-py/subversion/python/svn/fs.py (original) +++ subversion/branches/fs-py/subversion/python/svn/fs.py Mon Aug 15 19:31:28 2011 @@ -210,12 +210,13 @@ class FS(object): self._ensure_revision_exists(rev) final_path = self.__path_revprops(rev) -(fd, fn) = tempfile.mkstemp(dir=os.path.dirname(final_path)) -os.write(fd, svn.hash.encode(props, svn.hash.TERMINATOR)) -os.close(fd) -shutil.copystat(self.__path_rev_absolute(rev), fn) +tempf = tempfile.NamedTemporaryFile(dir=os.path.dirname(final_path), +delete=False) +with tempf: +tempf.write(svn.hash.encode(props, svn.hash.TERMINATOR)) -os.rename(fn, final_path) +shutil.copystat(self.__path_rev_absolute(rev), tempf.name) +os.rename(tempf.name, final_path) def __read_format(self):
svn commit: r1157953 - /subversion/branches/fs-py/subversion/libsvn_fs_py/py_util.c
Author: hwright Date: Mon Aug 15 19:09:35 2011 New Revision: 1157953 URL: http://svn.apache.org/viewvc?rev=1157953&view=rev Log: On the fs-py branch: Simplify our initialization and cleanup a bit by removing the call to Py_Finalize(). * subversion/libsvn_fs_py/py_util.c (p_root_module): Remove. (finalize_python): Remove. (svn_fs_py__init_python): Don't register a cleanup function, or attempt to load the too python module. Modified: subversion/branches/fs-py/subversion/libsvn_fs_py/py_util.c Modified: subversion/branches/fs-py/subversion/libsvn_fs_py/py_util.c URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_fs_py/py_util.c?rev=1157953&r1=1157952&r2=1157953&view=diff == --- subversion/branches/fs-py/subversion/libsvn_fs_py/py_util.c (original) +++ subversion/branches/fs-py/subversion/libsvn_fs_py/py_util.c Mon Aug 15 19:09:35 2011 @@ -32,8 +32,6 @@ #define ROOT_MODULE_NAME "svn" #define FS_MODULE_NAME "svn.fs" -static PyObject *p_root_module; - static svn_error_t * create_py_stack(PyObject *p_exception, PyObject *p_traceback) @@ -210,18 +208,6 @@ load_error: } } -static apr_status_t -finalize_python(void *data) -{ - Py_XDECREF(p_root_module); - p_root_module = NULL; - - /* Cleanup the python interpreter. */ - Py_Finalize(); - - return APR_SUCCESS; -} - svn_error_t * svn_fs_py__init_python(apr_pool_t *pool) { @@ -230,17 +216,12 @@ svn_fs_py__init_python(apr_pool_t *pool) Py_SetProgramName((char *) "svn"); Py_InitializeEx(0); - apr_pool_cleanup_register(pool, NULL, finalize_python, -apr_pool_cleanup_null); - SVN_ERR(load_module(&p_root_module, ROOT_MODULE_NAME)); - - if (PyErr_Occurred()) -{ - PyErr_Clear(); - return svn_error_create(SVN_ERR_FS_GENERAL, NULL, - _("Cannot load Python module")); -} + /* Note: we don't have a matching call to Py_Finalize() because we don't + know if we initialize python, or if we are in an environment where + finalizing Python would interact with interpreters which are didn't + create. The interpreter state isn't very large (1-2MB), so we essentially + just leak it. */ return SVN_NO_ERROR; }
svn commit: r1157941 - /subversion/site/publish/docs/release-notes/1.7.html
Author: cmpilato Date: Mon Aug 15 18:43:08 2011 New Revision: 1157941 URL: http://svn.apache.org/viewvc?rev=1157941&view=rev Log: * site/publish/docs/release-notes/1.7.html (#multi-update): Update header lines now end with ':', not '...'. Modified: subversion/site/publish/docs/release-notes/1.7.html Modified: subversion/site/publish/docs/release-notes/1.7.html URL: http://svn.apache.org/viewvc/subversion/site/publish/docs/release-notes/1.7.html?rev=1157941&r1=1157940&r2=1157941&view=diff == --- subversion/site/publish/docs/release-notes/1.7.html (original) +++ subversion/site/publish/docs/release-notes/1.7.html Mon Aug 15 18:43:08 2011 @@ -218,9 +218,9 @@ when updating multiple working copies at $ svn up subversion svncorp UNVERSIONED - Updating 'subversion'... + Updating 'subversion': At revision 1037740. - Updating 'svncorp'... + Updating 'svncorp': At revision 288. Skipped 'UNVERSIONED' Summary of updates:
svn commit: r1157926 - in /subversion/branches/fs-py/subversion: libsvn_fs_py/fs_fs.c python/svn/fs.py
Author: hwright Date: Mon Aug 15 17:51:40 2011 New Revision: 1157926 URL: http://svn.apache.org/viewvc?rev=1157926&view=rev Log: On the fs-py branch: When creating a filesystem, write and read the config file. Keep this config separate from the config passed to create an FS. (Bonus: we can use Python libraries to do the config reading.) * subversion/python/svn/fs.py (): Some more new constants. (FS._read_config): New. (FS._create_fs): Require a config param, rather than using the instance config. Also, read and write the FSFS config file. (FS.__setup_paths): A couple new paths. (FS.__init__): Pass the provided config to the create method. * subversion/libsvn_fs_py/fs_fs.c (svn_fs_py__create): Don't read the config or create a few txn files. Modified: subversion/branches/fs-py/subversion/libsvn_fs_py/fs_fs.c subversion/branches/fs-py/subversion/python/svn/fs.py Modified: subversion/branches/fs-py/subversion/libsvn_fs_py/fs_fs.c URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_fs_py/fs_fs.c?rev=1157926&r1=1157925&r2=1157926&view=diff == --- subversion/branches/fs-py/subversion/libsvn_fs_py/fs_fs.c (original) +++ subversion/branches/fs-py/subversion/libsvn_fs_py/fs_fs.c Mon Aug 15 17:51:40 2011 @@ -6286,18 +6286,6 @@ svn_fs_py__create(svn_fs_t *fs, SVN_ERR(svn_fs_py__get_int_attr(&max_files_per_dir, ffd->p_fs, "max_files_per_dir")); - SVN_ERR(read_config(fs, pool)); - - /* Create the txn-current file if the repository supports - the transaction sequence file. */ - if (format >= SVN_FS_FS__MIN_TXN_CURRENT_FORMAT) -{ - SVN_ERR(svn_io_file_create(path_txn_current(fs, pool), - "0\n", pool)); - SVN_ERR(svn_io_file_create(path_txn_current_lock(fs, pool), - "", pool)); -} - /* This filesystem is ready. Stamp it with a format number. */ SVN_ERR(write_format(path_format(fs, pool), format, max_files_per_dir, FALSE, pool)); Modified: subversion/branches/fs-py/subversion/python/svn/fs.py URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/python/svn/fs.py?rev=1157926&r1=1157925&r2=1157926&view=diff == --- subversion/branches/fs-py/subversion/python/svn/fs.py (original) +++ subversion/branches/fs-py/subversion/python/svn/fs.py Mon Aug 15 17:51:40 2011 @@ -19,6 +19,7 @@ # under the License. import os, uuid, stat, shutil, tempfile, datetime +import ConfigParser import svn import svn.hash @@ -39,16 +40,20 @@ PATH_REVS_DIR = "revs" PATH_REVPROPS_DIR = "revprops"# Directory of revprops PATH_TXNS_DIR = "transactions"# Directory of transactions PATH_TXN_PROTOS_DIR = "txn-protorevs" # Directory of proto-revs +PATH_TXN_CURRENT= "txn-current" # File with next txn key */ +PATH_TXN_CURRENT_LOCK = "txn-current-lock" # Lock for txn-current */ PATH_MIN_UNPACKED_REV = "min-unpacked-rev" # Oldest revision which # has not been packed. PATH_CONFIG = "fsfs.conf" # Configuration FORMAT_NUMBER = 4 +MIN_TXN_CURRENT_FORMAT = 3 MIN_LAYOUT_FORMAT_OPTION_FORMAT = 3 MIN_PROTOREVS_DIR_FORMAT= 3 MIN_NO_GLOBAL_IDS_FORMAT= 3 MIN_PACKED_FORMAT = 4 +MIN_REP_SHARING_FORMAT = 4 _DEFAULT_MAX_FILES_PER_DIR = 1000 _TIMESTAMP_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ' @@ -59,6 +64,10 @@ CONFIG_OPTION_FAIL_STOP = "f CONFIG_SECTION_REP_SHARING = "rep-sharing" CONFIG_OPTION_ENABLE_REP_SHARING= "enable-rep-sharing" +_CONFIG_DEFAULTS = { + CONFIG_OPTION_ENABLE_REP_SHARING : 'True', + } + _DEFAULT_CONFIG_CONTENTS = \ '''### This file controls the configuration of the FSFS filesystem. @@ -168,6 +177,18 @@ class FS(object): with open(self.__path_config, 'w') as f: f.write(_DEFAULT_CONFIG_CONTENTS) +def _read_config(self): +self._config = ConfigParser.RawConfigParser(_CONFIG_DEFAULTS) +self._config.read(self.__path_config) + +if format >= MIN_REP_SHARING_FORMAT: +self._rep_sharing_allowed = self._config.getboolean( + CONFIG_SECTION_REP_SHARING, + CONFIG_OPTION_ENABLE_REP_SHARING) +else: +self._rep_sharing_allowed = False + + def _ensure_revision_exists(self, rev): if not svn.is_valid_revnum(rev): raise svn.SubversionException(svn.err.FS_NO_SUCH_REVISION, @@ -244,17 +265,17 @@ class FS(object): self._set_revision_proplist(0, props) -def _create_fs(self): +
svn commit: r1157912 - /subversion/trunk/subversion/libsvn_wc/wc-metadata.sql
Author: stsp Date: Mon Aug 15 17:05:50 2011 New Revision: 1157912 URL: http://svn.apache.org/viewvc?rev=1157912&view=rev Log: Follow-up to r1157911: * subversion/libsvn_wc/wc-metadata.sql: Fix typo in comment. Modified: subversion/trunk/subversion/libsvn_wc/wc-metadata.sql Modified: subversion/trunk/subversion/libsvn_wc/wc-metadata.sql URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-metadata.sql?rev=1157912&r1=1157911&r2=1157912&view=diff == --- subversion/trunk/subversion/libsvn_wc/wc-metadata.sql (original) +++ subversion/trunk/subversion/libsvn_wc/wc-metadata.sql Mon Aug 15 17:05:50 2011 @@ -316,7 +316,7 @@ CREATE TABLE NODES ( BASE node, the location of the initial checkout. When op_depth != 0, they indicate where this node was copied/moved from. - In this case, the fields set the root of the operation and for all + In this case, the fields are set for the root of the operation and for all children. */ repos_id INTEGER REFERENCES REPOSITORY (id), repos_path TEXT,
svn commit: r1157911 - /subversion/trunk/subversion/libsvn_wc/wc-metadata.sql
Author: stsp Date: Mon Aug 15 17:04:15 2011 New Revision: 1157911 URL: http://svn.apache.org/viewvc?rev=1157911&view=rev Log: * subversion/libsvn_wc/wc-metadata.sql: Fix an outdated comment. Review by: gstein Modified: subversion/trunk/subversion/libsvn_wc/wc-metadata.sql Modified: subversion/trunk/subversion/libsvn_wc/wc-metadata.sql URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-metadata.sql?rev=1157911&r1=1157910&r2=1157911&view=diff == --- subversion/trunk/subversion/libsvn_wc/wc-metadata.sql (original) +++ subversion/trunk/subversion/libsvn_wc/wc-metadata.sql Mon Aug 15 17:04:15 2011 @@ -316,8 +316,8 @@ CREATE TABLE NODES ( BASE node, the location of the initial checkout. When op_depth != 0, they indicate where this node was copied/moved from. - In this case, the fields are set only on the root of the operation, - and are NULL for all children. */ + In this case, the fields set the root of the operation and for all + children. */ repos_id INTEGER REFERENCES REPOSITORY (id), repos_path TEXT, revision INTEGER,
svn commit: r1157906 - /subversion/trunk/subversion/bindings/ctypes-python/test/setup_path.py
Author: julianfoad Date: Mon Aug 15 16:45:00 2011 New Revision: 1157906 URL: http://svn.apache.org/viewvc?rev=1157906&view=rev Log: * subversion/bindings/ctypes-python/test/setup_path.py (src_swig_python_tests_dir): Rename to 'src_ctypes_python_tests_dir' because this is ctypes, not swig. Modified: subversion/trunk/subversion/bindings/ctypes-python/test/setup_path.py Modified: subversion/trunk/subversion/bindings/ctypes-python/test/setup_path.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/ctypes-python/test/setup_path.py?rev=1157906&r1=1157905&r2=1157906&view=diff == --- subversion/trunk/subversion/bindings/ctypes-python/test/setup_path.py (original) +++ subversion/trunk/subversion/bindings/ctypes-python/test/setup_path.py Mon Aug 15 16:45:00 2011 @@ -25,8 +25,8 @@ import sys import os -src_swig_python_tests_dir = os.path.dirname(os.path.dirname(__file__)) -sys.path[0:0] = [ src_swig_python_tests_dir ] +src_ctypes_python_tests_dir = os.path.dirname(os.path.dirname(__file__)) +sys.path[0:0] = [ src_ctypes_python_tests_dir ] import csvn.core csvn.core.svn_cmdline_init("", csvn.core.stderr)
Re: svn commit: r1157682 - /subversion/trunk/subversion/svn/status.c
On Mon, Aug 15, 2011 at 07:18:18AM -0500, Hyrum K Wright wrote: > Do we do this other places in our code, or does this introduce a new pattern? We do this in lots of places. > It *does* introduce new "format not a string literal, argument types > not checked" warnings at compile-time. Those warnings are normal. Of course the compiler cannot check argument types for format strings allocated at runtime. The format string is returned by gettext(). There are other ways of making sure format directives in translated strings are valid, see http://svn.haxx.se/dev/archive-2011-08/0136.shtml
svn commit: r1157828 - in /subversion/branches/fs-py/subversion/libsvn_fs_py: ./ tree.c
Author: hwright Date: Mon Aug 15 12:45:02 2011 New Revision: 1157828 URL: http://svn.apache.org/viewvc?rev=1157828&view=rev Log: On the fs-py branch: Merge changes merged to libsvn_fs_fs to libsvn_fs_py. Modified: subversion/branches/fs-py/subversion/libsvn_fs_py/ (props changed) subversion/branches/fs-py/subversion/libsvn_fs_py/tree.c Propchange: subversion/branches/fs-py/subversion/libsvn_fs_py/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Mon Aug 15 12:45:02 2011 @@ -0,0 +1,58 @@ +/subversion/branches/1.5.x-r30215/subversion/libsvn_fs_py:870312 +/subversion/branches/atomic-revprop/subversion/libsvn_fs_py:965046-1000689 +/subversion/branches/bdb-reverse-deltas/subversion/libsvn_fs_py:872050-872529 +/subversion/branches/diff-callbacks3/subversion/libsvn_fs_py:870059-870761 +/subversion/branches/diff-optimizations/subversion/libsvn_fs_py:1031270-1037352 +/subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_py:1037353-1067789 +/subversion/branches/dont-save-plaintext-passwords-by-default/subversion/libsvn_fs_py:870728-871118 +/subversion/branches/double-delete/subversion/libsvn_fs_py:870511-872970 +/subversion/branches/explore-wc/subversion/libsvn_fs_py:875486,875493,875497,875507,875511,875514,875559,875580-875581,875584,875587,875611,875627,875647,875667-875668,875711-875712,875733-875734,875736,875744-875748,875751,875758,875782,875795-875796,875830,875836,875838,875842,875852,875855,875864,875870,875873,875880,875885-875888,875890,875897-875898,875905,875907-875909,875935,875943-875944,875946,875979,875982-875983,875985-875986,875990,875997 +/subversion/branches/file-externals/subversion/libsvn_fs_py:871779-873302 +/subversion/branches/fs-py/subversion/libsvn_fs_fs:1154225-1157814 +/subversion/branches/fs-rep-sharing/subversion/libsvn_fs_py:869036-873803 +/subversion/branches/fsfs-pack/subversion/libsvn_fs_py:873717-874575 +/subversion/branches/gnome-keyring/subversion/libsvn_fs_py:870558-871410 +/subversion/branches/gpg-agent-password-store/subversion/libsvn_fs_py:1005036-1150766 +/subversion/branches/http-protocol-v2/subversion/libsvn_fs_py:874395-876041 +/subversion/branches/in-memory-cache/subversion/libsvn_fs_py:869829-871452 +/subversion/branches/integrate-cache-item-serialization/subversion/libsvn_fs_py:1068724-1068739 +/subversion/branches/integrate-cache-membuffer/subversion/libsvn_fs_py:998649-998852 +/subversion/branches/integrate-compression-level/subversion/libsvn_fs_py:1068651-1072287 +/subversion/branches/integrate-io-improvements/subversion/libsvn_fs_py:1068684-1072297 +/subversion/branches/integrate-is-cachable/subversion/libsvn_fs_py:1072568-1074082 +/subversion/branches/integrate-partial-getter/subversion/libsvn_fs_py:1072558-1076552 +/subversion/branches/integrate-readline-speedup/subversion/libsvn_fs_py:1072553-1072555 +/subversion/branches/integrate-stream-api-extensions/subversion/libsvn_fs_py:1068695-1072516 +/subversion/branches/integrate-txdelta-caching/subversion/libsvn_fs_py:1072541-1078213 +/subversion/branches/issue-2779-dev/subversion/libsvn_fs_py:965496-984198 +/subversion/branches/issue-2843-dev/subversion/libsvn_fs_py:871432-874179 +/subversion/branches/issue-3000/subversion/libsvn_fs_py:871713,871716-871719,871721-871726,871728,871734 +/subversion/branches/issue-3067-deleted-subtrees/subversion/libsvn_fs_py:873375-874084 +/subversion/branches/issue-3148-dev/subversion/libsvn_fs_py:875193-875204 +/subversion/branches/issue-3220-dev/subversion/libsvn_fs_py:872210-872226 +/subversion/branches/issue-3242-dev/subversion/libsvn_fs_py:879653-896436 +/subversion/branches/issue-3334-dirs/subversion/libsvn_fs_py:875156-875867 +/subversion/branches/issue-3668-3669/subversion/libsvn_fs_py:1031000-1035744 +/subversion/branches/kwallet/subversion/libsvn_fs_py:870785-871314 +/subversion/branches/log-g-performance/subversion/libsvn_fs_py:870941-871032 +/subversion/branches/merge-skips-obstructions/subversion/libsvn_fs_py:874525-874615 +/subversion/branches/nfc-nfd-aware-client/subversion/libsvn_fs_py:870276,870376 +/subversion/branches/performance/subversion/libsvn_fs_py:979193,980118,981087,981090,981189,981194,981287,981684,981827,982043,982355,983398,983406,983430,983474,983488,983490,983760,983764,983766,983770,984927,984973,984984,985014,985037,985046,985472,985477,985482,985487-985488,985493,985497,985500,985514,985601,985603,985606,985669,985695,986453,986465,986485,986491-986492,986517,986521,986605,986608,986817,986832,987865,987868-987869,987872,987886-987888,987893,988319,988898,990330,990533,990535-990537,990541,990568,990572,990574-990575,990600,990759,992899,992904,992911,993127,993141,994956,995478,995507,995603,998012,998858,999098,1001413,1001417,1004291,1022668,1022670,1022676,1022715,1022719,1025660,1025672,1027193,1027203,1027206,1027214,1027227,1028077,1028092,1028094,1028104,1028107,1028111,1028354,1029038,1029042-1029043,1029054-1029055,1029062-1029063,102907
svn commit: r1157811 [3/3] - in /subversion/branches/fs-py: ./ subversion/bindings/ctypes-python/csvn/ subversion/bindings/ctypes-python/test/ subversion/bindings/javahl/native/ subversion/bindings/ja
Modified: subversion/branches/fs-py/tools/dev/unix-build/Makefile.svn URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/tools/dev/unix-build/Makefile.svn?rev=1157811&r1=1157810&r2=1157811&view=diff == --- subversion/branches/fs-py/tools/dev/unix-build/Makefile.svn (original) +++ subversion/branches/fs-py/tools/dev/unix-build/Makefile.svn Mon Aug 15 12:32:42 2011 @@ -1448,12 +1448,11 @@ svn-check-swig-py: # We add the svn prefix to PATH here because the ruby tests # attempt to start an svnserve binary found in PATH. svn-check-swig-rb: - (cd $(svn_builddir)/subversion/bindings/swig/ruby/test && \ + (cd $(svn_builddir) && \ env RUBYLIB=$(RUBYLIB) \ LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \ PATH=$(SVN_PREFIX)/bin:$$PATH \ - $(PREFIX)/ruby/bin/ruby run-test.rb \ - --verbose=verbose 2>&1) | \ + make check-swig-rb 2>&1) | \ tee $(svn_builddir)/tests.log.bindings.rb svn-check-javahl: Modified: subversion/branches/fs-py/tools/dist/release.py URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/tools/dist/release.py?rev=1157811&r1=1157810&r2=1157811&view=diff == --- subversion/branches/fs-py/tools/dist/release.py (original) +++ subversion/branches/fs-py/tools/dist/release.py Mon Aug 15 12:32:42 2011 @@ -513,12 +513,42 @@ def clean_dist(args): #-- +# Move to dist + +def move_to_dist(args): +'Move candidate artifacts to the distribution directory.' + +if not args.dist_dir: +assert_people() +args.dist_dir = people_dist_dir + +if args.target: +target = args.target +else: +target = os.path.join(os.getenv('HOME'), 'public_html', 'svn', + str(args.version), 'deploy') + +if args.code_name: +dirname = args.code_name +else: +dirname = 'deploy' + +logging.info('Moving %s to dist dir \'%s\'' % (str(args.version), + args.dist_dir) ) +filenames = glob.glob(os.path.join(target, + 'subversion-%s.*' % str(args.version))) +for filename in filenames: +shutil.copy(filename, args.dist_dir) + + +#-- # Write announcements def write_news(args): 'Write text for the Subversion website.' data = { 'date' : datetime.date.today().strftime('%Y%m%d'), 'date_pres' : datetime.date.today().strftime('%Y-%m-%d'), + 'major-minor' : args.version.base[:3], 'version' : str(args.version), 'version_base' : args.version.base, } @@ -695,6 +725,24 @@ def main(): subparser.add_argument('--dist-dir', help='''The directory to clean.''') +# The move-to-dist subcommand +subparser = subparsers.add_parser('move-to-dist', +help='''Move candiates and signatures from the temporary +post location to the permanent distribution +directory. If no dist-dir is given, this command +will assume it is running on people.apache.org.''') +subparser.set_defaults(func=move_to_dist) +subparser.add_argument('version', type=Version, +help='''The release label, such as '1.7.0-alpha1'.''') +subparser.add_argument('--dist-dir', +help='''The directory to clean.''') +subparser.add_argument('--code-name', +help='''A whimsical name for the release, used only for +naming the download directory.''') +subparser.add_argument('--target', +help='''The full path to the destination used in +'post-candiates'..''') + # The write-news subcommand subparser = subparsers.add_parser('write-news', help='''Output to stdout template text for use in the news Modified: subversion/branches/fs-py/tools/dist/templates/rc-news.ezt URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/tools/dist/templates/rc-news.ezt?rev=1157811&r1=1157810&r2=1157811&view=diff == --- subversion/branches/fs-py/tools/dist/templates/rc-news.ezt (original) +++ subversion/branches/fs-py/tools/dist/templates/rc-news.ezt Mon Aug 15 12:32:42 2011 @@ -10,7 +10,7 @@ Please see the release announcement for more information about this release, and the - release notes and + release notes and http://svn.apache.org/repos/asf/subversion/tags/[version]/CHANGES";> change log for information
Re: svn commit: r1157682 - /subversion/trunk/subversion/svn/status.c
Do we do this other places in our code, or does this introduce a new pattern? It *does* introduce new "format not a string literal, argument types not checked" warnings at compile-time. -Hyrum On Sun, Aug 14, 2011 at 6:06 PM, wrote: > Author: arfrever > Date: Sun Aug 14 23:06:09 2011 > New Revision: 1157682 > > URL: http://svn.apache.org/viewvc?rev=1157682&view=rev > Log: > Follow-up to r1157537: > > * subversion/svn/status.c > (print_status): Include %s in translated messages to support languages, > in which "from" / "to" are postpositions. > > Modified: > subversion/trunk/subversion/svn/status.c > > Modified: subversion/trunk/subversion/svn/status.c > URL: > http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/status.c?rev=1157682&r1=1157681&r2=1157682&view=diff > == > --- subversion/trunk/subversion/svn/status.c (original) > +++ subversion/trunk/subversion/svn/status.c Sun Aug 14 23:06:09 2011 > @@ -268,8 +268,11 @@ print_status(const char *path, > SVN_ERR(svn_dirent_get_absolute(&cwd, "", pool)); > relpath = make_relpath(cwd, status->moved_from_abspath, pool, pool); > relpath = svn_dirent_local_style(relpath, pool); > - moved_from_line = apr_psprintf(pool, "\n > %s %s", > - _("moved from"), relpath); > + moved_from_line = apr_psprintf(pool, > + apr_psprintf(pool, > + "\n > %s", > + _("moved from %s")), > + relpath); > } > > /* Only print an extra moved-to line for the op-root of a move-away. > @@ -285,8 +288,11 @@ print_status(const char *path, > SVN_ERR(svn_dirent_get_absolute(&cwd, "", pool)); > relpath = make_relpath(cwd, status->moved_to_abspath, pool, pool); > relpath = svn_dirent_local_style(relpath, pool); > - moved_to_line = apr_psprintf(pool, "\n > %s %s", > - _("moved to"), relpath); > + moved_to_line = apr_psprintf(pool, > + apr_psprintf(pool, > + "\n > %s", > + _("moved to %s")), > + relpath); > } > > if (detailed) > > > -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
svn commit: r1157788 - /subversion/trunk/subversion/bindings/ctypes-python/test/svntypes.py
Author: julianfoad Date: Mon Aug 15 11:53:22 2011 New Revision: 1157788 URL: http://svn.apache.org/viewvc?rev=1157788&view=rev Log: In the ctypes-python bindings, add more tests for the 'SvnDate' and 'Hash' classes. * subversion/bindings/ctypes-python/test/svntypes.py (TypesTestCase): Remove, moving its two methods into the new HashTestCase and ArrayTestCase respectively. (SvnDateTestCase, HashTestCase, ArrayTestCase): New test case classes, with new tests for the 'SvnDate' and 'Hash' classes. (suite): Return a test suite containing all of the new test cases. Modified: subversion/trunk/subversion/bindings/ctypes-python/test/svntypes.py Modified: subversion/trunk/subversion/bindings/ctypes-python/test/svntypes.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/ctypes-python/test/svntypes.py?rev=1157788&r1=1157787&r2=1157788&view=diff == --- subversion/trunk/subversion/bindings/ctypes-python/test/svntypes.py (original) +++ subversion/trunk/subversion/bindings/ctypes-python/test/svntypes.py Mon Aug 15 11:53:22 2011 @@ -21,8 +21,24 @@ import setup_path import unittest from csvn.core import * import csvn.types as _types +from csvn.types import SvnDate, Hash, Array, APRFile, Stream, SvnStringPtr -class TypesTestCase(unittest.TestCase): +class SvnDateTestCase(unittest.TestCase): + +def test_as_apr_time_t(self): +d1 = SvnDate('1999-12-31T23:59:59.00Z') +d2 = SvnDate('2000-01-01T00:00:00.00Z') +t1 = d1.as_apr_time_t().value +t2 = d2.as_apr_time_t().value +self.assertEqual(t1 + 100, t2) + +def test_as_human_string(self): +d1 = SvnDate('1999-12-31T23:59:59.00Z') +s1 = d1.as_human_string() +self.assertEqual(s1[:27], '1999-12-31 23:59:59 + (') + + +class HashTestCase(unittest.TestCase): def test_hash(self): self.pydict = {"bruce":"batman", "clark":"superman", @@ -35,6 +51,34 @@ class TypesTestCase(unittest.TestCase): self.assertNotEqual(self.svnhash["clark"].value, self.pydict["bruce"]) +def test_insert_delete(self): +h = Hash(c_char_p) +h['foo'] = 'f' +h['bar'] = 'b' +self.assertEqual(len(h), 2) +self.assertEqual(h['foo'].value, 'f') +self.assertEqual(h['bar'].value, 'b') +h['bar'] = 'b' +self.assertEqual(len(h), 2) +del h['foo'] +self.assertEqual(len(h), 1) +self.assertEqual(h['bar'].value, 'b') + +def test_iter(self): +h = Hash(c_char_p, { 'foo': 'f', 'bar': 'b' }) +keys = sorted(h.keys()) +self.assertEqual(keys, ['bar', 'foo']) +vals = [] +for k in h: +vals += [ h[k].value ] +self.assertEqual(sorted(vals), ['b', 'f']) +vals = [] +for k,v in h.items(): +vals += [ v.value ] +self.assertEqual(sorted(vals), ['b', 'f']) + +class ArrayTestCase(unittest.TestCase): + def test_array(self): self.pyarray = ["vini", "vidi", "vici"] self.svnarray = _types.Array(c_char_p, self.pyarray) @@ -43,7 +87,11 @@ class TypesTestCase(unittest.TestCase): self.assertEqual(self.svnarray[1], "vidi") def suite(): -return unittest.makeSuite(TypesTestCase, 'test') +suite = unittest.TestSuite() +suite.addTest(unittest.makeSuite(SvnDateTestCase, 'test')) +suite.addTest(unittest.makeSuite(HashTestCase, 'test')) +suite.addTest(unittest.makeSuite(ArrayTestCase, 'test')) +return suite if __name__ == '__main__': runner = unittest.TextTestRunner()
svn commit: r1157754 - /subversion/trunk/subversion/include/svn_wc.h
Author: julianfoad Date: Mon Aug 15 09:57:57 2011 New Revision: 1157754 URL: http://svn.apache.org/viewvc?rev=1157754&view=rev Log: Update comments. * subversion/include/svn_wc.h (svn_wc_conflict_description2_t): Update the cross-reference to the _dup function. (svn_wc_conflict_description_t): Remove the cross-reference to the non-existent _dup function. Modified: subversion/trunk/subversion/include/svn_wc.h Modified: subversion/trunk/subversion/include/svn_wc.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1157754&r1=1157753&r2=1157754&view=diff == --- subversion/trunk/subversion/include/svn_wc.h (original) +++ subversion/trunk/subversion/include/svn_wc.h Mon Aug 15 09:57:57 2011 @@ -1755,7 +1755,7 @@ typedef struct svn_wc_conflict_descripti /** Info on the "merge-right source" or "their" version of incoming change. */ const svn_wc_conflict_version_t *src_right_version; - /* Remember to adjust svn_wc__conflict_description_dup() + /* Remember to adjust svn_wc__conflict_description2_dup() * if you add new fields to this struct. */ } svn_wc_conflict_description2_t; @@ -1849,8 +1849,6 @@ typedef struct svn_wc_conflict_descripti * @since New in 1.6. */ svn_wc_conflict_version_t *src_right_version; - /* Remember to adjust svn_wc__conflict_description_dup() - * if you add new fields to this struct. */ } svn_wc_conflict_description_t; /**