Troy Curtis, Jr <> (troycurtisjr)

Found Patch
r862063 r1825316, r1824410, r1823802, r1822739, r1822736, r1822729, r1822728, r1822488, r1822486, r1822485, r1820032, r1819712, r1819566, r1819565, r1819562, r1819561, r1819498, r1819460, r1819452, r1819441, r1819397, r1819396, r1819394, r1819386, r1819312, r1819203, r1819202, r1819112, r1819110, r1818995, r1818994, r1816596, r1816097, r1816092, r1815770, r1815768, r1814455, r1814454, r1814387, r1814386, r1813774, r1813700, r1813665, r1813663, r1813662, r1813660, r1813114, r871532, r871091, r870934, r870827, r867580

r1825316 | troycurtisjr | 2018-02-25 11:26:45 -0600 (Sun, 25 Feb 2018)

Update external 'diff' command test for svn.fs.FileDiff() to depend on presence
of the command instead of testing for 'win32' platform.

* subversion/bindings/swig/python/tests/
  (SubversionFSTestCase.test_diff_repos_paths): Split function into internal
   and external variants.
  (SubversionFSTestCase.test_diff_repos_paths_external): New test method.
  (SubversionFSTestCase.test_diff_repos_paths_internal): New test method.
  (SubversionFSTestCase.setUp): Added unicode test commit from original
   test_diff_repos_paths() so all test methods have a common repository setup.

Found by: stsp

r1824410 | troycurtisjr | 2018-02-15 23:12:05 -0600 (Thu, 15 Feb 2018)

Fix Python unit test, fs.SubversionFSTestCase, on Windows.

* subversion/bindings/swig/python/tests/	
   Update default test case to invoke internal diff implementation and add
   a case for testing calls to the 'diff' executable on non-Windows platforms.

* subversion/bindings/swig/python/svn/	
  (FileDiff.__init__): Add difftemp to track temporary file for cleanup.
  (FileDiff.__del__): Ensure difftemp is cleaned up.
  (File.get_pipe): Add a condition to use the internal diff implementation when
   the diffoptions value is given as None.

r1823802 | troycurtisjr | 2018-02-10 20:19:42 -0600 (Sat, 10 Feb 2018)

Ensure Python bindings for fs.FileDiff behaves correctly when the python-future
package is installed.

* subversion/bindings/swig/python/svn/
  Try the Python 2 '__builtin__' import before the Python 3 'builtins'.
  (FileDiff._dump_contents): Open temporary file in binary mode.
* subversion/bindings/swig/python/tests/
  Add test for fs.FileDiff.

* subversion/bindings/swig/python/tests/
  (suite): Add fs test suite.

Found By: Kenneth Porter <>

r1822739 | troycurtisjr | 2018-01-30 23:13:59 -0600 (Tue, 30 Jan 2018)

On branch swig-py3: Ensure swig check_output() is decoded as utf8.

To support Python 2 and 3, explicitly decode check_output() return as utf8.

* build/generator/swig/
  (Generator.__init__, Generator.version): Explicitly decode check_output() as

r1822736 | troycurtisjr | 2018-01-30 22:16:43 -0600 (Tue, 30 Jan 2018)

On branch swig-py3: Catchup to trunk @r1822734.

r1822729 | troycurtisjr | 2018-01-30 21:53:58 -0600 (Tue, 30 Jan 2018)

On branch swig-py3: Update status now the Visual Studio <= 2008 works.

* BRANCH-README: Remove note about only Visual Studio > 2008 being supported.

r1822728 | troycurtisjr | 2018-01-30 21:50:43 -0600 (Tue, 30 Jan 2018)

On branch swig-py3: Fix python swig compile for Visual Studio <= 2008.

Add the proper UserMacros definitions to pull in the necessary SWIG arguments
for python generation.

* build/generator/templates/vcnet_vsprops.ezt
  New file defining UserMacros.

* build/generator/templates/vcnet_vcproj.ezt
  Inherit the new property sheet containing UserMacros.

* build/generator/
  (Generator.write_project): Write out the property sheet for Visual Studio
   2008 and earlier.

r1822488 | troycurtisjr | 2018-01-28 21:46:19 -0600 (Sun, 28 Jan 2018)

On branch swig-py3: Update BRANCH-README with Windows status.

  - Update with current Windows build status.

r1822486 | troycurtisjr | 2018-01-28 20:22:16 -0600 (Sun, 28 Jan 2018)

