Author: dsahlberg
Date: Thu Feb 1 20:04:07 2024
New Revision: 1915519
URL: http://svn.apache.org/viewvc?rev=1915519&view=rev
Log:
On branch pristine-checksum-salt:
Catchup merge with trunk
Added:
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/python/tests/data/repository-deltas.dump
- copied unchanged from r1915518,
subversion/trunk/subversion/bindings/swig/python/tests/data/repository-deltas.dump
subversion/branches/pristine-checksum-salt/tools/dev/awk/
- copied from r1915518, subversion/trunk/tools/dev/awk/
subversion/branches/pristine-checksum-salt/tools/dev/hash-test.c
- copied unchanged from r1915518, subversion/trunk/tools/dev/hash-test.c
subversion/branches/pristine-checksum-salt/tools/hook-scripts/mailer/tests/README.md
- copied unchanged from r1915518,
subversion/trunk/tools/hook-scripts/mailer/tests/README.md
subversion/branches/pristine-checksum-salt/tools/hook-scripts/mailer/tests/mailer-t2.sh
- copied unchanged from r1915518,
subversion/trunk/tools/hook-scripts/mailer/tests/mailer-t2.sh
subversion/branches/pristine-checksum-salt/tools/hook-scripts/mailer/tests/t2-reference/
- copied from r1915518,
subversion/trunk/tools/hook-scripts/mailer/tests/t2-reference/
Removed:
subversion/branches/pristine-checksum-salt/tools/dev/iz/
Modified:
subversion/branches/pristine-checksum-salt/ (props changed)
subversion/branches/pristine-checksum-salt/CHANGES
subversion/branches/pristine-checksum-salt/COMMITTERS
subversion/branches/pristine-checksum-salt/INSTALL
subversion/branches/pristine-checksum-salt/Makefile.in
subversion/branches/pristine-checksum-salt/NOTICE
subversion/branches/pristine-checksum-salt/build.conf
subversion/branches/pristine-checksum-salt/build/ac-macros/swig.m4
subversion/branches/pristine-checksum-salt/build/generator/gen_win.py
subversion/branches/pristine-checksum-salt/build/generator/gen_win_dependencies.py
subversion/branches/pristine-checksum-salt/build/generator/swig/__init__.py
subversion/branches/pristine-checksum-salt/build/get-py-info.py
subversion/branches/pristine-checksum-salt/build/run_tests.py
subversion/branches/pristine-checksum-salt/build/transform_sql.py
subversion/branches/pristine-checksum-salt/configure.ac
subversion/branches/pristine-checksum-salt/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in
subversion/branches/pristine-checksum-salt/contrib/hook-scripts/check-mime-type.pl
subversion/branches/pristine-checksum-salt/contrib/server-side/fsfsverify.py
subversion/branches/pristine-checksum-salt/subversion/bindings/javahl/README
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/INSTALL
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/include/svn_containers.swg
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/python/svn/delta.py
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/python/svn/fs.py
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/python/svn/repos.py
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/python/tests/delta.py
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/python/tests/fs.py
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/python/tests/repository.py
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/python/tests/wc.py
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/svn_delta.i
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/svn_repos.i
subversion/branches/pristine-checksum-salt/subversion/include/svn_wc.h
subversion/branches/pristine-checksum-salt/subversion/libsvn_client/copy.c
subversion/branches/pristine-checksum-salt/subversion/libsvn_client/externals.c
subversion/branches/pristine-checksum-salt/subversion/libsvn_repos/load-fs-vtable.c
subversion/branches/pristine-checksum-salt/subversion/libsvn_repos/reporter.c
subversion/branches/pristine-checksum-salt/subversion/libsvn_subr/io.c
subversion/branches/pristine-checksum-salt/subversion/libsvn_subr/sysinfo.c
subversion/branches/pristine-checksum-salt/subversion/libsvn_subr/version.c
subversion/branches/pristine-checksum-salt/subversion/libsvn_wc/revert.c
subversion/branches/pristine-checksum-salt/subversion/libsvn_wc/workqueue.c
subversion/branches/pristine-checksum-salt/subversion/svn/cl.h
subversion/branches/pristine-checksum-salt/subversion/svn/info-cmd.c
subversion/branches/pristine-checksum-salt/subversion/svn/notify.c
subversion/branches/pristine-checksum-salt/subversion/svn/svn.c
subversion/branches/pristine-checksum-salt/subversion/svnbench/notify.c
subversion/branches/pristine-checksum-salt/subversion/svnmucc/svnmucc.c
subversion/branches/pristine-checksum-salt/subversion/svnserve/svnserve.c
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/basic_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/changelist_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/checkout_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/copy_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/diff_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/getopt_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/info_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/legacy/utf8_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/lock_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/log_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/merge_authz_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/merge_automatic_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/merge_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/merge_tree_conflict_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/patch_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/prop_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/special_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/stat_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/store_pristine_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/svnadmin_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/svnfsfs_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/svnmover_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/svnmucc_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/svntest/actions.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/svntest/main.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/svntest/verify.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/svntest/wc.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/trans_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/update_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/cmdline/upgrade_tests.py
subversion/branches/pristine-checksum-salt/subversion/tests/libsvn_subr/
(props changed)
subversion/branches/pristine-checksum-salt/tools/dev/unix-build/Makefile.svn
subversion/branches/pristine-checksum-salt/tools/dist/README.backport
subversion/branches/pristine-checksum-salt/tools/dist/make-keys.sh
subversion/branches/pristine-checksum-salt/tools/dist/release-lines.yaml
subversion/branches/pristine-checksum-salt/tools/dist/release.py
subversion/branches/pristine-checksum-salt/tools/hook-scripts/mailer/mailer.py
subversion/branches/pristine-checksum-salt/tools/hook-scripts/mailer/tests/
(props changed)
Propchange: subversion/branches/pristine-checksum-salt/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Feb 1 20:04:07 2024
@@ -32,10 +32,12 @@ Release
release_win32
release_win32_static
release_x64
+release_ARM64
Debug
debug_win32
debug_win32_static
debug_x64
+debug_ARM64
ipch
subversion_msvc.dsw
subversion_msvc.ncb
Propchange: subversion/branches/pristine-checksum-salt/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1908636-1915518
Modified: subversion/branches/pristine-checksum-salt/CHANGES
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/CHANGES?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
--- subversion/branches/pristine-checksum-salt/CHANGES (original)
+++ subversion/branches/pristine-checksum-salt/CHANGES Thu Feb 1 20:04:07 2024
@@ -11,6 +11,42 @@ https://svn.apache.org/repos/asf/subvers
- Client-side improvements and bugfixes:
* Support multiple working copy formats (1.8-onward, 1.15) (issue #????)
+ - Other tool improvements and bugfixes:
+ * When building on Unix, change default configure option to enable support
+ for the simple (plaintext) credential store unless disabled at configure
+ time with --disable-plaintext-password-storage. This reverts r1845377
+ (r1909351).
+
+Version 1.14.3
+(20 Dec 2023, from /branches/1.14.x)
+https://svn.apache.org/repos/asf/subversion/tags/1.14.3
+ User-visible changes:
+ - Client-side bugfixes:
+ * Fix svn:mergeinfo diff parser bug when parsing forward merges (r1906502)
+ * Fix redirected URL handling with file externals (r1908926, issue #4911)
+
+ - Server-side bugfixes:
+ (none)
+
+ Developer-visible changes:
+ * swig-rb: Fix uses of 'File.exist?', deprecated since Ruby 2.1 (r1904472)
+ * Build: Fix uses of deprecated Python APIs (r1900882, issue #4899)
+ * Build: Retain ability to build SWIG Python 2 bindings (r1900890)
+ * Fix reading WC lock status with svn_wc_status2_t (r1904193, issue #4908)
+ * JavaHL: Add @Deprecated to silence compiler warnings (r1904936)
+ * JavaHL: Fix crash in case of null message in getMessage (r1904938)
+ * Fix build breakage of release tarballs by installed swig (r1878379 et al)
+ * Add regression test for issue #4711 "invalid xml file" (r1877310)
+ * swig-py: Fix building with SWIG 4.1.0 (r1904167)
+ * Makefile.in: Fix cleaning of __pycache__ dirs and *.pyc (r1903267)
+ * swig-py: Avoid deprecated options to SWIG >= 4.1.0 (r1904198, r1904287)
+ * swig-py: Use sysconfig to allow building with Python 3.12 (r1910098)
+ * INSTALL: Document not to use SVN with APR 1.7.3 on Windows (r1911278)
+ * Fix test suite broken by syntax error when --enable-sasl (r1907124)
+ * swig-py: Fix issues #4916, #4917, #4918 (r1912500 et al)
+ * swig-py: Improve error when no external diff (r1912724, -743, issue
#1778)
+ * autogen.sh: Fix building when Python is not named "python" (r1903245)
+
Version 1.14.2
(12 Apr 2022, from /branches/1.14.x)
User-visible changes:
Modified: subversion/branches/pristine-checksum-salt/COMMITTERS
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/COMMITTERS?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
--- subversion/branches/pristine-checksum-salt/COMMITTERS [UTF-8] (original)
+++ subversion/branches/pristine-checksum-salt/COMMITTERS [UTF-8] Thu Feb 1
20:04:07 2024
@@ -60,12 +60,12 @@ Blanket commit access:
kotkov Evgeny Kotkov <[email protected]>
astieger Andreas Stieger <[email protected]>
jamessan James McCoy <[email protected]>
- luke1410 Stefan Hett <[email protected]>
troycurtisjr Troy Curtis, Jr <[email protected]>
hartmannathan Nathan Hartman <[email protected]>
futatuki Yasuhito Futatsuki <[email protected]>
jun66j5 Jun Omae <[email protected]>
dsahlberg Daniel Sahlberg <[email protected]>
+ vinc17 Vincent Lefevre <[email protected]>
[[END ACTIVE FULL COMMITTERS. LEAVE THIS LINE HERE; SCRIPTS LOOK FOR IT.]]
@@ -84,6 +84,7 @@ Full committers who have asked to be lis
naked Nuutti Kotivuori <[email protected]>
ringstrom Tobias Ringström <[email protected]>
ivan Ivan Zhakov <[email protected]>
+ luke1410 Stefan Hett <[email protected]>
Partial committers who have asked to be listed as dormant:
Modified: subversion/branches/pristine-checksum-salt/INSTALL
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/INSTALL?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
--- subversion/branches/pristine-checksum-salt/INSTALL (original)
+++ subversion/branches/pristine-checksum-salt/INSTALL Thu Feb 1 20:04:07 2024
@@ -242,22 +242,42 @@ I. INTRODUCTION
$ ./configure --with-apr=/usr/local/apache2 \
--with-apr-util=/usr/local/apache2 ...
- Be sure to use a native Windows SVN client (as opposed to
- Cygwin's version) so that the .dsp files get carriage-returns at
- the ends of their lines. Otherwise Visual Studio will complain
- that it doesn't recognize the .dsp files.
-
- If you use APR libraries checked out from svn in an Unix
- environment, you need to run the 'buildconf' script in each
- library's directory, to regenerate the configure scripts and
- other files required for compiling the libraries:
+ Notes on Windows platforms:
- $ cd apr; ./buildconf; ./configure ...; make; make install; cd ..
-
- $ cd apr-util; ./buildconf; ./configure ...; make; make install; cd ..
-
- Configure build and install both libraries before running Subversion's
- configure script.
+ * Do not use APR version 1.7.3 as that release contains a bug that
+ makes it impossible for Subversion to use it properly. This issue
+ only affects APR builds on Windows. This issue was fixed in APR
+ version 1.7.4. See:
+ https://lists.apache.org/thread/xd5t922jvb9423ph4j84rsp5fxks1k0z
+
+ * If you check out APR and APR-util sources from their Subversion
+ repository, be sure to use a native Windows SVN client (as opposed
+ to Cygwin's version) so that the .dsp files get carriage-returns at
+ the ends of their lines. Otherwise Visual Studio will complain that
+ it doesn't recognize the .dsp files.
+
+ Notes on Unix platforms:
+
+ * If you check out APR and APR-util sources from their Subversion
+ repository, you need to run the 'buildconf' script in each library's
+ directory to regenerate the configure scripts and other files
+ required for compiling the libraries. Afterwards, configure, build,
+ and install both libraries before running Subversion's configure
+ script. For example:
+
+ $ cd apr
+ $ ./buildconf
+ $ ./configure <options...>
+ $ make
+ $ make install
+ $ cd ..
+
+ $ cd apr-util
+ $ ./buildconf
+ $ ./configure <options...>
+ $ make
+ $ make install
+ $ cd ..
2. SQLite (REQUIRED)
Modified: subversion/branches/pristine-checksum-salt/Makefile.in
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/Makefile.in?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
--- subversion/branches/pristine-checksum-salt/Makefile.in (original)
+++ subversion/branches/pristine-checksum-salt/Makefile.in Thu Feb 1 20:04:07
2024
@@ -288,6 +288,7 @@ libsvn_diff_LDFLAGS = @libsvn_diff_LDFLA
libsvn_fs_LDFLAGS = @libsvn_fs_LDFLAGS@
libsvn_fs_base_LDFLAGS = @libsvn_fs_base_LDFLAGS@
libsvn_fs_fs_LDFLAGS = @libsvn_fs_fs_LDFLAGS@
+libsvn_fs_x_LDFLAGS = @libsvn_fs_x_LDFLAGS@
libsvn_fs_util_LDFLAGS = @libsvn_fs_util_LDFLAGS@
libsvn_ra_LDFLAGS = @libsvn_ra_LDFLAGS@
libsvn_ra_local_LDFLAGS = @libsvn_ra_local_LDFLAGS@
Modified: subversion/branches/pristine-checksum-salt/NOTICE
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/NOTICE?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
--- subversion/branches/pristine-checksum-salt/NOTICE (original)
+++ subversion/branches/pristine-checksum-salt/NOTICE Thu Feb 1 20:04:07 2024
@@ -1,5 +1,5 @@
Apache Subversion
-Copyright 2022 The Apache Software Foundation
+Copyright 2023 The Apache Software Foundation
This product includes software developed by many people, and distributed
under Contributor License Agreements to The Apache Software Foundation
Modified: subversion/branches/pristine-checksum-salt/build.conf
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/build.conf?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
--- subversion/branches/pristine-checksum-salt/build.conf (original)
+++ subversion/branches/pristine-checksum-salt/build.conf Thu Feb 1 20:04:07
2024
@@ -1337,7 +1337,7 @@ msvc-force-static = yes
description = Test Sqlite query evaluation
type = exe
path = subversion/tests/libsvn_wc
-sources = wc-queries-test.c
+sources = wc-queries-test.c ../../libsvn_subr/sqlite3wrapper.c
install = test
libs = libsvn_test libsvn_wc libsvn_subr apriconv apr sqlite
Modified: subversion/branches/pristine-checksum-salt/build/ac-macros/swig.m4
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/build/ac-macros/swig.m4?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
--- subversion/branches/pristine-checksum-salt/build/ac-macros/swig.m4
(original)
+++ subversion/branches/pristine-checksum-salt/build/ac-macros/swig.m4 Thu Feb
1 20:04:07 2024
@@ -116,7 +116,7 @@ AC_DEFUN(SVN_DETERMINE_SWIG_OPTS,
SWIG_PY_OPTS="none"
SWIG_PY_ERRMSG="check config.log for details"
if test "$SWIG_PY_PYTHON" = "none"; then
- SWIG_PY_ERRMSG="You specfied not to build Python bindings or \
+ SWIG_PY_ERRMSG="You specified not to build Python bindings or \
suitable Python interpreter is not found."
else
if test "$SWIG" = "none"; then
@@ -217,7 +217,7 @@ suitable Python interpreter is not found
SWIG_PL_ERRMSG="check config.log for details"
if test "$SWIG_PL_PERL" = "none"; then
- SWIG_PL_ERRMSG="You specfied not to build Perl bindings or \
+ SWIG_PL_ERRMSG="You specified not to build Perl bindings or \
suitable Perl interpreter is not found."
else
if test "$SWIG" = "none"; then
@@ -246,12 +246,16 @@ suitable Perl interpreter is not found."
SWIG_RB_LINK="none"
SWIG_RB_ERRMSG="check config.log for details"
if test "$SWIG_RB_RUBY" = "none"; then
- SWIG_RB_ERRMSG="You specfied not to build Ruby bindings or \
+ SWIG_RB_ERRMSG="You specified not to build Ruby bindings or \
suitable Ruby interpreter is not found."
else
if test "$SWIG" = "none"; then
AC_MSG_WARN([You specified to build SWIG Ruby bindings, but SWIG is
not found.])
SWIG_RB_ERRMSG="SWIG is need to build SWIG Ruby bindings, but it is
not found."
+ elif test x"$SWIG_VERSION" = x"4""02""000"; then
+ ruby_swig_issue_2751='https://github.com/swig/swig/issues/2751'
+ AC_MSG_WARN([Ruby bindings cannot be built with swig 4.2.0; see
$ruby_swig_issue_2751])
+ SWIG_RB_ERRMSG="SWIG 4.2.0 was found but it cannot be used for
building SWIG Ruby bindings."
else
if test x"$SWIG_VERSION" = x"3""00""008"; then
# Use a local variable to escape the '#' sign.
@@ -382,7 +386,7 @@ int main()
SWIG_PY_OPTS="none"
SWIG_PY_ERRMSG="check config.log for details"
if test "$SWIG_PY_PYTHON" = "none"; then
- SWIG_PY_ERRMSG="You specfied not to build Python bindings or \
+ SWIG_PY_ERRMSG="You specified not to build Python bindings or \
suitable Python interpreter is not found."
else
AC_MSG_NOTICE([Configuring python swig binding])
@@ -439,7 +443,7 @@ suitable Python interpreter is not found
SWIG_PL_ERRMSG="check config.log for details"
if test "$SWIG_PL_PERL" = "none"; then
- SWIG_PL_ERRMSG="You specfied not to build Perl bindings or \
+ SWIG_PL_ERRMSG="You specified not to build Perl bindings or \
suitable Perl interpreter is not found."
else
AC_MSG_CHECKING([perl version])
@@ -463,7 +467,7 @@ suitable Perl interpreter is not found."
SWIG_RB_LINK="none"
SWIG_RB_ERRMSG="check config.log for details"
if test "$SWIG_RB_RUBY" = "none"; then
- SWIG_RB_ERRMSG="You specfied not to build Ruby bindings or \
+ SWIG_RB_ERRMSG="You specified not to build Ruby bindings or \
suitable Ruby interpreter is not found."
else
rbconfig="$SWIG_RB_RUBY -rrbconfig -e "
Modified: subversion/branches/pristine-checksum-salt/build/generator/gen_win.py
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/build/generator/gen_win.py?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
--- subversion/branches/pristine-checksum-salt/build/generator/gen_win.py
(original)
+++ subversion/branches/pristine-checksum-salt/build/generator/gen_win.py Thu
Feb 1 20:04:07 2024
@@ -574,7 +574,7 @@ class WinGeneratorBase(gen_win_dependenc
# This section parses those dependencies and adds them to the dependency
list
# for this target.
if name.startswith('javahl') or name == 'libsvnjavahl':
- for dep in re.findall('\$\(([^\)]*)_DEPS\)', target.add_deps):
+ for dep in re.findall(r'\$\(([^\)]*)_DEPS\)', target.add_deps):
dep = dep.replace('_', '-')
depends.extend(self.sections[dep].get_targets())
@@ -728,7 +728,7 @@ class WinGeneratorBase(gen_win_dependenc
for dep in self.get_win_depends(target, FILTER_EXTERNALLIBS):
if dep.external_lib:
- for elib in re.findall('\$\(SVN_([^\)]*)_LIBS\)', dep.external_lib):
+ for elib in re.findall(r'\$\(SVN_([^)]*)_LIBS\)', dep.external_lib):
external_lib = elib.lower()
if external_lib in self._libraries:
@@ -758,7 +758,7 @@ class WinGeneratorBase(gen_win_dependenc
for dep in self.get_win_depends(target, FILTER_EXTERNALLIBS):
if dep.external_lib:
- for elib in re.findall('\$\(SVN_([^\)]*)_LIBS\)', dep.external_lib):
+ for elib in re.findall(r'\$\(SVN_([^)]*)_LIBS\)', dep.external_lib):
external_lib = elib.lower()
if external_lib in self._libraries:
@@ -833,7 +833,7 @@ class WinGeneratorBase(gen_win_dependenc
for dep in self.get_win_depends(target, FILTER_LIBS):
if dep.external_lib:
- for elib in re.findall('\$\(SVN_([^\)]*)_LIBS\)', dep.external_lib):
+ for elib in re.findall(r'\$\(SVN_([^)]*)_LIBS\)', dep.external_lib):
external_lib = elib.lower()
if external_lib not in self._libraries:
@@ -887,7 +887,7 @@ class WinGeneratorBase(gen_win_dependenc
nondeplibs.extend(dep.msvc_libs)
if dep.external_lib:
- for elib in re.findall('\$\(SVN_([^\)]*)_LIBS\)', dep.external_lib):
+ for elib in re.findall(r'\$\(SVN_([^)]*)_LIBS\)', dep.external_lib):
external_lib = elib.lower()
@@ -938,7 +938,7 @@ class WinGeneratorBase(gen_win_dependenc
for dep in self.get_win_depends(target, FILTER_EXTERNALLIBS):
if dep.external_lib:
- for elib in re.findall('\$\(SVN_([^\)]*)_LIBS\)', dep.external_lib):
+ for elib in re.findall(r'\$\(SVN_([^)]*)_LIBS\)', dep.external_lib):
external_lib = elib.lower()
if external_lib in self._libraries:
Modified:
subversion/branches/pristine-checksum-salt/build/generator/gen_win_dependencies.py
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/build/generator/gen_win_dependencies.py?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
---
subversion/branches/pristine-checksum-salt/build/generator/gen_win_dependencies.py
(original)
+++
subversion/branches/pristine-checksum-salt/build/generator/gen_win_dependencies.py
Thu Feb 1 20:04:07 2024
@@ -235,22 +235,22 @@ class GenDependenciesBase(gen_base.Gener
elif opt == '-D':
self.cpp_defines.append(val)
elif opt == '--vsnet-version':
- if val == '2002' or re.match('^7(\.\d+)?$', val):
+ if val == '2002' or re.match(r'^7(\.\d+)?$', val):
self.vs_version = '2002'
self.sln_version = '7.00'
self.vcproj_version = '7.00'
self.vcproj_extension = '.vcproj'
- elif val == '2003' or re.match('^8(\.\d+)?$', val):
+ elif val == '2003' or re.match(r'^8(\.\d+)?$', val):
self.vs_version = '2003'
self.sln_version = '8.00'
self.vcproj_version = '7.10'
self.vcproj_extension = '.vcproj'
- elif val == '2005' or re.match('^9(\.\d+)?$', val):
+ elif val == '2005' or re.match(r'^9(\.\d+)?$', val):
self.vs_version = '2005'
self.sln_version = '9.00'
self.vcproj_version = '8.00'
self.vcproj_extension = '.vcproj'
- elif val == '2008' or re.match('^10(\.\d+)?$', val):
+ elif val == '2008' or re.match(r'^10(\.\d+)?$', val):
self.vs_version = '2008'
self.sln_version = '10.00'
self.vcproj_version = '9.00'
@@ -290,14 +290,14 @@ class GenDependenciesBase(gen_base.Gener
self.sln_version = '12.00'
self.vcproj_version = '14.3'
self.vcproj_extension = '.vcxproj'
- elif re.match('^20\d+$', val):
+ elif re.match(r'^20\d+$', val):
print('WARNING: Unknown VS.NET version "%s",'
' assuming VS2012. Your VS can probably upgrade')
self.vs_version = '2012'
self.sln_version = '12.00'
self.vcproj_version = '11.0'
self.vcproj_extension = '.vcxproj'
- elif re.match('^1\d+$', val):
+ elif re.match(r'^1\d+$', val):
self.vs_version = val
self.sln_version = '12.00'
self.vcproj_version = val + '.0'
@@ -1045,12 +1045,13 @@ class GenDependenciesBase(gen_base.Gener
"Find the appropriate options for creating SWIG-based Python modules"
try:
- from distutils import sysconfig
-
- inc_dir = sysconfig.get_python_inc()
- lib_dir = os.path.join(sysconfig.PREFIX, "libs")
+ import sysconfig
except ImportError:
return
+ config_vars = sysconfig.get_config_vars()
+ inc_dir = config_vars['INCLUDEPY']
+ base_dir = config_vars.get('installed_base') or config_vars.get('base')
+ lib_dir = os.path.join(base_dir, 'libs')
if sys.version_info[0] >= 3:
if self.swig_version < (3, 0, 10):
Modified:
subversion/branches/pristine-checksum-salt/build/generator/swig/__init__.py
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/build/generator/swig/__init__.py?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
--- subversion/branches/pristine-checksum-salt/build/generator/swig/__init__.py
(original)
+++ subversion/branches/pristine-checksum-salt/build/generator/swig/__init__.py
Thu Feb 1 20:04:07 2024
@@ -72,7 +72,7 @@ class Generator:
if not self._swigVersion:
swig_version = subprocess.check_output([self.swig_path,
"-version"]).decode('utf8')
- m = re.search("Version (\d+).(\d+).(\d+)", swig_version)
+ m = re.search(r"Version (\d+).(\d+).(\d+)", swig_version)
if m:
self._swigVersion = tuple(map(int, m.groups()))
else:
Modified: subversion/branches/pristine-checksum-salt/build/get-py-info.py
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/build/get-py-info.py?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
--- subversion/branches/pristine-checksum-salt/build/get-py-info.py (original)
+++ subversion/branches/pristine-checksum-salt/build/get-py-info.py Thu Feb 1
20:04:07 2024
@@ -44,15 +44,24 @@ if len(sys.argv) != 2:
usage()
try:
- from distutils import sysconfig
+ if sys.version_info[0] == 2:
+ from distutils import sysconfig
+ get_include = lambda: sysconfig.get_python_inc()
+ get_platinclude = lambda: sysconfig.get_python_inc(plat_specific=1)
+ get_purelib = lambda: sysconfig.get_python_lib()
+ else:
+ import sysconfig
+ get_include = lambda: sysconfig.get_path('include')
+ get_platinclude = lambda: sysconfig.get_path('platinclude')
+ get_purelib = lambda: sysconfig.get_path('purelib')
except ImportError:
# No information available
print("none")
sys.exit(1)
if sys.argv[1] == '--includes':
- inc = sysconfig.get_python_inc()
- plat = sysconfig.get_python_inc(plat_specific=1)
+ inc = get_include()
+ plat = get_platinclude()
if inc == plat:
print("-I" + inc)
else:
@@ -140,7 +149,7 @@ if sys.argv[1] == '--libs':
sys.exit(0)
if sys.argv[1] == '--site':
- print(sysconfig.get_python_lib())
+ print(get_purelib())
sys.exit(0)
usage()
Modified: subversion/branches/pristine-checksum-salt/build/run_tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/build/run_tests.py?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
--- subversion/branches/pristine-checksum-salt/build/run_tests.py (original)
+++ subversion/branches/pristine-checksum-salt/build/run_tests.py Thu Feb 1
20:04:07 2024
@@ -1034,17 +1034,19 @@ class TestHarness:
def create_parser():
- def set_log_level(option, opt, value, parser, level=None):
- if level is None:
- level = value
- parser.values.set_log_level = getattr(logging, level, None) or int(level)
+ def set_log_level(option, opt, value, parser):
+ if value.isdigit():
+ value = int(value)
+ else:
+ value = getattr(logging, value)
+ parser.values.set_log_level = value
parser = optparse.OptionParser(usage=__doc__);
parser.add_option('-l', '--list', action='store_true', dest='list_tests',
help='Print test doc strings instead of running them')
- parser.add_option('-v', '--verbose', action='callback',
- callback=set_log_level, callback_args=(logging.DEBUG, ),
+ parser.add_option('-v', '--verbose', action='store_const',
+ dest='set_log_level', const=logging.DEBUG,
help='Print binary command-lines')
parser.add_option('-c', '--cleanup', action='store_true',
help='Clean up after successful tests')
Modified: subversion/branches/pristine-checksum-salt/build/transform_sql.py
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/build/transform_sql.py?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
--- subversion/branches/pristine-checksum-salt/build/transform_sql.py (original)
+++ subversion/branches/pristine-checksum-salt/build/transform_sql.py Thu Feb
1 20:04:07 2024
@@ -50,7 +50,7 @@ class Processor(object):
# a few SQL comments that act as directives for this transform system
re_format = re.compile('-- *format: *([0-9]+)')
- re_statement = re.compile('-- *STMT_([A-Z_0-9]+)( +\(([^\)]*)\))?')
+ re_statement = re.compile(r'-- *STMT_([A-Z_0-9]+)( +\(([^)]*)\))?')
re_include = re.compile('-- *include: *([-a-z]+)')
re_define = re.compile('-- *define: *([A-Z_0-9]+)')
Modified: subversion/branches/pristine-checksum-salt/configure.ac
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/configure.ac?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
--- subversion/branches/pristine-checksum-salt/configure.ac (original)
+++ subversion/branches/pristine-checksum-salt/configure.ac Thu Feb 1 20:04:07
2024
@@ -872,21 +872,18 @@ fi
dnl plaintext passwords -------------------
AC_ARG_ENABLE(plaintext-password-storage,
-AS_HELP_STRING([--enable-plaintext-password-storage],
- [Enable on-disk caching of plaintext passwords and passphrases.
- (Enabling this functionality will not force Subversion
+AS_HELP_STRING([--disable-plaintext-password-storage],
+ [Disable on-disk caching of plaintext passwords and passphrases.
+ (Leaving this functionality enabled will not force Subversion
to store passwords in plaintext, but does permit users to
explicitly allow that behavior via runtime configuration.)]),
-[plaintext_passwordd_storage="$enableval"],
-[plaintext_passwordd_storage="no"])
-
-if test "$plaintext_passwordd_storage" = "yes"; then
- AC_MSG_WARN([Enabling plaintext password/passphrase storage])
-else
- AC_MSG_NOTICE([Disabling plaintext password/passphrase storage])
- AC_DEFINE(SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE, 1,
- [Defined if plaintext password/passphrase storage is disabled])
-fi
+[
+ if test "$enableval" = "no"; then
+ AC_MSG_NOTICE([Disabling plaintext password/passphrase storage])
+ AC_DEFINE(SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE, 1,
+ [Defined if plaintext password/passphrase storage is disabled])
+ fi
+])
dnl Build and install rules -------------------
@@ -1028,6 +1025,7 @@ AC_SUBST([libsvn_diff_LDFLAGS])
AC_SUBST([libsvn_fs_LDFLAGS])
AC_SUBST([libsvn_fs_base_LDFLAGS])
AC_SUBST([libsvn_fs_fs_LDFLAGS])
+AC_SUBST([libsvn_fs_x_LDFLAGS])
AC_SUBST([libsvn_fs_util_LDFLAGS])
AC_SUBST([libsvn_ra_LDFLAGS])
AC_SUBST([libsvn_ra_local_LDFLAGS])
Modified:
subversion/branches/pristine-checksum-salt/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
---
subversion/branches/pristine-checksum-salt/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in
(original)
+++
subversion/branches/pristine-checksum-salt/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in
Thu Feb 1 20:04:07 2024
@@ -1239,6 +1239,15 @@ while (defined (my $load_dir = &get_next
# get the incorrect information. So always append @BASE
# and any preceding @'s will be treated normally and the
# correct information will be retrieved.
+
+ # first make sure that the file has the eol-style property
+ # else svn 1.9 will error when it is not found
+ my @proplist = read_from_process($svn,
+ 'proplist',
+ '--quiet',
+ "$upd_file\@BASE");
+ next unless grep(/svn:eol-style/, @proplist);
+
my @command = ($svn,
'propget',
'svn:eol-style',
Modified:
subversion/branches/pristine-checksum-salt/contrib/hook-scripts/check-mime-type.pl
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/contrib/hook-scripts/check-mime-type.pl?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
---
subversion/branches/pristine-checksum-salt/contrib/hook-scripts/check-mime-type.pl
(original)
+++
subversion/branches/pristine-checksum-salt/contrib/hook-scripts/check-mime-type.pl
Thu Feb 1 20:04:07 2024
@@ -1,28 +1,36 @@
#!/usr/bin/env perl
# ====================================================================
-# commit-mime-type-check.pl: check that every added file has the
-# svn:mime-type property set and every added file with a mime-type
-# matching text/* also has svn:eol-style set. If any file fails this
-# test the user is sent a verbose error message suggesting solutions and
-# the commit is aborted.
+# check-mime-type.pl: check that every added or property-modified file
+# has the svn:mime-type property set and every added or property-modified
+# file with a mime-type matching text/* also has svn:eol-style set.
+# If any file fails this test the user is sent a verbose error message
+# suggesting solutions and the commit is aborted.
#
-# Usage: commit-mime-type-check.pl REPOS TXN-NAME
+# Usage: check-mime-type.pl REPOS TXN-NAME
# ====================================================================
-# Most of commit-mime-type-check.pl was taken from
+# Most of check-mime-type.pl was taken from
# commit-access-control.pl, Revision 9986, 2004-06-14 16:29:22 -0400.
# ====================================================================
-# Copyright (c) 2000-2004 CollabNet. All rights reserved.
+# Copyright (c) 2000-2009 CollabNet. All rights reserved.
+# Copyright (c) 2010-2020 Apache Software Foundation (ASF).
+# ====================================================================
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://subversion.tigris.org/license.html.
-# If newer versions of this license are posted there, you may use a
-# newer version instead, at your option.
+# http://www.apache.org/licenses/LICENSE-2.0
#
-# This software consists of voluntary contributions made by many
-# individuals. For exact contribution history, see the revision
-# history and logs, available at http://subversion.tigris.org/.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
# ====================================================================
# Turn on warnings the best way depending on the Perl version.
@@ -40,6 +48,12 @@ use Carp;
######################################################################
# Configuration section.
+# Toggle: Check files of mime-type text/* for svn:eol-style property.
+my $check_text_eol = 1;
+
+# Toggle: Check property-modified files too.
+my $check_prop_modified_files = 0;
+
# Svnlook path.
my $svnlook = "/usr/bin/svnlook";
@@ -100,19 +114,28 @@ my $tmp_dir = '/tmp';
chdir($tmp_dir)
or die "$0: cannot chdir `$tmp_dir': $!\n";
-# Figure out what files have added using svnlook.
-my @files_added;
+# Figure out what files have been added/property-modified using svnlook.
+my $regex_files_to_check;
+if ($check_prop_modified_files)
+ {
+ $regex_files_to_check = qr/^(?:A.|.U) (.*[^\/])$/;
+ }
+else
+ {
+ $regex_files_to_check = qr/^A. (.*[^\/])$/;
+ }
+my @files_to_check;
foreach my $line (&read_from_process($svnlook, 'changed', $repos, '-t', $txn))
{
- # Add only files that were added to @files_added
- if ($line =~ /^A. (.*[^\/])$/)
+ # Add only files that were added/property-modified to @files_to_check
+ if ($line =~ /$regex_files_to_check/)
{
- push(@files_added, $1);
+ push(@files_to_check, $1);
}
}
my @errors;
-foreach my $path ( @files_added )
+foreach my $path ( @files_to_check )
{
my $mime_type;
my $eol_style;
@@ -168,7 +191,7 @@ foreach my $path ( @files_added )
{
push @errors, "$path : svn:mime-type is not
set";
}
- elsif ($mime_type =~ /^text\// and not $eol_style)
+ elsif ($check_text_eol and $mime_type =~ /^text\// and not
$eol_style)
{
push @errors, "$path : svn:mime-type=$mime_type
but svn:eol-style is not set";
}
@@ -179,20 +202,30 @@ foreach my $path ( @files_added )
# and will not see this verbose message more than once.
if (@errors)
{
+ my $addition1 = '';
+ my $addition2 = '';
+ my $addition3 = '';
+ if ($check_prop_modified_files)
+ {
+ $addition1 = '/property-modified';
+ }
+ if ($check_text_eol)
+ {
+ $addition2 = " In addition text files must have the svn:eol-style
property set.\n";
+ $addition3 = " svn propset svn:eol-style native path/of/file\n";
+ }
warn "$0:\n\n",
join("\n", @errors), "\n\n",
- <<EOS;
-
- Every added file must have the svn:mime-type property set. In
- addition text files must have the svn:eol-style property set.
+ <<"EOS";
+ Every added$addition1 file must have the svn:mime-type property set.
+$addition2
For binary files try running
svn propset svn:mime-type application/octet-stream path/of/file
For text files try
svn propset svn:mime-type text/plain path/of/file
- svn propset svn:eol-style native path/of/file
-
+$addition3
You may want to consider uncommenting the auto-props section
in your ~/.subversion/config file. Read the Subversion book
(https://svnbook.red-bean.com/), Chapter 7, Properties section,
Modified:
subversion/branches/pristine-checksum-salt/contrib/server-side/fsfsverify.py
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/contrib/server-side/fsfsverify.py?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
---
subversion/branches/pristine-checksum-salt/contrib/server-side/fsfsverify.py
(original)
+++
subversion/branches/pristine-checksum-salt/contrib/server-side/fsfsverify.py
Thu Feb 1 20:04:07 2024
@@ -726,7 +726,10 @@ class NodeRev(object):
self.text = TextRep(rev, offset, length, size, digest,
contentType, currentRev, self, sha1, uniquifier)
elif field == 'props':
- (rev, offset, length, size, digest) = value.split(' ')
+ if len(value.split(' ')) == 5:
+ (rev, offset, length, size, digest) = value.split(' ')
+ else:
+ (rev, offset, length, size, digest, sha1, uniquifier) =
value.split(' ')
rev = int(rev)
offset = int(offset)
length = int(length)
Modified:
subversion/branches/pristine-checksum-salt/subversion/bindings/javahl/README
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/subversion/bindings/javahl/README?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
---
subversion/branches/pristine-checksum-salt/subversion/bindings/javahl/README
(original)
+++
subversion/branches/pristine-checksum-salt/subversion/bindings/javahl/README
Thu Feb 1 20:04:07 2024
@@ -39,7 +39,7 @@ jar file with --with-junit when running
has been tested. JUnit can be downloaded from https://junit.org/ .)
-MacOS X:
+MacOS:
After building libsvnjavahl.dylib, you must rename it to
libsvnjavahl.jnilib. Make install-javahl creates a symbolic
Modified:
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/INSTALL
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/subversion/bindings/swig/INSTALL?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
--- subversion/branches/pristine-checksum-salt/subversion/bindings/swig/INSTALL
(original)
+++ subversion/branches/pristine-checksum-salt/subversion/bindings/swig/INSTALL
Thu Feb 1 20:04:07 2024
@@ -92,6 +92,9 @@ Step 1: [Optional] Install a suitable ve
(See https://sourceforge.net/p/swig/news/2016/06/swig-3010-released/)
- For Perl 5.16 and later, SWIG 2.0.8 or later is required.
- For Ruby bindings, SWIG 3.0.8 is not supported.
+ (See https://github.com/swig/swig/issues/602)
+ - For Ruby bindings, SWIG 4.2.0 is broken.
+ (See https://github.com/swig/swig/issues/2751)
* Perhaps your distribution packages a suitable version of SWIG.
If so, install it and skip to the last bullet point of this
Modified:
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/include/svn_containers.swg
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/subversion/bindings/swig/include/svn_containers.swg?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
---
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/include/svn_containers.swg
(original)
+++
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/include/svn_containers.swg
Thu Feb 1 20:04:07 2024
@@ -299,7 +299,7 @@
$1 = svn_swig_rb_hash_to_apr_hash_svn_string($input, _global_pool);
_global_pool = NULL;
if (!NIL_P(rb_pool)) {
- if (NIL_P($1)) {
+ if ($1 == NULL) {
svn_swig_rb_destroy_pool(rb_pool);
} else {
svn_swig_rb_set_pool_for_no_swig_type($input, rb_pool);
@@ -373,7 +373,7 @@
svn_swig_rb_hash_to_apr_hash_string($input, _global_pool);
_global_pool = NULL;
if (!NIL_P(rb_pool)) {
- if (NIL_P($1)) {
+ if ($1 == NULL) {
svn_swig_rb_destroy_pool(rb_pool);
} else {
svn_swig_rb_set_pool_for_no_swig_type($input, rb_pool);
Modified:
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pristine-checksum-salt/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=1915519&r1=1915518&r2=1915519&view=diff
==============================================================================
---
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
(original)
+++
subversion/branches/pristine-checksum-salt/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
Thu Feb 1 20:04:07 2024
@@ -1783,44 +1783,97 @@ static svn_error_t *type_conversion_erro
/*** Editor Wrapping ***/
-/* this baton is used for the editor, directory, and file batons. */
-typedef struct item_baton {
- PyObject *editor; /* the editor handling the callbacks */
- PyObject *baton; /* the dir/file baton (or NULL for edit baton) */
- apr_pool_t *pool; /* top-level pool */
-} item_baton;
-
-static item_baton *make_baton(apr_pool_t *pool,
- PyObject *editor,
- PyObject *baton)
-{
- item_baton *newb = apr_palloc(pool, sizeof(*newb));
-
- /* Note: We steal the caller's reference to 'baton'. */
- Py_INCREF(editor);
- newb->editor = editor;
- newb->baton = baton;
- newb->pool = pool;
+static PyObject *
+make_baton(apr_pool_t *pool, PyObject *parent, PyObject *baton)
+{
+ PyObject *newb;
+ newb = PyObject_CallMethod(parent, "make_decendant", "O&O",
+ make_ob_pool, pool, baton);
+ /* We always borrow the reference in ancestor's dict during the C API
+ processing, so that we never leak the reference even the API aborted
+ by some error */
+ Py_XDECREF(newb);
return newb;
}
-static svn_error_t *close_baton(void *baton,
- const char *method)
+/* Get 'editor' and 'baton' from _ItemBaton instance. The caller
+ should be within a Python thread lock. */
+static svn_error_t *
+unwrap_item_baton(PyObject **editor, PyObject **baton, PyObject *item_baton)
{
- item_baton *ib = baton;
+ svn_error_t *err;
+
+ if ((*editor = PyObject_GetAttrString(item_baton, "editor")) == NULL)
+ {
+ err = callback_exception_error();
+ *baton = NULL;
+ goto finished;
+ }
+ if ((*baton = PyObject_GetAttrString(item_baton, "baton")) == NULL)
+ {
+ Py_CLEAR(*editor);
+ err = callback_exception_error();
+ goto finished;
+ }
+ err = SVN_NO_ERROR;
+ finished:
+ Py_XDECREF(*editor);
+ Py_XDECREF(*baton);
+ return err;
+}
+
+/* Get 'editor', 'baton', 'pool' from _ItemBaton instance. The caller
+ should be within a Python thread lock. */
+static svn_error_t *
+unwrap_item_baton_with_pool(PyObject **editor, PyObject **baton,
+ PyObject **py_pool, PyObject *item_baton)
+{
+ svn_error_t *err;
+
+ if ((err = unwrap_item_baton(editor, baton, item_baton)) != SVN_NO_ERROR)
+ {
+ *py_pool = NULL;
+ goto finished;
+ }
+ if ((*py_pool = PyObject_GetAttrString(item_baton, "pool")) == NULL)
+ {
+ err = callback_exception_error();
+ *editor = NULL;
+ *baton = NULL;
+ goto finished;
+ }
+ err = SVN_NO_ERROR;
+ finished:
+ Py_XDECREF(*py_pool);
+ return err;
+}
+
+static svn_error_t *
+close_baton(void *baton, const char *method, svn_boolean_t without_item)
+{
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = baton;
PyObject *result;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
+ if (without_item)
+ {
+ baton_item = NULL;
+ }
/* If there is no baton object, then it is an edit_baton, and we should
not bother to pass an object. Note that we still shove a NULL onto
the stack, but the format specified just won't reference it. */
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)method,
- ib->baton ? (char *)"(O)" : NULL,
- ib->baton)) == NULL)
+ if ((result = PyObject_CallMethod(editor, (char *)method,
+ baton_item ? (char *)"(O)" : NULL,
+ baton_item)) == NULL)
{
err = callback_exception_error();
goto finished;
@@ -1829,19 +1882,24 @@ static svn_error_t *close_baton(void *ba
/* there is no return value, so just toss this object (probably Py_None) */
Py_DECREF(result);
- /* Release the editor object */
- Py_DECREF(ib->editor);
-
- /* We're now done with the baton. Since there isn't really a free, all
- we need to do is note that its objects are no longer referenced by
- the baton. */
- Py_XDECREF(ib->baton);
-
-#ifdef SVN_DEBUG
- ib->editor = ib->baton = NULL;
-#endif
-
- err = SVN_NO_ERROR;
+ /* We're now done with the baton. Release it from ancestor's dict */
+ if (PyObject_HasAttrString(ib, "release_self"))
+ {
+ /* Get reference for ib, because following function call remove
+ ib object from ancestor's dict, which we borrow the reference */
+ Py_INCREF(ib);
+ result = PyObject_CallMethod(ib, "release_self", NULL, NULL);
+ /* Now we can release the reference safely */
+ Py_DECREF(ib);
+ if (result == NULL)
+ {
+ err = callback_exception_error();
+ goto finished;
+ }
+ /* there is no return value, so just toss this object
+ (probably Py_None) */
+ Py_DECREF(result);
+ }
finished:
svn_swig_py_release_py_lock();
@@ -1852,14 +1910,19 @@ static svn_error_t *set_target_revision(
svn_revnum_t target_revision,
apr_pool_t *pool)
{
- item_baton *ib = edit_baton;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = edit_baton;
PyObject *result;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"set_target_revision",
+ if ((result = PyObject_CallMethod(editor, (char *)"set_target_revision",
(char *)"l", target_revision)) == NULL)
{
err = callback_exception_error();
@@ -1880,14 +1943,19 @@ static svn_error_t *open_root(void *edit
apr_pool_t *dir_pool,
void **root_baton)
{
- item_baton *ib = edit_baton;
- PyObject *result;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = edit_baton;
+ PyObject *result = NULL;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"open_root",
+ if ((result = PyObject_CallMethod(editor, (char *)"open_root",
(char *)"lO&", base_revision,
make_ob_pool, dir_pool)) == NULL)
{
@@ -1895,11 +1963,15 @@ static svn_error_t *open_root(void *edit
goto finished;
}
- /* make_baton takes our 'result' reference */
- *root_baton = make_baton(dir_pool, ib->editor, result);
+ if ((*root_baton = make_baton(dir_pool, ib, result)) == NULL)
+ {
+ err = callback_exception_error();
+ goto finished;
+ }
err = SVN_NO_ERROR;
finished:
+ Py_XDECREF(result);
svn_swig_py_release_py_lock();
return err;
}
@@ -1909,16 +1981,21 @@ static svn_error_t *delete_entry(const c
void *parent_baton,
apr_pool_t *pool)
{
- item_baton *ib = parent_baton;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = parent_baton;
PyObject *result;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"delete_entry",
+ if ((result = PyObject_CallMethod(editor, (char *)"delete_entry",
(char *)SVN_SWIG_BYTES_FMT "lOO&",
- path, revision, ib->baton,
+ path, revision, baton_item,
make_ob_pool, pool)) == NULL)
{
err = callback_exception_error();
@@ -1941,20 +2018,25 @@ static svn_error_t *add_directory(const
apr_pool_t *dir_pool,
void **child_baton)
{
- item_baton *ib = parent_baton;
- PyObject *result;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = parent_baton;
+ PyObject *result = NULL;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"add_directory",
+ if ((result = PyObject_CallMethod(editor, (char *)"add_directory",
#if IS_PY3
(char *)"yOylO&",
#else
(char *)"sOslO&",
#endif
- path, ib->baton,
+ path, baton_item,
copyfrom_path, copyfrom_revision,
make_ob_pool, dir_pool)) == NULL)
{
@@ -1962,11 +2044,15 @@ static svn_error_t *add_directory(const
goto finished;
}
- /* make_baton takes our 'result' reference */
- *child_baton = make_baton(dir_pool, ib->editor, result);
+ if ((*child_baton = make_baton(dir_pool, ib, result)) == NULL)
+ {
+ err = callback_exception_error();
+ goto finished;
+ }
err = SVN_NO_ERROR;
finished:
+ Py_XDECREF(result);
svn_swig_py_release_py_lock();
return err;
}
@@ -1977,27 +2063,36 @@ static svn_error_t *open_directory(const
apr_pool_t *dir_pool,
void **child_baton)
{
- item_baton *ib = parent_baton;
- PyObject *result;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = parent_baton;
+ PyObject *result = NULL;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"open_directory",
+ if ((result = PyObject_CallMethod(editor, (char *)"open_directory",
(char *)SVN_SWIG_BYTES_FMT "OlO&",
- path, ib->baton, base_revision,
+ path, baton_item, base_revision,
make_ob_pool, dir_pool)) == NULL)
{
err = callback_exception_error();
goto finished;
}
- /* make_baton takes our 'result' reference */
- *child_baton = make_baton(dir_pool, ib->editor, result);
+ if ((*child_baton = make_baton(dir_pool, ib, result)) == NULL)
+ {
+ err = callback_exception_error();
+ goto finished;
+ }
err = SVN_NO_ERROR;
finished:
+ Py_XDECREF(result);
svn_swig_py_release_py_lock();
return err;
}
@@ -2007,20 +2102,25 @@ static svn_error_t *change_dir_prop(void
const svn_string_t *value,
apr_pool_t *pool)
{
- item_baton *ib = dir_baton;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = dir_baton;
PyObject *result;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"change_dir_prop",
+ if ((result = PyObject_CallMethod(editor, (char *)"change_dir_prop",
#if IS_PY3
(char *)"Oyy#O&",
#else
(char *)"Oss#O&",
#endif
- ib->baton, name,
+ baton_item, name,
value ? value->data : NULL,
(Py_ssize_t) (value ? value->len : 0),
make_ob_pool, pool)) == NULL)
@@ -2041,7 +2141,7 @@ static svn_error_t *change_dir_prop(void
static svn_error_t *close_directory(void *dir_baton,
apr_pool_t *pool)
{
- return close_baton(dir_baton, "close_directory");
+ return close_baton(dir_baton, "close_directory", FALSE);
}
static svn_error_t *add_file(const char *path,
@@ -2051,20 +2151,25 @@ static svn_error_t *add_file(const char
apr_pool_t *file_pool,
void **file_baton)
{
- item_baton *ib = parent_baton;
- PyObject *result;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = parent_baton;
+ PyObject *result = NULL;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"add_file",
+ if ((result = PyObject_CallMethod(editor, (char *)"add_file",
#if IS_PY3
(char *)"yOylO&",
#else
(char *)"sOslO&",
#endif
- path, ib->baton,
+ path, baton_item,
copyfrom_path, copyfrom_revision,
make_ob_pool, file_pool)) == NULL)
{
@@ -2072,12 +2177,16 @@ static svn_error_t *add_file(const char
goto finished;
}
- /* make_baton takes our 'result' reference */
- *file_baton = make_baton(file_pool, ib->editor, result);
+ if ((*file_baton = make_baton(file_pool, ib, result)) == NULL)
+ {
+ err = callback_exception_error();
+ goto finished;
+ }
err = SVN_NO_ERROR;
finished:
+ Py_XDECREF(result);
svn_swig_py_release_py_lock();
return err;
}
@@ -2088,27 +2197,36 @@ static svn_error_t *open_file(const char
apr_pool_t *file_pool,
void **file_baton)
{
- item_baton *ib = parent_baton;
- PyObject *result;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = parent_baton;
+ PyObject *result = NULL;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"open_file",
+ if ((result = PyObject_CallMethod(editor, (char *)"open_file",
(char *)SVN_SWIG_BYTES_FMT "OlO&",
- path, ib->baton, base_revision,
+ path, baton_item, base_revision,
make_ob_pool, file_pool)) == NULL)
{
err = callback_exception_error();
goto finished;
}
- /* make_baton takes our 'result' reference */
- *file_baton = make_baton(file_pool, ib->editor, result);
+ if ((*file_baton = make_baton(file_pool, ib, result)) == NULL)
+ {
+ err = callback_exception_error();
+ goto finished;
+ }
err = SVN_NO_ERROR;
finished:
+ Py_XDECREF(result);
svn_swig_py_release_py_lock();
return err;
}
@@ -2116,12 +2234,19 @@ static svn_error_t *open_file(const char
static svn_error_t *window_handler(svn_txdelta_window_t *window,
void *baton)
{
- PyObject *handler = baton;
- PyObject *result;
- svn_error_t *err;
+ PyObject *editor = NULL, *handler = NULL;
+ PyObject *ib = baton;
+ PyObject *result = NULL;
+ int is_last_call = FALSE;
+ svn_error_t *err = SVN_NO_ERROR;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &handler, ib)) != SVN_NO_ERROR)
+ {
+ is_last_call = TRUE;
+ goto finished;
+ }
if (window == NULL)
{
/* the last call; it closes the handler */
@@ -2129,9 +2254,8 @@ static svn_error_t *window_handler(svn_t
/* invoke the handler with None for the window */
/* ### python doesn't have 'const' on the format */
result = PyObject_CallFunction(handler, (char *)"O", Py_None);
+ is_last_call = TRUE;
- /* we no longer need to refer to the handler object */
- Py_DECREF(handler);
}
else
{
@@ -2144,14 +2268,40 @@ static svn_error_t *window_handler(svn_t
if (result == NULL)
{
err = callback_exception_error();
+ is_last_call = TRUE;
goto finished;
}
-
- /* there is no return value, so just toss this object (probably Py_None) */
- Py_DECREF(result);
- err = SVN_NO_ERROR;
+ else
+ {
+ /* there is no return value, so just toss this object
+ (probably Py_None) */
+ Py_DECREF(result);
+ err = SVN_NO_ERROR;
+ }
finished:
+ if (is_last_call)
+ {
+ /* now we should release the handler object */
+ if (PyObject_HasAttrString(ib, "release_self"))
+ {
+ /* Get reference for ib, because following function call remove
+ ib object from ancestor's dict, which we borrow the reference */
+ Py_INCREF(ib);
+ result = PyObject_CallMethod(ib, "release_self", NULL, NULL);
+ /* Now we can release the reference safely */
+ Py_DECREF(ib);
+ if (result == NULL)
+ {
+ if (err == SVN_NO_ERROR)
+ {
+ err = callback_exception_error();
+ }
+ }
+ Py_XDECREF(result);
+ }
+ }
+
svn_swig_py_release_py_lock();
return err;
}
@@ -2162,20 +2312,25 @@ static svn_error_t *apply_textdelta(void
svn_txdelta_window_handler_t *handler,
void **h_baton)
{
- item_baton *ib = file_baton;
- PyObject *result;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = file_baton;
+ PyObject *result = NULL;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"apply_textdelta",
+ if ((result = PyObject_CallMethod(editor, (char *)"apply_textdelta",
#if IS_PY3
(char *)"(Oy)",
#else
(char *)"(Os)",
#endif
- ib->baton,
+ baton_item,
base_checksum)) == NULL)
{
err = callback_exception_error();
@@ -2187,22 +2342,26 @@ static svn_error_t *apply_textdelta(void
in Python. */
if (result == Py_None)
{
- Py_DECREF(result);
-
*handler = svn_delta_noop_window_handler;
*h_baton = NULL;
}
else
{
- /* return the thunk for invoking the handler. the baton takes our
- 'result' reference, which is the handler. */
+ /* return the thunk for invoking the handler. the baton creates
+ new reference of our 'result' reference, which is the handler,
+ so we release it even if no error. */
*handler = window_handler;
- *h_baton = result;
+ if ((*h_baton = make_baton(pool, ib, result)) == NULL)
+ {
+ err = callback_exception_error();
+ goto finished;
+ }
}
err = SVN_NO_ERROR;
finished:
+ Py_XDECREF(result);
svn_swig_py_release_py_lock();
return err;
}
@@ -2212,20 +2371,25 @@ static svn_error_t *change_file_prop(voi
const svn_string_t *value,
apr_pool_t *pool)
{
- item_baton *ib = file_baton;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = file_baton;
PyObject *result;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"change_file_prop",
+ if ((result = PyObject_CallMethod(editor, (char *)"change_file_prop",
#if IS_PY3
(char *)"Oyy#O&",
#else
(char *)"Oss#O&",
#endif
- ib->baton, name,
+ baton_item, name,
value ? value->data : NULL,
(Py_ssize_t) (value ? value->len : 0),
make_ob_pool, pool)) == NULL)
@@ -2247,20 +2411,25 @@ static svn_error_t *close_file(void *fil
const char *text_checksum,
apr_pool_t *pool)
{
- item_baton *ib = file_baton;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = file_baton;
PyObject *result;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"close_file",
+ if ((result = PyObject_CallMethod(editor, (char *)"close_file",
#if IS_PY3
(char *)"(Oy)",
#else
(char *)"(Os)",
#endif
- ib->baton,
+ baton_item,
text_checksum)) == NULL)
{
err = callback_exception_error();
@@ -2270,14 +2439,24 @@ static svn_error_t *close_file(void *fil
/* there is no return value, so just toss this object (probably Py_None) */
Py_DECREF(result);
- /* We're now done with the baton. Since there isn't really a free, all
- we need to do is note that its objects are no longer referenced by
- the baton. */
- Py_XDECREF(ib->baton);
-
-#ifdef SVN_DEBUG
- ib->editor = ib->baton = NULL;
-#endif
+ /* We're now done with the baton. Release it from ancestor's dict */
+ if (PyObject_HasAttrString(ib, "release_self"))
+ {
+ /* Get reference for ib, because following function call remove
+ ib object from ancestor's dict, which we borrow the reference */
+ Py_INCREF(ib);
+ result = PyObject_CallMethod(ib, "release_self", NULL, NULL);
+ /* Now we can release the reference safely */
+ Py_DECREF(ib);
+ if (result == NULL)
+ {
+ err = callback_exception_error();
+ goto finished;
+ }
+ /* there is no return value, so just toss this object
+ (probably Py_None) */
+ Py_DECREF(result);
+ }
err = SVN_NO_ERROR;
@@ -2289,18 +2468,16 @@ static svn_error_t *close_file(void *fil
static svn_error_t *close_edit(void *edit_baton,
apr_pool_t *pool)
{
- return close_baton(edit_baton, "close_edit");
+ return close_baton(edit_baton, "close_edit", TRUE);
}
static svn_error_t *abort_edit(void *edit_baton,
apr_pool_t *pool)
{
- return close_baton(edit_baton, "abort_edit");
+ return close_baton(edit_baton, "abort_edit", TRUE);
}
void svn_swig_py_make_editor(const svn_delta_editor_t **editor,
- void **edit_baton,
- PyObject *py_editor,
apr_pool_t *pool)
{
svn_delta_editor_t *thunk_editor = svn_delta_default_editor(pool);
@@ -2321,7 +2498,6 @@ void svn_swig_py_make_editor(const svn_d
thunk_editor->abort_edit = abort_edit;
*editor = thunk_editor;
- *edit_baton = make_baton(pool, py_editor, NULL);
}
@@ -2331,14 +2507,19 @@ static svn_error_t *parse_fn3_magic_head
void *parse_baton,
apr_pool_t *pool)
{
- item_baton *ib = parse_baton;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = parse_baton;
PyObject *result;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"magic_header_record",
+ if ((result = PyObject_CallMethod(editor, (char *)"magic_header_record",
(char *)"lO&", version,
make_ob_pool, pool)) == NULL)
{
@@ -2360,14 +2541,19 @@ static svn_error_t *parse_fn3_uuid_recor
void *parse_baton,
apr_pool_t *pool)
{
- item_baton *ib = parse_baton;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = parse_baton;
PyObject *result;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"uuid_record",
+ if ((result = PyObject_CallMethod(editor, (char *)"uuid_record",
(char *)SVN_SWIG_BYTES_FMT "O&", uuid,
make_ob_pool, pool)) == NULL)
{
@@ -2390,14 +2576,19 @@ static svn_error_t *parse_fn3_new_revisi
void *parse_baton,
apr_pool_t *pool)
{
- item_baton *ib = parse_baton;
- PyObject *result;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = parse_baton;
+ PyObject *result = NULL;
PyObject *tmp;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
- if ((result = PyObject_CallMethod(ib->editor, (char *)"new_revision_record",
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
+ if ((result = PyObject_CallMethod(editor, (char *)"new_revision_record",
(char *)"O&O&",
svn_swig_py_stringhash_to_dict, headers,
make_ob_pool, pool)) == NULL) {
@@ -2405,11 +2596,15 @@ static svn_error_t *parse_fn3_new_revisi
goto finished;
}
- /* make_baton takes our 'result' reference */
- *revision_baton = make_baton(pool, ib->editor, result);
+ if ((*revision_baton = make_baton(pool, ib, result)) == NULL)
+ {
+ err = callback_exception_error();
+ goto finished;
+ }
err = SVN_NO_ERROR;
finished:
+ Py_XDECREF(result);
svn_swig_py_release_py_lock();
return err;
}
@@ -2420,26 +2615,35 @@ static svn_error_t *parse_fn3_new_node_r
void *revision_baton,
apr_pool_t *pool)
{
- item_baton *ib = revision_baton;
- PyObject *result;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = revision_baton;
+ PyObject *result = NULL;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
- if ((result = PyObject_CallMethod(ib->editor, (char *)"new_node_record",
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
+ if ((result = PyObject_CallMethod(editor, (char *)"new_node_record",
(char *)"O&OO&",
svn_swig_py_stringhash_to_dict, headers,
- ib->baton,
+ baton_item,
make_ob_pool, pool)) == NULL) {
err = callback_exception_error();
goto finished;
}
- /* make_baton takes our 'result' reference */
- *node_baton = make_baton(pool, ib->editor, result);
+ if ((*node_baton = make_baton(pool, ib, result)) == NULL)
+ {
+ err = callback_exception_error();
+ goto finished;
+ }
err = SVN_NO_ERROR;
finished:
+ Py_XDECREF(result);
svn_swig_py_release_py_lock();
return err;
}
@@ -2449,20 +2653,25 @@ static svn_error_t *parse_fn3_set_revisi
const char *name,
const svn_string_t *value)
{
- item_baton *ib = revision_baton;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = revision_baton;
PyObject *result;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char
*)"set_revision_property",
+ if ((result = PyObject_CallMethod(editor, (char *)"set_revision_property",
#if IS_PY3
(char *)"Oyy#",
#else
(char *)"Oss#",
#endif
- ib->baton, name,
+ baton_item, name,
value ? value->data : NULL,
(Py_ssize_t) (value ? value->len : 0)))
== NULL)
@@ -2485,20 +2694,25 @@ static svn_error_t *parse_fn3_set_node_p
const char *name,
const svn_string_t *value)
{
- item_baton *ib = node_baton;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = node_baton;
PyObject *result;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"set_node_property",
+ if ((result = PyObject_CallMethod(editor, (char *)"set_node_property",
#if IS_PY3
(char *)"Oyy#",
#else
(char *)"Oss#",
#endif
- ib->baton, name,
+ baton_item, name,
value ? value->data : NULL,
(Py_ssize_t) (value ? value->len : 0)))
== NULL)
@@ -2520,16 +2734,21 @@ static svn_error_t *parse_fn3_set_node_p
static svn_error_t *parse_fn3_delete_node_property(void *node_baton,
const char *name)
{
- item_baton *ib = node_baton;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = node_baton;
PyObject *result;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"delete_node_property",
+ if ((result = PyObject_CallMethod(editor, (char *)"delete_node_property",
(char *)"O" SVN_SWIG_BYTES_FMT,
- ib->baton, name)) == NULL)
+ baton_item, name)) == NULL)
{
err = callback_exception_error();
goto finished;
@@ -2547,15 +2766,20 @@ static svn_error_t *parse_fn3_delete_nod
static svn_error_t *parse_fn3_remove_node_props(void *node_baton)
{
- item_baton *ib = node_baton;
+ PyObject *editor = NULL, *baton_item = NULL;
+ PyObject *ib = node_baton;
PyObject *result;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton(&editor, &baton_item, ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"remove_node_props",
- (char *)"(O)", ib->baton)) == NULL)
+ if ((result = PyObject_CallMethod(editor, (char *)"remove_node_props",
+ (char *)"(O)", baton_item)) == NULL)
{
err = callback_exception_error();
goto finished;
@@ -2574,15 +2798,22 @@ static svn_error_t *parse_fn3_remove_nod
static svn_error_t *parse_fn3_set_fulltext(svn_stream_t **stream,
void *node_baton)
{
- item_baton *ib = node_baton;
+ PyObject *editor = NULL, *baton_item = NULL, *py_pool = NULL;
+ PyObject *ib = node_baton;
PyObject *result = NULL;
+ apr_pool_t *pool;
svn_error_t *err = SVN_NO_ERROR;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton_with_pool(&editor, &baton_item, &py_pool,
+ ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"set_fulltext",
- (char *)"(O)", ib->baton)) == NULL)
+ if ((result = PyObject_CallMethod(editor, (char *)"set_fulltext",
+ (char *)"(O)", baton_item)) == NULL)
{
err = callback_exception_error();
goto finished;
@@ -2595,9 +2826,15 @@ static svn_error_t *parse_fn3_set_fullte
}
else
{
+ if (svn_swig_ConvertPtrString(py_pool, (void **)&pool,
+ "apr_pool_t *") == -1)
+ {
+ err = type_conversion_error("apr_pool_t *");
+ goto finished;
+ }
/* create a stream from the IO object. it will increment the
reference on the 'result'. */
- *stream = svn_swig_py_make_stream(result, ib->pool);
+ *stream = svn_swig_py_make_stream(result, pool);
if (*stream == NULL)
{
err = callback_exception_error();
@@ -2614,19 +2851,26 @@ finished:
}
-static svn_error_t *parse_fn3_apply_textdelta(svn_txdelta_window_handler_t
*handler,
- void **handler_baton,
- void *node_baton)
+static svn_error_t *
+parse_fn3_apply_textdelta(svn_txdelta_window_handler_t *handler,
+ void **handler_baton,
+ void *node_baton)
{
- item_baton *ib = node_baton;
- PyObject *result;
+ PyObject *editor = NULL, *baton_item = NULL, *py_pool = NULL;
+ PyObject *ib = node_baton;
+ PyObject *result = NULL;
svn_error_t *err;
svn_swig_py_acquire_py_lock();
+ if ((err = unwrap_item_baton_with_pool(&editor, &baton_item, &py_pool,
+ ib)) != SVN_NO_ERROR)
+ {
+ goto finished;
+ }
/* ### python doesn't have 'const' on the method name and format */
- if ((result = PyObject_CallMethod(ib->editor, (char *)"apply_textdelta",
- (char *)"(O)", ib->baton)) == NULL)
+ if ((result = PyObject_CallMethod(editor, (char *)"apply_textdelta",
+ (char *)"(O)", baton_item)) == NULL)
{
err = callback_exception_error();
goto finished;
@@ -2637,22 +2881,33 @@ static svn_error_t *parse_fn3_apply_text
in Python. */
if (result == Py_None)
{
- Py_DECREF(result);
-
*handler = svn_delta_noop_window_handler;
*handler_baton = NULL;
}
else
{
- /* return the thunk for invoking the handler. the baton takes our
- 'result' reference, which is the handler. */
+ apr_pool_t *pool;
+ /* return the thunk for invoking the handler. the baton creates
+ new reference of our 'result' reference, which is the handler,
+ so we release it even if no error. */
*handler = window_handler;
- *handler_baton = result;
+ if (svn_swig_ConvertPtrString(py_pool, (void **)&pool,
+ "apr_pool_t *") == -1)
+ {
+ err = type_conversion_error("apr_pool_t *");
+ goto finished;
+ }
+ if ((*handler_baton = make_baton(pool, ib, result)) == NULL)
+ {
+ err = callback_exception_error();
+ goto finished;
+ }
}
err = SVN_NO_ERROR;
finished:
+ Py_XDECREF(result);
svn_swig_py_release_py_lock();
return err;
}
@@ -2660,13 +2915,13 @@ static svn_error_t *parse_fn3_apply_text
static svn_error_t *parse_fn3_close_node(void *node_baton)
{
- return close_baton(node_baton, "close_node");
+ return close_baton(node_baton, "close_node", FALSE);
}
static svn_error_t *parse_fn3_close_revision(void *revision_baton)
{
- return close_baton(revision_baton, "close_revision");
+ return close_baton(revision_baton, "close_revision", FALSE);
}
@@ -2686,26 +2941,11 @@ static const svn_repos_parse_fns3_t thun
parse_fn3_close_revision
};
-static apr_status_t
-svn_swig_py_parse_fns3_destroy(void *parse_baton)
-{
- close_baton(parse_baton, "_close_dumpstream");
- return APR_SUCCESS;
-}
-
void svn_swig_py_make_parse_fns3(const svn_repos_parse_fns3_t **parse_fns3,
- void **parse_baton,
- PyObject *py_parse_fns3,
apr_pool_t *pool)
{
*parse_fns3 = &thunk_parse_fns3_vtable;
- *parse_baton = make_baton(pool, py_parse_fns3, NULL);
-
- /* Dump stream vtable does not provide a method which is called right before
- the end of the parsing (similar to close_edit/abort_edit in delta editor).
- Thus, register a pool clean-up routine to release this parse baton. */
- apr_pool_cleanup_register(pool, *parse_baton, svn_swig_py_parse_fns3_destroy,
- apr_pool_cleanup_null);
+ return;
}
@@ -2951,7 +3191,7 @@ void svn_swig_py_notify_func(void *baton
svn_swig_py_acquire_py_lock();
/* As caller can't understand Python context and we can't notify if
- Python call back function raise exception to caller, we must catch it
+ Python callback function raise exception to caller, we must catch it
if it is occurred, and restore error indicator */
PyErr_Fetch(&exc_type, &exc, &exc_traceback);
@@ -3001,7 +3241,7 @@ void svn_swig_py_notify_func2(void *bato
svn_swig_py_acquire_py_lock();
/* As caller can't understand Python context and we can't notify if
- Python call back function raise exception to caller, we must catch it
+ Python callback function raise exception to caller, we must catch it
if it is occurred, and restore error indicator */
PyErr_Fetch(&exc_type, &exc, &exc_traceback);
@@ -3044,7 +3284,7 @@ void svn_swig_py_status_func(void *baton
svn_swig_py_acquire_py_lock();
/* As caller can't understand Python context and we can't notify if
- Python call back function raise exception to caller, we must catch it
+ Python callback function raise exception to caller, we must catch it
if it is occurred, and restore error indicator */
PyErr_Fetch(&exc_type, &exc, &exc_traceback);
@@ -3193,7 +3433,7 @@ void svn_swig_py_status_func2(void *bato
svn_swig_py_acquire_py_lock();
/* As caller can't understand Python context and we can't notify if
- Python call back function raise exception to caller, we must catch it
+ Python callback function raise exception to caller, we must catch it
if it is occurred, and restore error indicator */
PyErr_Fetch(&exc_type, &exc, &exc_traceback);
@@ -4478,7 +4718,7 @@ ra_callbacks_progress_func(apr_off_t pro
svn_swig_py_acquire_py_lock();
/* As caller can't understand Python context and we can't notify if
- Python call back function raise exception to caller, we must catch it
+ Python callback function raise exception to caller, we must catch it
if it is occurred, and restore error indicator */
PyErr_Fetch(&exc_type, &exc, &exc_traceback);
@@ -5389,7 +5629,7 @@ svn_swig_py_config_enumerator2(const cha
svn_swig_py_acquire_py_lock();
/* As caller can't understand Python context and we can't notify if
- Python call back function raise exception to caller, we must catch it
+ Python callback function raise exception to caller, we must catch it
if it is occurred, and restore error indicator */
PyErr_Fetch(&exc_type, &exc, &exc_traceback);
@@ -5447,7 +5687,7 @@ svn_swig_py_config_section_enumerator2(c
svn_swig_py_acquire_py_lock();
/* As caller can't understand Python context and we can't notify if
- Python call back function raise exception to caller, we must catch it
+ Python callback function raise exception to caller, we must catch it
if it is occurred, and restore error indicator */
PyErr_Fetch(&exc_type, &exc, &exc_traceback);