Checkout
 

rdonch in subversion

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:

(svn_swig_py_config_enumerator2),

(svn_swig_py_config_section_enumerator2): Move the PyErr_Clear call

further in the control flow, as callback_bad_return_error will also

raise an unwanted exception.

* COMMITTERS: Mark myself as dormant.

* subversion/bindings/swig/python/tests/core.py:

(SubversionCoreTestCase.test_config_enumerate2),

(SubversionCoreTestCase.test_config_enumerate_sections2):

Use assert_ instead of assertIn, as the latter was not yet invented in

Python 2.4.

Implemented svn_config_enumerate_sections2 in the SWIG Python bindings.

[in subversion/bindings/swig]

* python/libsvn_swig_py/swigutil_py.c,

python/libsvn_swig_py/swigutil_py.h:

(svn_swig_py_config_section_enumerator2): New function.

* core.i:

Use svn_swig_py_config_section_enumerator2 in the corresponding typemap.

* python/tests/core.py:

(SubversionCoreTestCase.test_config_enumerate_sections2),

(SubversionCoreTestCase.test_config_enumerate_sections2_exception): New tests.

* subversion/bindings/swig/python/tests/core.py:

(SubversionCoreTestCase.test_config_enumerate2): Use assertIn instead of

assertTrue.

* subversion/bindings/swig/python/tests/core.py:

(SubversionCoreTestCase.test_config_enumerate2_exception): Simplify by using

svn_config_enumerate2's return value.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:

(svn_swig_py_config_enumerator2): Always clear the Python exception

to avoid leaving Python in an inconsistent exception state.

* subversion/bindings/swig/python/tests/core.py:

(SubversionCoreTestCase.test_exception_interoperability): Fix a typo that

made the test pass for the wrong reasons.

Implemented svn_config_enumerate2 in the SWIG Python bindings.

[in subversion/bindings/swig]

* python/libsvn_swig_py/swigutil_py.c,

python/libsvn_swig_py/swigutil_py.h:

(svn_swig_py_config_enumerator2): New function.

* core.i:

Use svn_swig_py_config_enumerator2 in the corresponding typemap.

* python/tests/core.py:

(SubversionCoreTestCase.test_config_enumerate2),

(SubversionCoreTestCase.test_config_enumerate2_exception): New tests.

* subversion/bindings/swig/python/tests/pool.py:

(PoolTestCase.test_object_hash_struct_members): Create an empty config with

svn_config_create, instead of reading an empty file.

* publish/faq.html,

publish/index.html,

publish/mailing-lists.html,

publish/news.html: Fix XHTML well-formedness and validity errors.

Approved by: danielsh

* build/generator/templates/svn_locale.vcxproj.ezt,

build/generator/templates/svn_locale.vcproj.ezt:

Change OutDir and IntDir to point to the correct location

(they've been wrong since the move in r1034362).

Approved by: brane

* /: Add subversion_vcnet.v11.suo to svn:ignore (it's generated by Visual

Studio 2012). Obvious fix.

* subversion/bindings/swig/svn_delta.i: Replace '$self' with 'self' for

compatibility with really old SWIG versions.

In the SWIG/Python bindings, replace the ugly hack that made

svn_txdelta_window_t.ops work with a much less ugly one.

The new approach is similar to what I have previously outlined in a

comment in svn_txdelta_window_t_ops_get, but didn't implement back

then because I couldn't work out the details. It's better than the

old approach, because:

1) It doesn't involve manipulating the GIL more than is necessary.

2) It doesn't use an additional global Python function (although I have kept

the old function for backwards compatibility). Nor does it need extra code

in the Python wrapper module (svn.delta).

3) It's consistent with other bindings support code.

[in subversion/bindings/swig]

* python/libsvn_swig_py/swigutil_py.c,

python/libsvn_swig_py/swigutil_py.h:

(svn_swig_py_convert_txdelta_op_c_array): New function to replace

svn_swig_py_txdelta_window_t_ops_get.

(svn_swig_py_txdelta_window_t_ops_get): Remove.

* python/svn/delta.py:

Remove the svn_txdelta_window_t.ops override.

* svn_delta.i:

Extend svn_txdelta_window_t with a custom getter for ops, and add

a typemap that specifically covers that getter. Remove the

svn_txdelta_window_t_ops_get inline function and replace it with

a backwards compatibility shim.

* build/generator/templates/svn_locale.vcxproj.ezt: Change the configuration

type to "Makefile", otherwise the generated project doesn't do anything.

(Obvious fix.)

On Windows, don't strip the Content-Type field from .po files during their compilation.

GNU libintl, by default, converts the l10n strings into the locale encoding, while Subversion requires UTF-8. This conversion can be suppressed by calling bind_textdomain_codeset, but certain old versions of libintl don't have that, so the Unix build system checks for the existence of that function, and if it's not present, strips the Content-Type header from the .po files (which prevents encoding conversion, as well, but makes msgfmt complain).

When building on Windows, this stripping is done unconditionally, but is completely unnecessary:

- On Windows, we only support linking with svn-win32-libintl, which is hacked to disable all encoding conversions.

- Even if someone links with with his own version of libintl, it's a safe bet that it will be new enough to support bind_textdomain_codeset, so we can just call that.

This patch removes Content-Type stripping on Windows, which gets rid of msgfmt warnings, as well as simplifies the build system.