On branch swig-py3: Revert a Python 3 only usage.

* build/generator/
   Drop the Python 3 only "errors" argument to fileinput.hook_encoded().

r1822485 | troycurtisjr | 2018-01-28 18:53:54 -0600 (Sun, 28 Jan 2018)

On branch swig-py3: Add py3c library support to the Windows build.

* build/generator/templates/vcnet_vcxproj.ezt
  (UserMacros): Add template options to define UserMacros.

* build/generator/
  (Generator.write_project): Include new user macro values in 
   data passed to the ezt template function.

* build/generator/
  (UserMacro): Define a new type to use with user macro templates.
  (GenDependenciesBase._optional_libraries): Include py3c library.
  (GenDependenciesBase.parse_options): Include the py3c library path
  (GenDependenciesBase.find_libraries): Add a call to _find_py3c().
  (GenDependenciesBase._find_python): Define SWIG_PY_OPTS user macro 
   based on detected Python version.
  (GenDependenciesBase._find_py3c): New method.
   GenDependenciesBase._find_jdk): Ensure output from subprocess is
   properly decoded.

  (_usage_exit): Add --with-py3c usage.
  (my_getopt): Add with-py3c option.

* subversion/bindings/swig/INSTALL
  Include py3c in Windows SWIG building instructions.

* build/generator/
  (IncludeDependencyInfo._scan_for_includes): Ensure file data is
   properly encoded as UTF8.

* build/generator/
  (WinGeneratorBase.makeguid): Ensure data input to hashlib is binary
   and not Unicode.
  (WinGeneratorBase.get_win_includes): Include py3c include directory
   in swig compile definition.

r1820032 | troycurtisjr | 2018-01-03 22:06:36 -0600 (Wed, 03 Jan 2018)

On branch swig-py3: Go back to using classic classes for Python 2 swig bindings.

Add some additional clarifying comments for the reasons behind overriding
__getattr__ and __getattribute__.

* build/ac-macros/swig.m4
  (SVN_FIND_SWIG): Add the '-classic' flag to swig when python 2 is detected.

* subversion/bindings/swig/include/
   (_retrieve_swig_value): Factor out metadata retrieval from __getattribute__ to a new function.  
   (__getattribute__): Only define __getattribute__ for new style classes.
   (__getattr__): Add back implementation for classic classes.

Suggested By: brane

r1819712 | troycurtisjr | 2017-12-30 19:49:15 -0600 (Sat, 30 Dec 2017)

On branch swig-py3: Create and use a wrapper function to efficiently retrieve
lists from dict object on Python 2 and 3.

Wrapping dict methods such as keys() and values() in list() works to create a
independent list, but on Python 2 two distinct lists are created which is

* subversion/bindings/swig/python/svn/
  Create a new utility function, _as_list(), and remove now unnecessary
  _bi_list alias.
  (svn.core._unprefix_names, svn.core.__all__): Use new _as_list() function in
   place of list() on dict output.

* subversion/bindings/swig/python/svn/,
  Use new _as_list() function in place of list() on dict output.

Found By: danielsh, brane

r1819566 | troycurtisjr | 2017-12-29 22:04:06 -0600 (Fri, 29 Dec 2017)

On branch swig-py3: Properly handle NULL values from the Python C API.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
  (svn_swig_py_as_file): Ensure each return from the Python C API is not NULL
   before passing to the next API function. 

Found By: danielsh

r1819565 | troycurtisjr | 2017-12-29 21:37:31 -0600 (Fri, 29 Dec 2017)

On branch swig-py3: Clarify move detection logic in swig trac tests.

* subversion/bindings/swig/python/tests/trac/versioncontrol/
  (get_changes): Clarify the move detection logic by adding a few comments and
   replacing the odd index/offset based loop with one based on enumerate.

Suggested By: danielsh

r1819562 | troycurtisjr | 2017-12-29 20:32:58 -0600 (Fri, 29 Dec 2017)

On branch swig-py3: Fix swig tests which relied on consistent dict key ordering.

* subversion/bindings/swig/python/tests/trac/versioncontrol/
  (test_changeset_file_edit, test_changeset_file_copy): Ensure consistent dict
   key sequence ordering by using sorted().

* subversion/bindings/swig/python/tests/trac/versioncontrol/tests/
  (get_changes): Ensure moves indexes are sorted so that deletions work correctly.

