Checkout Tools
  • last updated 3 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
configure: Add new option to specify path to swig bindings targets

Before this commit, it was not possible to use distinct Python

installations for the build system and test suite on the one hand,

and for building language bindings against on the other hand.

So we introduce new variable "SWIG_PY_PYTHON" for a target of

the SWIG Python bindings and a configure option to specify it.

Also, for the symmetry we introduce "SWIG_PL_PERL" and

"SWIG_RB_RUBY" for the Perl and Ruby SWIG bindings, and options

to specify them.

* configure.ac ():

- Use variables "SWIG_PL_PERL", "SWIG_PY_PYTHON", "SWIG_RB_RUBY" for

targets of the SWIG Perl, Python, Ruby bindings instead of "PERL",

"PYTHON", "RUBY".

- Introduce --with-swig-perl, --with-swig-python, --with-swig-ruby

options for setting variables "SWIG_PL_PERL", "SWIG_PY_PYTHON",

"SWIG_RB_RUBY".

* Makefile.in, build/ac-macros/swig.m4 ():

Use variables "SWIG_PL_PERL", "SWIG_PY_PYTHON", "SWIG_RB_RUBY" for

targets of the SWIG Perl, Python, Ruby bindings instead of "PERL",

"PYTHON", "RUBY".

* subversion/bindings/swig/INSTALL

(BUILDING SWIG BINDINGS FOR SVN ON UNIX step 2):

- Describe how to specify the path to the target language interpreters

with the new options, instead of using environment variables.

- Fix the name of glue libraries.

Review by: danielsh

  1. … 3 more files in changeset.
* INSTALL (I.C.12): Add Note that non-release mode is required for building

SWIG Python 2 bindings.

* subversion/bindings/swig/INSTALL

(BUILDING SWIG BINDINGS FOR SVN ON UNIX, Step 2): Add description how to

confirm that the ./configure could find SWIG path correctly.

Review by: danielsh

  1. … 1 more file in changeset.
* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c

(svn_swig_py_stringhash_from_dict,

svn_swig_py_mergeinfo_from_dict,

svn_swig_py_prophash_from_dict): Move variable declarations to

the start of block the to fix syntax errors with VC9.

Patch by: Jun Omae <jun66j5{_AT_}gmail.com>

Follow-up to r1876016: Refine INSTALL doc for SWIG bindings

The changes are mainly:

- Use passive voice

- Rearrange information to put the common case first and rarer cases

nearer the end

* subversion/bindings/swig/INSTALL

(STATUS OF THE SWIG BINDINGS,

BUILDING SWIG BINDINGS FOR SVN ON UNIX Step 1,

BUILDING SWIG BINDINGS FOR SVN ON UNIX Step 3): Refine expressions.

Patch by: danielsh

Fix Proc.new warnings in Ruby bindings with Ruby >= 2.7

Per Ruby 2.7's release notes[1], use the block-capturing syntax instead of

explicit Proc.new to resolve warnings like these in the Ruby SWIG APIs:

subversion/bindings/swig/ruby/svn/client.rb:640: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead

subversion/bindings/swig/ruby/svn/core.rb:258: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead

[1]: https://github.com/ruby/ruby/blob/v2_7_0/NEWS#proclambda-without-block-is-deprecated-

* subversion/bindings/swig/ruby/svn/client.rb:

(set_log_msg_func, set_log_msg_func2, set_notify_func, set_cancel_func):

Replace callback=Proc.new parameter with &callback

(def_init_callbacks): Remove explicit nil parameters to above functions,

leveraging deafaults

* subversion/bindings/swig/ruby/svn/core.rb:

(add_simple_prompt_provider, add_username_prompt_provider,

add_ssl_server_trust_prompt_provider, add_ssl_client_cert_prompt_provider,

add_ssl_client_cert_pw_prompt_provider): Replace prompt=Proc.new parameter

with &prompt

Explain SWIG is needed for building Python 2 bindings.

Since Subversion distibution 1.14.0 and later will ship with SWIG Python

bindings *.c source code for Python 3, clarify *.c source files for Python 2

and Python 3 are different and incompatible, and describe how to clear

incompatible intermediate files.

* subversion/bindings/swig/INSTALL

(STATUS OF THE SWIG BINDINGS):

Add explanation about supported Python version and distribution tarball.

