Troy Curtis, Jr <troycurtisjr@gmail.com> (troycurtisjr)


Found Patch
r862063 r1815770, r1815768, r1814455, r1814454, r1814387, r1814386, r1813774, r1813700, r1813665, r1813663, r1813662, r1813660, r1813114, r871532, r871091, r870934, r870827, r867580

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/svn_fs.py,
  subversion/bindings/swig/python/tests/utils.py,
  subversion/bindings/swig/python/tests/wc.py
  (SubversionRepositoryTestSetup.setUp,
   SubversionWorkingCopyTestCase.test_get_pristine_copy_path,
   Temper.alloc_known_repo):
   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/svn_fs.py
  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.

* BRANCH-README
  Add a note about current known runtime issues under Python 3.

* Makefile.in
  (SWIG_PY_OPTS): New configuration variable.

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

* configure.ac
  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
    detected.

* 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/header_wrappers.py
  (_write_swig_interface_file): For Python3, include an encoding argument to
    tempfile.TemporaryFile()

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

[in subversion/bindings/swig/python]

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

* svn/client.py
  svn/delta.py
  svn/diff.py
  svn/fs.py
  svn/ra.py
  svn/repos.py
  svn/wc.py
  (__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/fs.py
  (entries): Wrap dict.items() in _bi_list() for py2.7/3 support.

* tests/auth.py
  (test_open): Change deprecated assert_ to assertTrue.
  (test_credentials_get_username,
   test_credentials_get_simple,
   test_credentials_get_ssl_client_cert,
   test_credentials_get_ssl_client_cert_pw,
   test_credentials_get_ssl_server_trust):
  Change deprecated assertEquals to assertEqual and assert_ to assertTrue.

* tests/client.py
  (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
    assertEqual.

* tests/core.py
  (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/delta.py
  (testTxdeltaWindowT): Change deprecated assert_ to assertTrue.

* tests/mergeinfo.py
  (test_rangelist_reverse,
   test_mergeinfo_leakage__incorrect_range_t_refcounts,
   test_mergeinfo_leakage__lingering_range_t_objects_after_del,
   inspect_mergeinfo_dict):
    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.
  (compare_mergeinfo_catalogs,
   compare_mergeinfos):
   Drop usage of dict.keys() for py2.7/3 support.

* tests/ra.py
  (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/repository.py
  (test_dump_fs2): Change deprecated assertEquals to assertEqual.
  (test_get_logs): Wrap dict.values() in list() for py2.7/3 support.

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

* tests/utils.py
  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/wc.py
  (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,
   test_get_ignores):
    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/svn_fs.py
  (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
    support.
  
* tests/trac/versioncontrol/tests/svn_fs.py
  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,
   test_changeset_file_copy):
    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,
    test_changeset_repos_creation):
    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.

* BRANCH-README
  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.

* BRANCH-README: New.



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
     PyStr_FromStringAndSize.
  (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/libsvn_swig_py/swigutil_py.c
  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.
  (svn_swig_py_svn_exception,
   svn_swig_py_propinheriteditemarray_to_dict,
   svn_swig_py_proparray_to_dict,
   svn_swig_py_locationhash_to_dict,
   svn_swig_py_c_strings_to_list,
   svn_swig_py_array_to_list,
   cstring_to_pystring,
   convert_string): 
     Replace PyString_FromString with PyStr_FromString.
  (make_string_from_ob,
   make_svn_string_from_ob,
   svn_swig_py_unwrap_string,
   ra_callbacks_get_client_string,
   exeception_to_error):
     Replace PyString_AsString with PyStr_AsString.
  (make_string_from_ob, make_svn_string_from_ob):
     Replace PyString_Check with PyStr_Check.
  (convert_svn_string_t,
   svn_swig_py_proparray_to_dict,
   ra_callbacks_push_or_set_wc_prop):
     Replace PyString_FromStringAndSize with PyStr_FromStringAndSize.
  (svn_swig_py_make_file):
     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.
  (svn_swig_py_get_commit_log_func):
     Replace PyString_AS_STRING with PyStr_AsString and PyString_Check with
     PyStr_Check.

* 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
     PyStr_AsString.
  (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,
  svn_diff.i,
  svn_fs.i,
  svn_ra.i,
  svn_repos.i,
  svn_wc.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)

* COMMITTERS:
  (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 <troycurtisjr@gmail.com>
(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_tests.py
  (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 <troycurtisjr@gmail.com>

* 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
   this.

* subversion/tests/cmdline/basic_tests.py
   (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 <troycurtisjr@gmail.com>
(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 <troycurtisjr@gmail.com>
(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
    status.

* subversion/libsvn_subr/opt.c
  (svn_opt__arg_canonicalize_url): New function to canonicalize user input
    urls.
  (svn_opt__arg_canonicalize_path): New function to canonicalize user input
    paths.
  (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.
  (arg_is_repos_relative_url,
   resolve_repos_relative_url,
   check_root_url_of_target): New functions to support
    svn_client_args_to_target_array.
  (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/special_tests.py
  (warn_on_reserved_name): Modify test to work right with the new
    svn_client_args_to_target_array().

* subversion/tests/cmdline/basic_tests.py
  (basic_relative_url_multi_repo,
   basic_relative_url_using_other_targets,
   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,
  subversion/svn/blame-cmd.c,
  subversion/svn/cat-cmd.c,
  subversion/svn/changelist-cmd.c,
  subversion/svn/checkout-cmd.c,
  subversion/svn/cleanup-cmd.c,
  subversion/svn/commit-cmd.c,
  subversion/svn/copy-cmd.c,
  subversion/svn/delete-cmd.c,
  subversion/svn/export-cmd.c,
  subversion/svn/import-cmd.c,
  subversion/svn/info-cmd.c,
  subversion/svn/list-cmd.c,
  subversion/svn/lock-cmd.c,
  subversion/svn/log-cmd.c,
  subversion/svn/merge-cmd.c,
  subversion/svn/mergeinfo-cmd.c,
  subversion/svn/mkdir-cmd.c,
  subversion/svn/move-cmd.c,
  subversion/svn/propdel-cmd.c,
  subversion/svn/propedit-cmd.c,
  subversion/svn/propget-cmd.c,
  subversion/svn/proplist-cmd.c,
  subversion/svn/propset-cmd.c,
  subversion/svn/resolve-cmd.c,
  subversion/svn/resolved-cmd.c,
  subversion/svn/revert-cmd.c,
  subversion/svn/status-cmd.c,
  subversion/svn/switch-cmd.c,
  subversion/svn/unlock-cmd.c
    Add client context variable to all the calls to
    svn_cl__args_to_target_array_print_reserved().


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/Repos.pm:
  Export more API functions.
  (POD Documentation): Added entries documenting dump_fs2 and load_fs2.

Patch by: Troy Curtis Jr <troycurtisjr@gmail.com>
          me
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 <troycurtisjr@gmail.com>