get-location-segments.py

Checkout Tools
  • last updated 12 mins ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Work towards Python 3 compatibility. Since we already require Python 2.7+,

we can use the new syntax without further limiting our Python 2 support.

* contrib/client-side/incremental-update.py

* contrib/client-side/svn_export_empty_files.py

* contrib/client-side/svnmerge/svnmerge.py

* contrib/hook-scripts/hook_toolbox.py

* contrib/hook-scripts/remove-zombie-locks.py

* contrib/server-side/add-needs-lock.py

* contrib/server-side/fsfsfixer/fixer/find_good_id.py

* contrib/server-side/fsfsfixer/fixer/fix-rev.py

* contrib/server-side/fsfsverify.py

* contrib/server-side/svn-tweak-author.py

* notes/directory-index/dirindex.py

* notes/move-tracking/path_pairs_to_eid_map.py

* subversion/tests/cmdline/svntest/main.py

* subversion/tests/cmdline/svntest/verify.py

* subversion/tests/manual/tree-conflicts-add-vs-add.py

* tools/client-side/mergeinfo-sanitizer.py

* tools/dev/benchmarks/RepoPerf/copy_repo.py

* tools/dev/benchmarks/suite1/benchmark.py

* tools/dev/gen-py-errors.py

* tools/dev/histogram.py

* tools/dev/sbox-ospath.py

* tools/dev/wc-format.py

* tools/dev/wc-ng/bump-to-19.py

* tools/dist/collect_sigs.py

* tools/examples/get-location-segments.py

* tools/server-side/svnpredumpfilter.py

* tools/server-side/svnpubsub/irkerbridge.py

* tools/server-side/svnpubsub/svntweet.py

(): Replace occurances of Python 2 print statements with calls to the

Python 3 style print function. Note that this is not exhaustive

and there are still several non-trival uses of print statements

not covered by this patch.

  1. … 27 more files in changeset.
Work towards Python 3 compatibility. Since we already require Python 2.7+,

we can use the new syntax without further limiting our Python 2 support.

* contrib/client-side/incremental-update.py

* contrib/client-side/svn_apply_autoprops.py

* contrib/client-side/svnmerge/svnmerge-migrate-history.py

* contrib/client-side/svnmerge/svnmerge-migrate-history-remotely.py

* contrib/client-side/svnmerge/svnmerge.py

* contrib/client-side/svnmerge/svnmerge_test.py

* contrib/server-side/add-needs-lock.py

* contrib/server-side/fsfsfixer/fixer/fix-rev.py

* contrib/server-side/fsfsverify.py

* contrib/server-side/svn-tweak-author.py

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

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

* subversion/tests/cmdline/svntest/actions.py

* subversion/tests/cmdline/svntest/main.py

* subversion/tests/cmdline/svntest/objects.py

* subversion/tests/cmdline/svntest/wc.py

* subversion/tests/cmdline/upgrade_tests.py

* tools/client-side/change-svn-wc-format.py

* tools/client-side/mergeinfo-sanitizer.py

* tools/dev/contribulyze.py

* tools/dev/gen-javahl-errors.py

* tools/dev/gen_junit_report.py

* tools/dev/graph-dav-servers.py

* tools/dev/iz/ff2csv.py

* tools/dev/iz/find-fix.py

* tools/dev/wc-ng/bump-to-19.py

* tools/dev/wc-ng/populate-pristine.py

* tools/dev/which-error.py

* tools/examples/get-location-segments.py

* tools/hook-scripts/svn2feed.py

* tools/hook-scripts/svnperms.py

* tools/po/l10n-report.py

* tools/server-side/fsfs-reshard.py

* tools/server-side/svn-backup-dumps.py

* tools/server-side/svnpredumpfilter.py

* tools/server-side/svnpubsub/daemonize.py

* tools/server-side/test_svn_server_log_parse.py

(): Replace all occurances of "except Type, variable:" with Python 3

style "except Type as variable".

  1. … 36 more files in changeset.