(BUILDING SWIG BINDINGS FOR SVN ON UNIX Step 1):

Add new case that SWIG is needed for Python 2 bindings.

(BUILDING SWIG BINDINGS FOR SVN ON UNIX Step 2):

Update Python and perl version in commadline example.

(BUILDING SWIG BINDINGS FOR SVN ON UNIX Step 3):

Insert optional step to clear intermediate files previously generated.

(everywhere) Strip trailing white space in the end of line.

Fix various typos detected by codespell

[in subversion/bindings]

* cxx/README, cxx/include/svnxx/tristate.hpp, cxx/src/aprwrap/array.hpp,

javahl/README, javahl/native/JNIStackElement.cpp, javahl/native/JNIUtil.h,

javahl/native/NativeStream.hpp, javahl/native/OperationContext.cpp,

javahl/native/org_apache_subversion_javahl_util_PropLib.cpp,

javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java,

javahl/src/org/apache/subversion/javahl/ISVNClient.java,

javahl/src/org/apache/subversion/javahl/ISVNRemote.java,

javahl/src/org/apache/subversion/javahl/ISVNRepos.java,

javahl/src/org/apache/subversion/javahl/NativeResources.java,

javahl/src/org/apache/subversion/javahl/SVNClient.java,

javahl/src/org/apache/subversion/javahl/SVNRepos.java,

javahl/src/org/apache/subversion/javahl/SVNUtil.java,

javahl/src/org/apache/subversion/javahl/callback/TunnelAgent.java,

javahl/src/org/apache/subversion/javahl/callback/UserPasswordCallback.java,

javahl/src/org/apache/subversion/javahl/types/Property.java,

javahl/src/org/apache/subversion/javahl/types/Revision.java,

javahl/src/org/apache/subversion/javahl/types/Status.java,

javahl/src/org/apache/subversion/javahl/types/VersionExtended.java,

javahl/src/org/tigris/subversion/javahl/Notify.java,

javahl/src/org/tigris/subversion/javahl/PromptUserPassword2.java,

javahl/src/org/tigris/subversion/javahl/PropertyData.java,

javahl/src/org/tigris/subversion/javahl/Revision.java,

javahl/src/org/tigris/subversion/javahl/SVNAdmin.java,

javahl/src/org/tigris/subversion/javahl/SVNClient.java,

javahl/src/org/tigris/subversion/javahl/SVNClientInterface.java,

javahl/src/org/tigris/subversion/javahl/Status.java,

javahl/src/org/tigris/subversion/javahl/StatusKind.java,

swig/include/proxy.py, swig/perl/libsvn_swig_perl/swigutil_pl.c,

swig/perl/native/Client.pm, swig/perl/native/Core.pm,

swig/python/tests/client.py, swig/python/tests/ra.py,

swig/python/tests/typemap.py:

(): Spelling fixes

    • ?
    ./javahl/native/org_apache_subversion_javahl_util_PropLib.cpp
  1. … 24 more files in changeset.
Increment the trunk version number to 1.15, and introduce a new CHANGES

section, following the creation of the 1.14.x release branch.

* subversion/include/svn_version.h,

subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java,

subversion/tests/cmdline/svntest/main.py

(SVN_VER_MINOR): Increment to 15.

* CHANGES: New section for 1.15.0.

  1. … 3 more files in changeset.
Update svn_ra_open4() to svn_ra_open5() across the tree.

Most of these changes are mechanical. JavaHL gains a redirect cycle fix.

The set_svn_ra_open() callback gets updated to the new API.

* subversion/bindings/javahl/native/CommitEditor.cpp

(open_callback_session): Use svn_ra_open5() and show the redirected URL in

an error message.

* subversion/bindings/javahl/native/RemoteSession.cpp

(RemoteSession::RemoteSession): Use svn_ra_open5() and detect redirect

cycles based on the actual redirection URL sent by the server.

* subversion/libsvn_client/ra.c

(svn_client__open_ra_session_internal): Use svn_ra_open5().

* subversion/libsvn_ra/ra_loader.c

(svn_ra_open5): Pass svn_ra_open5 to the svn_svn_ra_open() callback.

* subversion/libsvn_ra/ra_loader.h

(svn_ra__open_func_t): Update to match svn_ra_open5().

* subversion/libsvn_ra_serf/serf.c

(svn_ra_serf__open): Update comment referring to svn_ra_open4().