Found By: danielsh

r1819561 | troycurtisjr | 2017-12-29 20:26:22 -0600 (Fri, 29 Dec 2017)

On branch swig-py3: Add missing undef to the py3c/swig compatibility header.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py3c.h
  Add PyInt_FromSize_t to the list of undefs to prevent conflicts between py3c
  and swig.

r1819498 | troycurtisjr | 2017-12-29 10:13:18 -0600 (Fri, 29 Dec 2017)

On branch swig-py3: Do not include internal header as a system header.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
  Change include of swigutil_py3c.h from <> to "" as it is an internal header.

Found By: danielsh

r1819460 | troycurtisjr | 2017-12-28 20:05:43 -0600 (Thu, 28 Dec 2017)

On branch swig-py3: Move py3c compat fixes to all swig modules.

Resolves compile warnings in Python 3 build for all modules, not just those in

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py3c.h:
  New file containing the py3c compat undef fixes previously in swigutil_py.c.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:
  Moved py3c compat undef fixes to swigutil_py3c.h and include the header.

* subversion/bindings/swig/include/svn_global.swg:
  Add swigutil_py3c.h include to ensure all swig modules get the compat fixes.

* subversion/bindings/swig/core.i,
  Remove redundant py3c.h inclusion, now that svn_global.swg includes

Found By: danielsh

r1819452 | troycurtisjr | 2017-12-28 17:38:34 -0600 (Thu, 28 Dec 2017)

On branch swig-py3: Make swig python configure error more meaningful if
Python.h is not found.

* build/ac-macros/swig.m4
  (SVN_FIND_SWIG): Add a AC_CHECK_HEADER for Python.h to verify its existence,
   and provide a meaningful error if it is not found.

Found By: danielsh

r1819441 | troycurtisjr | 2017-12-28 15:58:31 -0600 (Thu, 28 Dec 2017)

On branch swig-py3: Include the detected PY3C header path in the swig compile.


Found By: danielsh

r1819397 | troycurtisjr | 2017-12-27 23:25:55 -0600 (Wed, 27 Dec 2017)

On branch swig-py3: Fix style in newly added function.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c 
  (svn_swig_ensure_valid_swig_wrapper): Update style for consistency.

r1819396 | troycurtisjr | 2017-12-27 22:55:00 -0600 (Wed, 27 Dec 2017)

On branch swig-py3: Add configuration instructions for py3c.

* INSTALL: Add configuration instructions for py3c and remove reference to
  Python 3 not being supported.

* subversion/bindings/swig/INSTALL: Add build instructions for py3c.

r1819394 | troycurtisjr | 2017-12-27 22:19:17 -0600 (Wed, 27 Dec 2017)

On branch swig-py3: Remove use of hasattr() in python bindings since it can be
subtly different between Python 2 and 3.

* subversion/bindings/swig/include/proxy_apr.swg,
   _get_history): Remove use of hasattr() to ensure consistent behavior with
    both Python 2 and 3.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
  (svn_swig_ensure_valid_swig_wrapper): New private function for common wrapper
   validation code.
  (svn_swig_py_convert_ptr, svn_swig_py_must_get_ptr): Use new wrapper
   validation function.

r1819386 | troycurtisjr | 2017-12-27 20:00:36 -0600 (Wed, 27 Dec 2017)

On branch swig-py3: Remove resolved Python3 runtime issues from BRANCH-README.

* BRANCH-README: Remove resolved Python3 runtime issues.

r1819312 | troycurtisjr | 2017-12-26 20:43:05 -0600 (Tue, 26 Dec 2017)

On branch swig-py3: Do not hide AttributeError exception in called function.

* subversion/bindings/swig/include/proxy.swg
  (_assert_valid_deep): Move the call to assert_valid() out of the try block to
   prevent masking AttributeError that happen within the method call.

r1819203 | troycurtisjr | 2017-12-23 23:23:08 -0600 (Sat, 23 Dec 2017)

On branch swig-py3: Catch up to trunk@1819202.

r1819202 | troycurtisjr | 2017-12-23 22:47:31 -0600 (Sat, 23 Dec 2017)

On branch swig-py3: Fix additional Bytes versus String inconsistencies.

Be explicit about UTF-8 conversions between bytes and strings. All
swig unit tests now pass under both Python 2 and 3.