Let the get-location-segments.py example pass a proper config to

svn_auth_get_platform_specific_client_providers.

This call was introduced in r1241530, but it did not properly pass a

configuration option.

* tools/examples/get-location-segments.py

(main): Pass config to

svn_auth_get_platform_specific_client_providers.

Patch by: Matthijs Kooijman

Allow setting the SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC

authentication parameter from the perl, python and ruby bindings.

This parameter cannot be set using the regular svn_auth_set_parameter

function, since the function from perl/python/ruby space must be wrapped

in a C function to allow it to be called. For this reason, a new

function, svn_auth_set_gnome_keyring_unlock_prompt_func, is introduced

(in the bindings only).

[in subversion/bindings/swig]

* core.i

(svn_auth_set_gnome_keyring_unlock_prompt_func): Add function and

setup corresponding authprompt_callback_typemap.

* perl/libsvn_swig_perl/swigutil_pl.c,

perl/libsvn_swig_perl/swigutil_pl.h

(svn_swig_pl_thunk_gnome_keyring_unlock_prompt): Add function (called

by authprompt_callback_typemap)

* python/libsvn_swig_py/swigutil_py.c

python/libsvn_swig_py/swigutil_py.h

(svn_swig_py_auth_gnome_keyring_unlock_prompt_func): Add function

(called by authprompt_callback_typemap)

* ruby/libsvn_swig_ruby/swigutil_rb.c,

ruby/libsvn_swig_ruby/swigutil_rb.h

(svn_swig_rb_auth_gnome_keyring_unlock_prompt_func): Add function

(called by authprompt_callback_typemap)

* perl/native/t/3client.t,

python/tests/client.py

Add test for svn_auth_set_gnome_keyring_unlock_prompt_func.

[in tools/examples]

* get-location-segments.py,

info.rb

Use the new svn_auth_set_gnome_keyring_unlock_prompt_func function.

Patch by: Matthijs Kooijman <matthijs@stdin.nl>

  1. … 10 more files in changeset.
Fix the python bindings for svn_auth_get_platform_specific_client_providers.

The bindings were present, but due to a missing argout typemap for

apr_array_header_t **providers, they threw a not implemented error. This

was fixed for perl in r1035745, but was still broken for python and

ruby. (The ruby bindings will be fixed in a separate commit.)

[in subversion/bindings/swig]

* include/svn_containers.swg

(apr_array_header_t **RANGELIST):

Track rename.

(apr_array_header_t **providers):

New SWIGPYTHON typemap.

* python/libsvn_swig_py/swigutil_py.c

(convert_rangelist): Rename to..

(convert_pointerlist): .. this.

Use 'void *' instead of a concrete pointer type for the array elements.

(svn_swig_py_ranglist_to_list): Rename to..

(svn_swig_py_pointerlist_to_list): .. this.

(svn_swig_py_mergeinfo_to_dict):

Track renames.

* python/libsvn_swig_py/swigutil_py.h

(svn_swig_py_ranglist_to_list): Rename to..

(svn_swig_py_pointerlist_to_list): .. this.

* python/test/client.py

(test_platform_providers): Add testcase.

* tools/examples/get-location-segments.py

(main): Use svn_auth_get_platform_specific_client_providers.

Patch by: Matthijs Kooijman <matthijs@stdin.nl>

  1. … 4 more files in changeset.
Fix the swig-py examples.

When trying to run the get-location-segments.py, it throws:

TypeError: Unexpected NULL parent pool on proxy object

Somehow, the "_parent_pool" property wasn't initialized on the context.

Not sure how this works, but creating a context using

client.svn_client_create_context() instead of client.ctx_t() (which

subversion/bindings/swig/python/tests/pool.py also does) fixes this

error and makes the example work again.

* tools/examples/get-location-segments.py

(main): Use client.svn_client_create_context instead of client.ctx_t.

* tools/examples/SvnCLBrowse

(SvnCLBrowse.__init__): Same.

Patch by: Matthijs Kooijman <matthijs@stdin.nl>