* subversion/svnsync/svnsync.c

(do_initialize, open_source_session,

open_target_session): Update to svn_ra_open5().

* subversion/tests/cmdline/atomic-ra-revprop-change.c

(change_rev_prop): Update to svn_ra_open5().

* subversion/tests/libsvn_ra/ra-test.c

(make_and_open_repos, check_tunnel_callback_test, tunnel_callback_test,

tunnel_run_checkout, commit_locked_file): Update to svn_ra_open5().

  1. … 7 more files in changeset.
* everywhere: Run tools/dev/remove-trailing-whitespace.sh to remove

trailing whitespace before we branch 1.14.

  1. … 100 more files in changeset.
Disable the SWIG-PY test for shelving API.

The experimental shelving API is not currently exposed through SWIG,

following r1875037.

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

(test_shelf): Skip.

Fix implementation of svn_client_status_func_t function for swig-py

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

(svn_swig_py_client_status_func): Fix type from void to svn_error_t *.

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

(svn_swig_py_client_status_func): Fix type from void to svn_error_t *.

- Remove the code to save/restore Python Error context.

- Remove the code to clear C API error status

- Return error status as it is

Reported by: stsp

Fix pool life time bug on test_log5_revprops test case in swig-py.

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

(SubversionClientTestCase.log_entry_receiver_whole): Moved to the scope

within SubversionClientTestCase.test_log5_revprops as local function.

(SubversionClientTestCase.test_log5_revprops):

- Use local function log_entry_receiver_whole as receiver argument

instead of SubversionClientTestCase.log_entry_receiver_whole.

- Make a pool for log_entry used by child function log_entry_receiver_whole

(SubversionClientTestCase.test_log5_revprops log_entry_receiver_whole):

- Moved from SubversionClientTestCase.log_entry_receiver_whole.

- Duplicate log_entry object to bring it out of the function scope

by using pool on parent scope.

Found by: stsp

Fix an issue in config_dir argments on SWIG Python 3 bindings

On Python 3 binings, svn_config_* functions which has config_dir argments

(listed on [1]) couldn't accept bytes object for it although all functions

returns path as bytes object. This fixes it.

[1] svn_config_get_config, svn_config_ensure, svn_config_read_auth_data,

svn_config_write_auth_data, svn_config_walk_auth_data,

svn_config_get_user_config_path

* subversion/bindings/swig/core.i

(typemap(in,parse="z") const char *config_dir ""): Removed.

Found by: danielsh

Allow NULL value for fname in svn_config_get_user_config_path on swig bindings

* subversion/bindings/swig/core.i (%apply const char *MAY_BE_NULL):

Add "const char *fname" in the list.

Found by: danielsh

Support building with SWIG 4 on Python 3.x

* build/ac-macros/swig.m4

(SVN_FIND_SWIG): Allow building with SWIG 4+, and add -modern option

when Python 3 and SWIG 3.x are detected.

* subversion/bindings/swig/include/proxy.py

Use _get_instance_attr and _set_instance_attr.

* subversion/bindings/swig/include/proxy.swg

(_get_instance_attr): New function to get an instance attribute

without metadata for new-style and old-style classes.

(_set_instance_attr): New function to set an instance attribute for

new-style and old-style classes.

* subversion/bindings/swig/INSTALL

(BUILDING SWIG BINDINGS FOR SVN ON UNIX, Step 1): Update supported

SWIG versions for Python 3 bindings (remove the note that SWIG 4+

is not supported).

Patch by: Jun Omae <jun66j5_{AT}_gmail.com>

Review by: brane

futatuki

julianfoad

  1. … 1 more file in changeset.
Improve SWIG 'INSTALL' documentation

* subversion/bindings/swig/INSTALL

(BUILDING SWIG BINDINGS FOR SVN ON UNIX, Step 1 and Step 1a):

- Attempt to make the explanation more clear, especially regarding

which versions of SWIG we support for the Python, Perl, and Ruby

bindings. Also fix a few minor grammar and spelling errors.

Suggested by: danielsh

brane

julianfoad

Restrict SWIG version for Python bindings

* Makefile.in (copy-swig-py:):

Make symbolic links to C extension modules in build/test directory

(for check-swig-py with SWIG 3.0.9 and SWIG 4.0 or later)

* build/ac-macros/swig.m4:

Add SWIG version check for Python 2 and Python 3 to check its version