* subversion/bindings/swig/include/svn_types.swg
  (typemap(argout) unsigned char digest[ANY], unsigned char *digest):
  Treat checksum digest data correctly as bytes, not a string.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
  (write_handler_pyio): Create a compatibility definition, SVN_SWIG_BYTES_FMT, to
   ensure raw file data is treated as bytes in Python 3 and string in Python2.

* subversion/bindings/swig/python/tests/,
  Use BytesIO instead of StringIO to servce as a source of raw binary data.

  Open raw data file in binary mode.

  Explicity encode data being written to a file opened in binary mode and
  decode binary data in the result from binascii.b2a_hex().

r1819112 | troycurtisjr | 2017-12-22 22:52:16 -0600 (Fri, 22 Dec 2017)

On branch swig-py3: Ensure the correct parent pool weakref is used.

* subversion/bindings/swig/include/proxy_apr.swg
  (GenericSWIGWrapper.set_parent_pool): Update the _is_valid weakref with the
   ref to the new parent pool.

r1819110 | troycurtisjr | 2017-12-22 22:43:26 -0600 (Fri, 22 Dec 2017)

On branch swig-py3: Replace hasattr check for a method with try-except.

* subversion/bindings/swig/include/proxy.swg
  (_assert_valid_deep): Replace hasattr check for the 'assert_valid' method
   with a try-except block as some class instances can have the method but return
   False to hasattr().

r1818995 | troycurtisjr | 2017-12-21 21:52:59 -0600 (Thu, 21 Dec 2017)

On branch swig-py3: Correctly manage swig objects with Python new style classes.

* subversion/bindings/swig/include/
  (__getattr__): Replace __getattr__ with __getattribute__ to correctly
  intercept attribute access, even when swig uses descriptors for new style
  classes (which are the only type available in Python 3).

* build/ac-macros/swig.m4
  Request that swig generate new style classes, even for Python 2, to reduce
  differences with Python 3.

* subversion/bindings/swig/include/proxy.swg
  (_copy_metadata_deep): Remove iteritems() use to make compatible with both
   Python 2 and 3.
  (_assert_valid_deep): Remove itervalues() use and add type check to be
   compatible with both Python 2 and 3.

r1818994 | troycurtisjr | 2017-12-21 21:40:08 -0600 (Thu, 21 Dec 2017)

On branch swig-py3: Disable invalid PyInt_Check() in Python 3.

* subversion/bindings/swig/core.i
  (%typemap(in) (char *buffer, apr_size_t *len)):
  Remove PyInt_Check() when building against Python 3, since it has
  been removed.

r1816596 | troycurtisjr | 2017-11-28 21:50:09 -0600 (Tue, 28 Nov 2017)

On branch swig-py3: Fix clean-swig-py for out-of-source builds.

   reference generated files in out-of-source builds.

r1816097 | troycurtisjr | 2017-11-22 19:29:56 -0600 (Wed, 22 Nov 2017)

On branch swig-py3: Sort lists generated from dictionaries before testing.

* subversion/bindings/swig/python/tests/trac/versioncontrol/tests/
   Wrap sequences in sorted() which are generated from dictionaries and used for equivalence
   tests to ensure consistent test returns.

r1816092 | troycurtisjr | 2017-11-22 18:44:53 -0600 (Wed, 22 Nov 2017)

On branch swig-py3: Explicitly use truncating division to ensure consistent
behavior between Python 2 and 3.