(SvnCLBrowse part by me)

  1. … 1 more file in changeset.
get-location-segments.py script would now work for self-signed ssl servers too

* tools/examples/get-location-segments.py

(main): added few auth providers to enable authenticating

against self-signed ssl servers too (in interactive mode).

(prompt_func_ssl_unknown_cert): new callback function

(prompt_func_simple_prompt): new callback function

Patch by: Prabhu Gnana Sundar <prabhugs{_AT_}collab.net>

Reviewed by: me

Apply ASF license headers to a number of files included under that license

but lacking said header.

Patch by: Niall Pemberton <niallp{_AT_}apache.org>

  1. … 175 more files in changeset.
Python 3 compatibility:

Update calls to print() in 'tools' directory.

* tools/backup/hot-backup.py.in:

* tools/bdb/erase-all-text-data.py:

* tools/bdb/svn-bdb-view.py:

* tools/bdb/whatis-rep.py:

* tools/client-side/change-svn-wc-format.py:

* tools/client-side/server-version.py:

* tools/dev/check-license.py:

* tools/dev/contribulyze.py:

* tools/dev/datecheck.py:

* tools/dev/gen-javahl-errors.py:

* tools/dev/graph-dav-servers.py:

* tools/dev/iz/ff2csv.py:

* tools/dev/iz/find-fix.py:

* tools/dev/mlpatch.py:

* tools/dev/normalize-dump.py:

* tools/dev/po-merge.py:

* tools/dev/random-commits.py:

* tools/dev/scramble-tree.py:

* tools/dev/svn-merge-revs.py:

* tools/dev/verify-history.py:

* tools/dev/which-error.py:

* tools/dist/gen_nightly_ann.py:

* tools/dist/getsigs.py:

* tools/dist/post-to-tigris.py:

* tools/dist/write-announcement.py:

* tools/examples/blame.py:

* tools/examples/check-modified.py:

* tools/examples/dumpprops.py:

* tools/examples/getfile.py:

* tools/examples/get-location-segments.py:

* tools/examples/geturl.py:

* tools/examples/putfile.py:

* tools/examples/revplist.py:

* tools/examples/svnlook.py:

* tools/examples/svnshell.py:

* tools/hook-scripts/mailer/tests/mailer-tweak.py:

* tools/hook-scripts/svn2feed.py:

* tools/po/l10n-report.py:

* tools/server-side/fsfs-reshard.py:

* tools/server-side/svn-backup-dumps.py: Call print() or file.write().

  1. … 39 more files in changeset.
Python 3 compatibility:

Update raise statements.

* build/generator/gen_base.py:

* subversion/bindings/swig/python/svn/repos.py:

* subversion/bindings/swig/python/tests/trac/versioncontrol/main.py:

* subversion/bindings/swig/python/tests/trac/versioncontrol/svn_fs.py:

* subversion/tests/cmdline/blame_tests.py:

* subversion/tests/cmdline/log_tests.py:

* tools/examples/get-location-segments.py:

* tools/hook-scripts/svnperms.py:

* tools/server-side/fsfs-reshard.py:

* tools/server-side/svn-backup-dumps.py:

* win-tests.py: Use 'raise exception("string")' instead of

'raise exception, "string"'.

  1. … 10 more files in changeset.
Housekeeping: In the spirit of r26317, remove trailing whitespace in our

repository.

(This touches files in various and sundry parts of the tree, which I shan't

enumerate here.)

  1. … 93 more files in changeset.
SWIG/Python: A follow-up to r20229, restoring backwards compatibility

for bindings constant names.

* subversion/bindings/swig/python/svn/core.py

(SVN_INVALID_REVNUM, SVN_IGNORED_REVNUM): Uppercase constant names.

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

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

* tools/examples/get-location-segments.py

Account for renames of constants.

Found by: cmpilato

  1. … 3 more files in changeset.
* tools/examples/get-location-segments.py: New example (which I was using to

test the svn_ra_get_location_segments() API).