is suitable for Python bindings, and to set up appropriate SWIG option.

Review by: hartmannathan

* subversion/bindings/swig/INSTALL

(BUILDING SWIG BINDINGS FOR SVN ON UNIX, Step1):

- Add description that SWIG installation is optional.

- Update suitable SWIG version information per language bindings.

(BUILDING SWIG BINDINGS FOR SVN ON UNIX, Step1a): Fold long line.

(USING SWIG BINDINGS, Python): Update URLs for ViewVC and Trac.

  1. … 2 more files in changeset.
Avoid deprecation warnings about PY_SSIZE_T_CLEAN since Python 3.8

On Python C API, use of # variants of formats in parsing or building value,

(e.g. PyObject_CallFunction(), etc) without PY_SSIZE_T_CLEAN defined

raises DeprecationWarning since Python 3.8 [1][2]. As PY_SSIZE_T_CLEAN

feature was introduced in Python 2.5 and we only support Python >= 2.7,

there is no compatibility problem to use it.

[1] https://docs.python.org/3/whatsnew/3.8.html#changes-in-the-c-api

[2] https://docs.python.org/3/c-api/arg.html#arg-parsing

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

(PY_SSIZE_T_CLEAN): New definition

(change_dir_prop, change_file_prop, parse_fn3_set_revision_property,

parse_fn3_set_node_property, write_handler_pyio): Cast the length

argument of '#' variants of formats to build Python argment value,

to Py_ssize_t.

Patch by: Jun Omae <jun66j5{_AT_}gmail.com>

Merge the swig-py3 branch to trunk.
  1. … 47 more files in changeset.
Increment the trunk version number to 1.14, and introduce a new CHANGES

section, following the creation of the 1.13.x release branch.

* subversion/include/svn_version.h,

subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java,

subversion/tests/cmdline/svntest/main.py

(SVN_VER_MINOR): Increment to 14.

* CHANGES: New section for 1.14.0.

  1. … 3 more files in changeset.
Get rid of apr_int64_t format string check in swig py configure.

This check relied on APR implementation details and broke with APR 1.7.0.

Rather than trying to guess a perfect format string to use, just use the

largest possible format and cast the argument accordingly.

Should fix build against APR 1.7.0 and later.

Suggested by: brane

* build/ac-macros/swig.m4: Remove code related to SVN_APR_INT64_T_PYCFMT.

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

(svn_swig_py_client_blame_receiver_func): Stop relying on the

SVN_APR_INT64_T_PYCFMT constant from configure. Use "L" and

acast to PY_LONG_LONG instead.

  1. … 1 more file in changeset.
Increment the trunk version number to 1.13, and introduce a new CHANGES

section, following the creation of the 1.12.x release branch.

* subversion/include/svn_version.h,

subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java,

subversion/tests/cmdline/svntest/main.py

(SVN_VER_MINOR): Increment to 13.

* CHANGES: New section for 1.13.0.

  1. … 3 more files in changeset.
Fix some Doxygen mark-up.
Comment out a failing swig-rb test.

Issue 4805, "delta path editor binding broken for root path".

* subversion/bindings/swig/ruby/test/test_delta.rb

(test_path_driver): Comment out (as no XFail mechanism is available).

Expose the output arguments of svn_client_blame6 in JavaHL.

[in subversion/bindings/javahl/src/org/apache/subversion]

* callback/BlameRangeCallback.java: New callback for ISVNClient.blame.

* callback/BlameLineCallback.java: Remove unused import.

* ISVNClient.java

(ISVNClient.blame): Add range callback parameter. Update docstring.

* SVNClient.java

(SVNClient.blame): Update wrapper and native method declaration.

[in subversion/bindings/javahl/native]

* BlameCallback.h

(BlameCallback::BlameCallback): Change constructor signature.

(BlameCallback::get_start_revnum_p, BlameCallback::get_end_revnum_p): New.

(BlameCallback::setRange): New.

(BlameCallback::m_start_revnum, BlameCallback::m_start_revnum,

BlameCallback::m_range_callback_invoked, BlameCallback::m_range_callback): New.

(BlameCallback::m_line_callback): Renamed from m_callback.

* BlameCallback.cpp: Include svn_private_config.h.

(BlameCallback::BlameCallback): Update constructor implementation.

(BlameCallback::callback): Update static callback implementation.