* subversion/bindings/swig/python/svn/,
  (secs_from_timestr, SubversionChangeset.__init__,
  Replace standard division between integers with truncating division, '//'.

r1815770 | troycurtisjr | 2017-11-19 21:17:22 -0600 (Sun, 19 Nov 2017)

On branch swig-py3: Ensure Python file objects are closed before destruction.

* subversion/bindings/swig/python/tests/trac/versioncontrol/tests/,
   Wrap bare open() calls in a 'with' block to ensure the file object is closed
   before destruction.

r1815768 | troycurtisjr | 2017-11-19 20:30:00 -0600 (Sun, 19 Nov 2017)

On branch swig-py3: Fix raw file read handling in python swig bindings to work
the same in Python 2 and 3.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
  (read_handler_pyio): Replace PyStr_AsUTF8AndSize() with
  PyBytes_AsStringAndSize() so that raw file I/O in Python 2 and 3 are handled
  the same way.

r1814455 | troycurtisjr | 2017-11-06 22:01:25 -0600 (Mon, 06 Nov 2017)

* subversion/bindings/swig/python/tests/trac/versioncontrol/tests/
  Remove redundent StringIO imports.
  (test_diff_file_different_revs, test_diff_file_different_files,
   test_diff_file_no_change, test_diff_dir_different_revs,
   test_diff_dir_different_dirs, test_diff_dir_no_change,
   test_changeset_repos_creation): Remove extraneous '*args' lambda argument.

r1814454 | troycurtisjr | 2017-11-06 21:54:24 -0600 (Mon, 06 Nov 2017)

* build/ac-macros/swig.m4
  (SVN_FIND_SWIG): Ensure Python 3.0 is correctly detected as Python 3.

r1814387 | troycurtisjr | 2017-11-05 20:33:27 -0600 (Sun, 05 Nov 2017)

On branch swig-py3: Get swig bindings compiling with Python 3.

Add the necessary build tool support for choosing Python 3 or Python 2 to build
against, and get the bindings building under Python 3.

  Add a note about current known runtime issues under Python 3.

  (SWIG_PY_OPTS): New configuration variable.

* build.conf
  (swig-python-opts): Use the new SWIG_PY_OPTS variable for the swig python

  Add PYTHON to the influential environment variable list.
* build/ac-macros/swig.m4
  (SVN_FIND_SWIG): Choose appropriate SWIG_PY_OPTS based on the Python version

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
  Move the py3c.h include such that selected conflicting macros from swig can be
  undefined for use with this file.
  (svn_swig_py_as_file): Use correct PyObject_AsFileDescriptor instead of Python
    2's PyFile_AsFileDescriptor.

r1814386 | troycurtisjr | 2017-11-05 19:58:20 -0600 (Sun, 05 Nov 2017)

On branch swig-py3: Update swig python code to be compatible with both Python 2
and Python3.

Change non-generated python code to use syntax that is valid for both Python 3
and Python 2.7. Where this is not possible, provide compatibility wrappers.
Python 2 unit tests all pass after the changes, but more effort remains for full
Python 3 functionality.

* build/generator/swig/
  (_write_swig_interface_file): For Python3, include an encoding argument to

* build/generator/util/
  (output): Ensure the subprocess' output is interpreted as utf8 for proper
            Python 3 compatibility.

[in subversion/bindings/swig/python]

* svn/
  Import the builtin 'list' as '_bi_list' to aid in compatibility in other
  (_unprefix_names): Wrap dict.items() in list() for py2.7/3 support.
  (__all__): Change filter() to list comprehension for py2.7/3 support.

* svn/
  (__all__): Change filter() to list comprehension for py2.7/3 support. Use the
    _bi_list to provide a new list instance of locals on both Python 2.7 and 3.
* svn/
  (entries): Wrap dict.items() in _bi_list() for py2.7/3 support.

* tests/
  (test_open): Change deprecated assert_ to assertTrue.
  Change deprecated assertEquals to assertEqual and assert_ to assertTrue.

* tests/
  (setUp, test_log5, proplist_receiver_trunk, proplist_receiver_dir1,
   test_inherited_props, test_update4):
    Change deprecated assertEquals to assertEqual.
  (testBatonPlay): Change deprecated assertEquals to assertEqual and
    assertNotEquals to assertNotEqual.
  (test_log3_url, test_platform_providers):
    Change deprecated assert_ to assertTrue. 
  (test_log5): Change deprecated assert_ to assertTrue and assertEquals to

* tests/
  (test_config_enumerate2): Replace dict.iteritems() with dict.items() to be
    compatible with py2.7/3. Change deprecated assert_ to assertTrue.
  (test_config_enumerate_sections2): Change deprecated assert_ to assertTrue.

* tests/
  (testTxdeltaWindowT): Change deprecated assert_ to assertTrue.

* tests/
    Change deprecated assertEquals to assertEqual.
  (test_mergeinfo_leakage__incorrect_range_t_refcounts): Wrap dict.items() in
    list() for py2.7/3 support. Change deprecated assertEquals to assertEqual.
  (inspect_mergeinfo_dict): Change deprecated assert_ to assertTrue.
   Drop usage of dict.keys() for py2.7/3 support.

* tests/
  (test_get_dir2, test_delta_driver_commit, test_get_file_revs,
   test_lock, test_get_log2, test_namestring):
    Change deprecated assert_ to assertTrue.
  (test_delta_driver_commit): Wrap dict.items() in list() for py2.7/3 support.

* tests/
  (test_dump_fs2): Change deprecated assertEquals to assertEqual.
  (test_get_logs): Wrap dict.values() in list() for py2.7/3 support.

* tests/
  (suite): Do not use long() cast when running with Python 3.

* tests/
  Support correct import of StringIO and pathname2url from Python 2.7 and 3.
  (file_uri_for_path): Use unqualified pathname2url to support py2.7/3.

* tests/
  (test_is_adm_dir, test_set_adm_dir, test_status_editor,
    test_is_normal_prop, test_is_wc_prop, test_is_entry_prop):
    Change deprecated assert_ to assertTrue and failIf to assertFalse.
  (test_get_adm_dir, test_crawl_revisions2, test_check_wc, test_get_prop_diffs,
    Change deprecated assert_ with assertTrue.
  (test_commit): Change deprecated assertEquals to assertEqual.
  (test_diff_editor4): Wrap dict.items() in list() for py2.7/3 support.

* tests/trac/versioncontrol/
  (get_entries): Drop usage of dict.keys() for py2.7/3 support.
  (get_properties, get_changes): Wrap dict.items() with list() for py2.7/3
* tests/trac/versioncontrol/tests/
  Support correct import of StringIO and pathname2url from Python 2.7 and 3.
  (test_get_dir_entries, test_get_file_entries, test_get_node_history,
   test_get_node_history_follow_copy, test_get_path_history,
   test_get_path_history_copied_file, test_get_path_history_copied_dir,
   test_changeset_added_dirs, test_changeset_file_edit, test_changset_dir_moves,
    Replace the series of direct calls to .next() with assertSequenceEqual for
    py2.7/3 support.
  (test_diff_file_different_revs, test_diff_file_different_files,
   test_diff_file_no_change, test_diff_dir_different_revs,
    test_diff_dir_different_dirs, test_diff_dir_no_change,
    Replace <iter>.next() with next(<iter>) for py2.7/3 support.

r1813774 | troycurtisjr | 2017-10-30 09:58:34 -0500 (Mon, 30 Oct 2017)

On branch swig-py3: Remove py3c AC macro's implicit dependency on swig-python.

The py3c library is not necessarily tied to the python swig bindings, so don't
assume so in SVN_PY3C AC macro. Instead, add a check in the swig macro for
py3c library, and gracefully disable just the python bindings instead of
requiring all of swig to be disabled.

  Add a TODO to 'make swig-py' error more meaningful when py3c isn't available.

* build/ac-macros/py3c.m4
  (SVN_PY3C): Remove references to the swig bindings and remove the
  AC_MSG_ERROR, and fix checking of header compilability when prefix method
  is used.

* build/ac-macros/swig.m4
  (SVN_FIND_SWIG): Add a check for the py3c library in the python section and
  if not found, only disable the python bindings instead of all swig bindings.

r1813700 | troycurtisjr | 2017-10-29 13:10:30 -0500 (Sun, 29 Oct 2017)

On branch swig-py3: Add a branch specific README.


r1813665 | troycurtisjr | 2017-10-28 22:37:37 -0500 (Sat, 28 Oct 2017)

On branch swig-py3: Use py3c library in Python swig bindings.

Add the py3c Python compatibility library and update the python swig bindings
to use the compatibility functions that it provides. This is the first step to
getting the swig bindings to support Python 3.

* build/ac-macros/py3c.m4:
  Create a new ac-macro for the py3c library.

* aclocal.m4:
  Include the new py3c.m4 file.

* build/ac-macros/swig.m4:
  (SVN_FIND_SWIG): Call the new SVN_PY3C macro to add py3c to the build.

[in subversion/bindings/swig]

* include/svn_string.swg
  (python typemaps: RET_STRING): Replace PyString_FromStringAndSize with
  (python typemaps: (in) svn_stringbuf_t *,
   (in) const svn_string_t * (svn_string_t value)): 
     Replace PyString_Check with PyStr_Check and
     PyString_AS_STRING/PyString_GET_SIZE with PyStr_AsUTF8AndSize.
  (python typemaps: (out) svn_stringbuf_t *, 
                    (out) svn_string_t *):
     Replace PyString_FromStringAndSize with PyStr_FromStringAndSize.
  (python typemaps: (argout) const char **OUTPUT):
     Replace PyString_FromString with PyStr_FromString.

* include/svn_types.swg
  (python typemaps: (in) (const char *PTR, apr_size_t LEN)): 
    Replace PyString_Check with PyStr_Check and
    PyStr_AS_STRING/PyString_GET_SIZE with PyStr_AsUTF8AndSize.
  (python typemaps: (argout) unsigned char digest[ANY]): 
    Replace PyString_FromStringAndSize with PyStr_FromStringAndSize.
  (python typemaps: (in) const unsigned char *digest): 
    Replace PyString_AsString with PyStr_AsString.

* include/libsvn_swig_py/swigutil_py.h,
  Include py3c.h to pick up Python 2/3 compatibility defines.
  (svn_swig_py_as_file): Add new compatibility function.
  (svn_swig_py_unwrap_string): Add clarifying note to function.
     Replace PyString_FromString with PyStr_FromString.
     Replace PyString_AsString with PyStr_AsString.
  (make_string_from_ob, make_svn_string_from_ob):
     Replace PyString_Check with PyStr_Check.
     Replace PyString_FromStringAndSize with PyStr_FromStringAndSize.
     Replace PyFile_Check/PyFile_AsFile with svn_swig_py_as_file.
  (read_handler_pyio, ra_callbacks_get_wc_prop):
     Replace PyString_GET_SIZE/PyString_AS_STRING with PyStr_AsUTF8AndSize.
     Replace PyString_AS_STRING with PyStr_AsString and PyString_Check with

* core.i
  (python typemap: 
   (char *buffer, apr_size_t *len)): 
     Replace PyString_FromStringAndSize with PyStr_FromStringAndSize.
  (python typemap: 
   (const char *data, apr_size_t *len)): 
     Replace PyString_Check with PyStr_Check, and PyString_AS_STRING/
     PyString_GET_SIZE with PyStr_AsUTF8AndSize.
  (python typemap: 
   const void *value (apr_pool_t *_global_pool, PyObject *_global_py_pool)):
     Replace PyString_Check with PyStr_Check and PyString_AS_STRING with
  (python typemap: FILE *): Replace PyFile_AsFile with svn_swig_py_as_file.

* svn_client.i
  Include py3c.h to pick up Python 2/3 compatibility defines.
  (python typemap: (argout) apr_array_header_t **props):
    Replace PyString_FromStringAndSize with PyStr_FromStringAndSize.

* svn_delta.i,
  Include py3c.h to pick up Python 2/3 compatibility defines.

r1813663 | troycurtisjr | 2017-10-28 16:50:06 -0500 (Sat, 28 Oct 2017)

Revert unintended commit of WIP code.

* aclocal.m4:
  Back out premature addition of py3c.m4.

r1813662 | troycurtisjr | 2017-10-28 16:42:32 -0500 (Sat, 28 Oct 2017)

[Accidental commit, reverted in r1813663]

r1813660 | troycurtisjr | 2017-10-28 15:58:44 -0500 (Sat, 28 Oct 2017)

Create a branch to work on Python 3 compatibility for the swig bindings.

r1813114 | troycurtisjr | 2017-10-23 21:27:17 -0500 (Mon, 23 Oct 2017)

  (troycurtisjr) Add myself as partial committer for swig bindings.

r871532 | kfogel | 2008-05-26 16:21:08 -0500 (Mon, 26 May 2008)

Fix peg revision support for repository root urls to address issue
#3193.  Along the way, unify some aspects of peg revision parsing into
a new helper function.

Patch by: Troy Curtis Jr <>
(Only minor tweaks by me.)

* subversion/include/private/svn_opt_private.h
  (svn_opt__split_arg_at_peg_revision): New prototype.

* subversion/libsvn_subr/opt.c
  (svn_opt__split_arg_at_peg_revision): New function.
  (svn_opt_parse_path, svn_opt_args_to_target_array3): Replace in-line
    peg revision parsing with call to new function.

* subversion/libsvn_client/cmdline.c
  (svn_opt_args_to_target_array3): Same.

* subversion/include/svn_opt.h 
  (svn_opt_parse_path): Document error behavior more precisely.

* subversion/tests/cmdline/
  (basic_relative_url_with_peg_revisions): New test.
  (test_list): Run it.

r871091 | danielsh | 2008-05-04 12:09:51 -0500 (Sun, 04 May 2008)

Fix an assertion failure when a user inputs a non-canonical repository root
relative url.

Patch by: Troy Curtis Jr <>

* subversion/libsvn_client/cmdline.c
   (resolve_repos_relative_url): Avoid an assertion failure in svn_path_join()
   by replacing it with apr_pstrcat() so that there is not a requirement that
   the input arguments be canonical.  Also update the doc string to reflect

* subversion/tests/cmdline/
   (basic_relative_url_non_canonical): New test function.
   (test_list): Call the new test function.

r870934 | danielsh | 2008-04-30 00:09:28 -0500 (Wed, 30 Apr 2008)

Add some notes on the syntax of the repository root relative url support in
the svn command-line client.  Also include known issues with some shells'
special treatment of the '^' character.

Patch by: Troy Curtis Jr <>
(Tweaked by me to add examples and reserve '^' URLs.)

* notes/cli-repo-root-relative-support.txt: New file.

r870827 | julianfoad | 2008-04-22 10:21:36 -0500 (Tue, 22 Apr 2008)

Implement repository root relative url support for the svn command-line
client.  This allows the user to use '^/' in front of any target to
mean the repository root url.  The repository root url is determined by
checking the other arguments' root urls (if they exist) and using that common
url.  If none is found the root url of the current directory is used.  If no
common repository root url can be found, an error is generated.

Patch by: Troy Curtis Jr <>
(minor tweaks by me)

* subversion/include/private/svn_opt_private.h
  New file to hold inter-library svn_opt functions.
  (svn_opt__arg_canonicalize_url): New function prototype.
  (svn_opt__arg_canonicalize_path): New function prototype.

* subversion/include/svn_opt.h
  (svn_opt_args_to_target_array3): Change doc string to reflect deprecated

* subversion/libsvn_subr/opt.c
  (svn_opt__arg_canonicalize_url): New function to canonicalize user input
  (svn_opt__arg_canonicalize_path): New function to canonicalize user input
  (svn_opt_args_to_target_array3): Replace the inline canonicalization code
    with calls to the new svn_opt__arg_canonicalize_* functions.

* subversion/include/svn_client.h
  (svn_client_args_to_target_array): New function prototype.

* subversion/libsvn_client/cmdline.c
  New file for client library commandline processing functionality.
   check_root_url_of_target): New functions to support
  (svn_client_args_to_target_array): New client function to parse user
    arguments into a target array.  Replaces use of
    svn_opt_args_to_target_array3().  Remove the replicated knowledge of
    admin directory names, and, as a side effect, don't skip path names
    of "_svn" on systems that don't use that name for the admin dir.

* subversion/tests/libsvn_client/client-test.c
  (test_args_to_target_array): New test function.
  (test_funcs): Run new test function.

* subversion/tests/cmdline/
  (warn_on_reserved_name): Modify test to work right with the new

* subversion/tests/cmdline/
   basic_relative_url_using_current_dir): New test functions.
  (test_list): Run new test functions.

* subversion/svn/cl.h
  (svn_cl__args_to_target_array_print_reserved): Add client context parameter.

* subversion/svn/util.c
  (svn_cl__args_to_target_array_print_reserved): Replace call to
    svn_opt_args_to_target_array3() with svn_client_args_to_target_array().

* subversion/svn/update-cmd.c
  (svn_cl__update): Replace svn_opt_args_to_target_array3() with
    svn_cl__args_to_target_array_print_reserved() for consistency with the other
    command line functions.

* subversion/svn/diff-cmd.c
  (svn_cl__diff): Create a client context variable and use it in the
    svn_cl__args_to_target_array_print_reserved() function along with
    everywhere else it is needed.

* subversion/svn/add-cmd.c,
    Add client context variable to all the calls to

r867580 | jpeacock | 2007-10-30 17:29:14 -0500 (Tue, 30 Oct 2007)

Make many functions added since version 1.0 in the Client API visible
to users of the Perl bindings. They are already swig-wrapped, just not
exported. (issue 2646)

* subversion/bindings/swig/perl/native/
  Export more API functions.
  (POD Documentation): Added entries documenting dump_fs2 and load_fs2.

Patch by: Troy Curtis Jr <>
Approved by: dlr

r862063 | dlr | 2006-10-16 22:21:03 -0500 (Mon, 16 Oct 2006)

* contrib/client-side/mucc.c
  Add comment on how to build this client.

Suggested by: glasser
Found by: Troy Curtis Jr <>