* build/generator/build_locale.ezt: Remove the strip-po-charset.py invocation.

* build/generator/gen_win.py:

(POFile.__init__): don't store the .spo file name.

* build/strip-po-charset.py: Delete.

* subversion/libsvn_subr/nls.c:

(svn_nls_init): Move the bind_textdomain_codeset call out of the #ifdef WIN32 block, so it's executed on Windows, as well.

* subversion/svn_private_config.hw: Indicate that bind_textdomain_codeset is available if NLS is enabled.

Approved by: brane

* build/generator/templates/build_locale.ezt:

Fix the relative path to the po directory, broken since build_locale.bat

was moved in r1034362. (Obvious fix.)

* build/generator/templates/build_locale.ezt,

* build/generator/templates/build_zlib.ezt:

s/not errorlevel 0/errorlevel 1/. "not errorlevel 0" is always false, since

"errorlevel X" tests for %errorlevel% >= X.

Obvious fix.

* COMMITTERS: Update my (rdonch's) email address.

As a (hopefully) final follow-up to r981683, set the parent pool correctly

on the returned op object proxies.

[in subversion/bindings/swig]

* python/libsvn_swig_py/swigutil_py.c,

python/libsvn_swig_py/swigutil_py.h:

(svn_swig_py_txdelta_window_t_ops_get): Add a new parameter for the pool to

use when wrapping the op objects.

* svn_delta.i:

(svn_txdelta_window_t_ops_get): Retrieve the parent pool for the window

object and pass it to svn_swig_py_txdelta_window_t_ops_get.

* python/tests/delta.py:

(DeltaTestCase.testTxdeltaWindowT): Add a new assertion to ensure the above

works.

As a follow-up to r981683, make svn_txdelta_window_t.ops work _really_

properly - make sure we are holding the global interpreter lock before

we do Python calls.

* subversion/bindings/swig/svn_delta.i:

(svn_txdelta_window_t_ops_get): Change the parameter to PyObject* to

gather all processing in the same place, add a big helpful comment and

wrap in svn_swig_py_{acquire,release}_py_lock.

* subversion/bindings/swig/python/tests/delta.py:

(DeltaTestCase.testTxdeltaWindowT): New test to cover the fix made in

r981683 and r981701.

Move the descriptor query for "svn_txdelta_op_t *" into the module code;

when it's in libsvn_swig_py, SWIG crashes.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c,

subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h:

(svn_swig_py_txdelta_window_t_ops_get): Add the op_type_info parameter,

and get the descriptor from it, instead of querying directly.

* subversion/bindings/swig/svn_delta.i:

(svn_txdelta_window_t_ops_get): Do the query here, and pass the result

to svn_swig_py_txdelta_window_t_ops_get.

SWIG/Python: make svn_txdelta_window_t.ops work properly.

[in subversion/bindings/swig]

* svn_delta.i: disable the auto-generated accessors for

svn_txdelta_window_t.ops, for they assume it's a pointer

to a single element. Declare svn_txdelta_window_t_ops_get,

a replacement accessor.

* python/libsvn_swig_py/swigutil_py.c,

python/libsvn_swig_py/swigutil_py.h:

(svn_swig_py_txdelta_window_t_ops_get): A new function to power up the

aforementioned accessor.

* python/svn/delta.py: Graft the aforementioned accessor to the

svn_txdelta_window_t wrapper class.

* subversion/bindings/swig/python/tests/core.py:

(SubversionCoreTestCase.test_exception_interoperability): Use the old-style

try statement syntax for Python 2.4 compatibility.

SWIG/Python testsuite: stop using the obsolete unittest.makeSuite function.

[in subversion/bindings/swig/python/tests]

* auth.py,

client.py,

core.py,

delta.py,

mergeinfo.py,

pool.py,

ra.py,

repository.py,

wc.py: Use unittest.defaultTestLoader instead.

* trac/versioncontrol/tests/svn_fs.py: Use a custom unittest.TestLoader.

SWIG/Python: enhance the exception translation mechanism so that a

SubversionException thrown from a callback would be fully translated into an

svn_error_t, including any nested exceptions.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:

(callback_exception_error): Split into two, the other half being

exception_to_error.

(exception_to_error): New function for handling the conversion itself.

* subversion/bindings/swig/python/tests/core.py:

(SubversionCoreTestCase.test_exception_interoperability): New test for

the exception translation mechanism, including this revision's

improvements.

SWIG/Python testsuite: migrate from piggybacking on Trac's test case to using

Temper. After this, the testsuite no longer depends on Trac's testsuite, except

that we still use its test dump file.

* subversion/bindings/swig/python/tests/client.py,

* subversion/bindings/swig/python/tests/mergeinfo.py,

* subversion/bindings/swig/python/tests/ra.py,

* subversion/bindings/swig/python/tests/repository.py,

* subversion/bindings/swig/python/tests/wc.py: Remove all references to

trac.versioncontrol.tests. Use utils.Temper for making temporary entities.

SWIG/Python testsuite: more development on the utilities.

* subversion/bindings/swig/python/tests/utils.py:

(): Simplify imports.

(Temper.alloc_repo): Rename to alloc_empty_repo.

(Temper.alloc_known_repo): New function.

(Temper._file_uri_for_path): Turn into a global function and rename to

file_uri_for_path.