(BlameCallback::setRange): Implement.

(BlameCallback::singleLine): Notice changed member variable name.

* SVNClient.cpp

(SVNClient::blame): Set blame output arguments from the callback.

* org_apache_subversion_javahl_SVNClient.cpp

(Java_org_apache_subversion_javahl_SVNClient_blame): Update native method.

[in subversion/bindings/javahl/tests/org/apache/subversion/javahl]

* BasicTests.java

(BlameRangeCallbackImpl): New helper class.

(testBinaryBlame): Also test the returned revision range.

* ExceptionTests.java

(testBlameCallback): Check that a null range callback doesn't cause exceptions.

Follow up to r1851268: our coding guidelines say that output parameters

should come first in the function argument list.

* subversion/include/svn_client.h

(svn_client_blame6): Move start_revnum_p and end_revnum_p to the

beginning of the argument list and update the docstring to say that

either of these may be NULL.

* subversion/libsvn_client/blame.c

(svn_client_blame6): Update signature.

* subversion/svn/blame-cmd.c (svn_cl__blame),

subversion/libsvn_client/deprecated.c (svn_client_blame5),

subversion/bindings/javahl/native/SVNClient.cpp (SVNClient::blame):

Update all callers.

  1. … 4 more files in changeset.
Fix issue #4801: Make JavaHL blame return byte[] file contents in the

blame callback instead of assuming they can be converted to String.

[in subversion/bindings/javahl/src/org/apache/subversion/javahl]

* ISVNClient.java

(ISVNClient.blame): Add a new overload that uses the new BlameLineCallback.

Deprecate the other two overloads that use BlameCallback.

* SVNClient.java

(SVNClient.blame): Implement new native overload and deprecate the old ones.

(SVNClient.BlameCallbackAdapter): New helper class.

* callback/BlameCallback.java

(BlameCallback): Deprecated.

* callback/BlameLineCallback.java

(BlameLineCallback): New, replaces BlameCallback.

[in subversion/bindings/javahl/tests/org/apache/subversion/javahl]

* BasicTests.java

(testBasicBlame, testBlameWithDiffOptions): Suppress deprecation warnings

as these tests use the old API, and should continue to do so in order to

test the callback adapter.

(testBinaryBlame): New test case.

(collectBlameLines, BlameCallbackImpl): Suppress deprecation warnings.

(BlameLineCallbackImpl): New helper class.

* ExceptionTests.java

(testBlameCallback): Use the new API in this test case.

[in subversion/bindings/javahl/native]

* org_apache_subversion_javahl_SVNClient.cpp

(Java_org_apache_subversion_javahl_SVNClient_blame): Update parameter order.

* BlameCallback.cpp

(BlameCallback::singleLine): Use BlameLineCallback instead of BlameCallback.

Move misplaced parameters out of the blame callback.

The svn_client_blame_receiver4_t parameters "start_revnum" and "end_revnum"

do not really belong here because they are not per-line data. They are the

"resolved" versions of the input revnums to svn_client_blame6(). This patch

moves them to svn_client_blame6() output parameters.

* subversion/bindings/javahl/native/BlameCallback.h,

subversion/bindings/javahl/native/BlameCallback.cpp

(callback,

singleLine): Drop the start/end parameters.

* subversion/bindings/javahl/native/SVNClient.cpp

(blame): Adjust the call to svn_client_blame6(). Don't provide access to

the start/end parameters here, as we weren't providing access to them

through the callback. We could add them later.

* subversion/svn/blame-cmd.c

(blame_receiver_xml,

blame_receiver): Don't expect and process start/end revnums here.

(svn_cl__blame): Handle them here instead.

  1. … 1 more file in changeset.
Update callers to use the newly revved svn_client_blame6() API.

* subversion/bindings/javahl/native/BlameCallback.h,

subversion/bindings/javahl/native/BlameCallback.cpp

(callback,

singleLine): Expect 'svn_string_t *' instead of 'char *'.

* subversion/bindings/javahl/native/SVNClient.cpp

(blame): Update the call to use svn_client_blame6.

* subversion/svn/blame-cmd.c

(blame_receiver_xml,

blame_receiver): Expect 'line' to be an svn_string_t.

(svn_cl__blame): Update to use svn_client_blame6 and

svn_client_blame_receiver4_t.

  1. … 1 more file in changeset.