You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/08/01 16:22:08 UTC
svn commit: r1509247 [1/3] - in /subversion/branches/fsx: ./ subversion/
subversion/bindings/cxxhl/src/ subversion/bindings/cxxhl/src/aprwrap/
subversion/bindings/cxxhl/tests/ subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache...
Author: stefan2
Date: Thu Aug 1 14:22:03 2013
New Revision: 1509247
URL: http://svn.apache.org/r1509247
Log:
On the fsx branch: sync with /trunk and resolve conflicts
in spillbuf.c and spillbuf_test.c.
Added:
subversion/branches/fsx/subversion/bindings/javahl/native/RevisionRangeList.cpp
- copied unchanged from r1509236, subversion/trunk/subversion/bindings/javahl/native/RevisionRangeList.cpp
subversion/branches/fsx/subversion/bindings/javahl/native/RevisionRangeList.h
- copied unchanged from r1509236, subversion/trunk/subversion/bindings/javahl/native/RevisionRangeList.h
subversion/branches/fsx/subversion/bindings/javahl/native/org_apache_subversion_javahl_types_RevisionRangeList.cpp
- copied unchanged from r1509236, subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_types_RevisionRangeList.cpp
subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRangeList.java
- copied unchanged from r1509236, subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRangeList.java
Modified:
subversion/branches/fsx/ (props changed)
subversion/branches/fsx/Makefile.in
subversion/branches/fsx/autogen.sh
subversion/branches/fsx/build.conf
subversion/branches/fsx/configure.ac
subversion/branches/fsx/subversion/bindings/cxxhl/src/aprwrap/hash.hpp
subversion/branches/fsx/subversion/bindings/cxxhl/src/exception.cpp
subversion/branches/fsx/subversion/bindings/cxxhl/tests/test_aprwrap.cpp
subversion/branches/fsx/subversion/bindings/cxxhl/tests/test_exception.cpp
subversion/branches/fsx/subversion/bindings/javahl/native/CreateJ.cpp
subversion/branches/fsx/subversion/bindings/javahl/native/CreateJ.h
subversion/branches/fsx/subversion/bindings/javahl/native/RemoteSession.cpp
subversion/branches/fsx/subversion/bindings/javahl/native/RemoteSession.h
subversion/branches/fsx/subversion/bindings/javahl/native/RevisionRange.cpp
subversion/branches/fsx/subversion/bindings/javahl/native/RevisionRange.h
subversion/branches/fsx/subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp
subversion/branches/fsx/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp
subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java
subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java
subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java
subversion/branches/fsx/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
subversion/branches/fsx/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
subversion/branches/fsx/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
subversion/branches/fsx/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
subversion/branches/fsx/subversion/bindings/swig/python/svn/core.py
subversion/branches/fsx/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
subversion/branches/fsx/subversion/include/private/svn_subr_private.h
subversion/branches/fsx/subversion/include/svn_config.h
subversion/branches/fsx/subversion/include/svn_hash.h
subversion/branches/fsx/subversion/include/svn_sorts.h
subversion/branches/fsx/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
subversion/branches/fsx/subversion/libsvn_client/add.c
subversion/branches/fsx/subversion/libsvn_client/cat.c
subversion/branches/fsx/subversion/libsvn_client/changelist.c
subversion/branches/fsx/subversion/libsvn_client/cleanup.c
subversion/branches/fsx/subversion/libsvn_client/commit.c
subversion/branches/fsx/subversion/libsvn_client/commit_util.c
subversion/branches/fsx/subversion/libsvn_client/copy.c
subversion/branches/fsx/subversion/libsvn_client/copy_foreign.c
subversion/branches/fsx/subversion/libsvn_client/ctx.c
subversion/branches/fsx/subversion/libsvn_client/delete.c
subversion/branches/fsx/subversion/libsvn_client/deprecated.c
subversion/branches/fsx/subversion/libsvn_client/diff.c
subversion/branches/fsx/subversion/libsvn_client/diff_local.c
subversion/branches/fsx/subversion/libsvn_client/diff_summarize.c
subversion/branches/fsx/subversion/libsvn_client/export.c
subversion/branches/fsx/subversion/libsvn_client/externals.c
subversion/branches/fsx/subversion/libsvn_client/import.c
subversion/branches/fsx/subversion/libsvn_client/info.c
subversion/branches/fsx/subversion/libsvn_client/iprops.c
subversion/branches/fsx/subversion/libsvn_client/list.c
subversion/branches/fsx/subversion/libsvn_client/locking_commands.c
subversion/branches/fsx/subversion/libsvn_client/log.c
subversion/branches/fsx/subversion/libsvn_client/merge.c
subversion/branches/fsx/subversion/libsvn_client/mergeinfo.c
subversion/branches/fsx/subversion/libsvn_client/patch.c
subversion/branches/fsx/subversion/libsvn_client/prop_commands.c
subversion/branches/fsx/subversion/libsvn_client/ra.c
subversion/branches/fsx/subversion/libsvn_client/repos_diff.c
subversion/branches/fsx/subversion/libsvn_client/resolved.c
subversion/branches/fsx/subversion/libsvn_client/revert.c
subversion/branches/fsx/subversion/libsvn_client/status.c
subversion/branches/fsx/subversion/libsvn_client/switch.c
subversion/branches/fsx/subversion/libsvn_client/update.c
subversion/branches/fsx/subversion/libsvn_client/util.c
subversion/branches/fsx/subversion/libsvn_delta/compat.c
subversion/branches/fsx/subversion/libsvn_delta/xdelta.c
subversion/branches/fsx/subversion/libsvn_diff/parse-diff.c
subversion/branches/fsx/subversion/libsvn_diff/util.c
subversion/branches/fsx/subversion/libsvn_fs/access.c
subversion/branches/fsx/subversion/libsvn_fs/fs-loader.c
subversion/branches/fsx/subversion/libsvn_fs_base/bdb/changes-table.c
subversion/branches/fsx/subversion/libsvn_fs_base/bdb/env.c
subversion/branches/fsx/subversion/libsvn_fs_base/dag.c
subversion/branches/fsx/subversion/libsvn_fs_base/fs.c
subversion/branches/fsx/subversion/libsvn_fs_base/lock.c
subversion/branches/fsx/subversion/libsvn_fs_base/revs-txns.c
subversion/branches/fsx/subversion/libsvn_fs_base/tree.c
subversion/branches/fsx/subversion/libsvn_fs_fs/caching.c
subversion/branches/fsx/subversion/libsvn_fs_fs/fs_fs.c
subversion/branches/fsx/subversion/libsvn_fs_fs/lock.c
subversion/branches/fsx/subversion/libsvn_fs_fs/temp_serializer.c
subversion/branches/fsx/subversion/libsvn_fs_fs/tree.c
subversion/branches/fsx/subversion/libsvn_fs_util/fs-util.c
subversion/branches/fsx/subversion/libsvn_fs_x/ (props changed)
subversion/branches/fsx/subversion/libsvn_ra/compat.c
subversion/branches/fsx/subversion/libsvn_ra/deprecated.c
subversion/branches/fsx/subversion/libsvn_ra/ra_loader.c
subversion/branches/fsx/subversion/libsvn_ra_local/ra_plugin.c
subversion/branches/fsx/subversion/libsvn_ra_serf/blame.c
subversion/branches/fsx/subversion/libsvn_ra_serf/blncache.c
subversion/branches/fsx/subversion/libsvn_ra_serf/commit.c
subversion/branches/fsx/subversion/libsvn_ra_serf/getlocations.c
subversion/branches/fsx/subversion/libsvn_ra_serf/getlocationsegments.c
subversion/branches/fsx/subversion/libsvn_ra_serf/getlocks.c
subversion/branches/fsx/subversion/libsvn_ra_serf/inherited_props.c
subversion/branches/fsx/subversion/libsvn_ra_serf/log.c
subversion/branches/fsx/subversion/libsvn_ra_serf/merge.c
subversion/branches/fsx/subversion/libsvn_ra_serf/mergeinfo.c
subversion/branches/fsx/subversion/libsvn_ra_serf/options.c
subversion/branches/fsx/subversion/libsvn_ra_serf/property.c
subversion/branches/fsx/subversion/libsvn_ra_serf/replay.c
subversion/branches/fsx/subversion/libsvn_ra_serf/serf.c
subversion/branches/fsx/subversion/libsvn_ra_serf/update.c
subversion/branches/fsx/subversion/libsvn_ra_serf/util.c
subversion/branches/fsx/subversion/libsvn_ra_serf/xml.c
subversion/branches/fsx/subversion/libsvn_ra_svn/client.c
subversion/branches/fsx/subversion/libsvn_ra_svn/editorp.c
subversion/branches/fsx/subversion/libsvn_ra_svn/marshal.c
subversion/branches/fsx/subversion/libsvn_repos/authz.c
subversion/branches/fsx/subversion/libsvn_repos/commit.c
subversion/branches/fsx/subversion/libsvn_repos/delta.c
subversion/branches/fsx/subversion/libsvn_repos/deprecated.c
subversion/branches/fsx/subversion/libsvn_repos/fs-wrap.c
subversion/branches/fsx/subversion/libsvn_repos/hooks.c
subversion/branches/fsx/subversion/libsvn_repos/log.c
subversion/branches/fsx/subversion/libsvn_repos/replay.c
subversion/branches/fsx/subversion/libsvn_repos/reporter.c
subversion/branches/fsx/subversion/libsvn_repos/repos.c
subversion/branches/fsx/subversion/libsvn_repos/rev_hunt.c
subversion/branches/fsx/subversion/libsvn_subr/auth.c
subversion/branches/fsx/subversion/libsvn_subr/cmdline.c
subversion/branches/fsx/subversion/libsvn_subr/compat.c
subversion/branches/fsx/subversion/libsvn_subr/config.c
subversion/branches/fsx/subversion/libsvn_subr/config_auth.c
subversion/branches/fsx/subversion/libsvn_subr/deprecated.c
subversion/branches/fsx/subversion/libsvn_subr/dso.c
subversion/branches/fsx/subversion/libsvn_subr/hash.c
subversion/branches/fsx/subversion/libsvn_subr/io.c
subversion/branches/fsx/subversion/libsvn_subr/mergeinfo.c
subversion/branches/fsx/subversion/libsvn_subr/opt.c
subversion/branches/fsx/subversion/libsvn_subr/properties.c
subversion/branches/fsx/subversion/libsvn_subr/simple_providers.c
subversion/branches/fsx/subversion/libsvn_subr/sorts.c
subversion/branches/fsx/subversion/libsvn_subr/spillbuf.c
subversion/branches/fsx/subversion/libsvn_subr/ssl_client_cert_providers.c
subversion/branches/fsx/subversion/libsvn_subr/ssl_client_cert_pw_providers.c
subversion/branches/fsx/subversion/libsvn_subr/ssl_server_trust_providers.c
subversion/branches/fsx/subversion/libsvn_subr/subst.c
subversion/branches/fsx/subversion/libsvn_subr/types.c
subversion/branches/fsx/subversion/libsvn_subr/username_providers.c
subversion/branches/fsx/subversion/libsvn_subr/utf.c
subversion/branches/fsx/subversion/libsvn_subr/win32_crypto.c
subversion/branches/fsx/subversion/libsvn_wc/adm_crawler.c
subversion/branches/fsx/subversion/libsvn_wc/adm_files.c
subversion/branches/fsx/subversion/libsvn_wc/adm_ops.c
subversion/branches/fsx/subversion/libsvn_wc/conflicts.c
subversion/branches/fsx/subversion/libsvn_wc/copy.c
subversion/branches/fsx/subversion/libsvn_wc/deprecated.c
subversion/branches/fsx/subversion/libsvn_wc/diff_editor.c
subversion/branches/fsx/subversion/libsvn_wc/diff_local.c
subversion/branches/fsx/subversion/libsvn_wc/entries.c
subversion/branches/fsx/subversion/libsvn_wc/externals.c
subversion/branches/fsx/subversion/libsvn_wc/info.c
subversion/branches/fsx/subversion/libsvn_wc/lock.c
subversion/branches/fsx/subversion/libsvn_wc/node.c
subversion/branches/fsx/subversion/libsvn_wc/old-and-busted.c
subversion/branches/fsx/subversion/libsvn_wc/props.c
subversion/branches/fsx/subversion/libsvn_wc/revert.c
subversion/branches/fsx/subversion/libsvn_wc/status.c
subversion/branches/fsx/subversion/libsvn_wc/translate.c
subversion/branches/fsx/subversion/libsvn_wc/update_editor.c
subversion/branches/fsx/subversion/libsvn_wc/upgrade.c
subversion/branches/fsx/subversion/libsvn_wc/wc_db.c
subversion/branches/fsx/subversion/libsvn_wc/wc_db_update_move.c
subversion/branches/fsx/subversion/libsvn_wc/wc_db_wcroot.c
subversion/branches/fsx/subversion/libsvn_wc/workqueue.c
subversion/branches/fsx/subversion/mod_dav_svn/repos.c
subversion/branches/fsx/subversion/mod_dav_svn/version.c
subversion/branches/fsx/subversion/svn/cl-conflicts.c
subversion/branches/fsx/subversion/svn/commit-cmd.c
subversion/branches/fsx/subversion/svn/conflict-callbacks.c
subversion/branches/fsx/subversion/svn/diff-cmd.c
subversion/branches/fsx/subversion/svn/help-cmd.c
subversion/branches/fsx/subversion/svn/notify.c
subversion/branches/fsx/subversion/svn/propedit-cmd.c
subversion/branches/fsx/subversion/svn/propget-cmd.c
subversion/branches/fsx/subversion/svn/props.c
subversion/branches/fsx/subversion/svn/status-cmd.c
subversion/branches/fsx/subversion/svn/status.c
subversion/branches/fsx/subversion/svn/svn.c
subversion/branches/fsx/subversion/svn/util.c
subversion/branches/fsx/subversion/svn_private_config.hw
subversion/branches/fsx/subversion/svnadmin/svnadmin.c
subversion/branches/fsx/subversion/svnauth/svnauth.c
subversion/branches/fsx/subversion/svnlook/svnlook.c
subversion/branches/fsx/subversion/svnmucc/svnmucc.c
subversion/branches/fsx/subversion/svnrdump/dump_editor.c
subversion/branches/fsx/subversion/svnrdump/svnrdump.c
subversion/branches/fsx/subversion/svnrdump/util.c
subversion/branches/fsx/subversion/svnserve/serve.c
subversion/branches/fsx/subversion/svnsync/svnsync.c
subversion/branches/fsx/subversion/svnsync/sync.c
subversion/branches/fsx/subversion/tests/cmdline/ (props changed)
subversion/branches/fsx/subversion/tests/cmdline/davautocheck.sh
subversion/branches/fsx/subversion/tests/libsvn_fs/fs-test.c
subversion/branches/fsx/subversion/tests/libsvn_fs_x/ (props changed)
subversion/branches/fsx/subversion/tests/libsvn_repos/repos-test.c
subversion/branches/fsx/subversion/tests/libsvn_subr/hashdump-test.c
subversion/branches/fsx/subversion/tests/libsvn_subr/mergeinfo-test.c
subversion/branches/fsx/subversion/tests/libsvn_subr/spillbuf-test.c
subversion/branches/fsx/subversion/tests/libsvn_subr/string-test.c
subversion/branches/fsx/subversion/tests/libsvn_subr/subst_translate-test.c
subversion/branches/fsx/subversion/tests/libsvn_wc/conflict-data-test.c
subversion/branches/fsx/subversion/tests/libsvn_wc/op-depth-test.c
subversion/branches/fsx/subversion/tests/libsvn_wc/wc-test.c
subversion/branches/fsx/subversion/tests/svn_test_fs.c
subversion/branches/fsx/tools/dev/fsfs-reorg.c
subversion/branches/fsx/tools/dist/backport.pl
subversion/branches/fsx/tools/server-side/fsfs-stats.c
Propchange: subversion/branches/fsx/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1507845-1509236
Merged /subversion/branches/fsfs-format7:r1471208
Modified: subversion/branches/fsx/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/Makefile.in?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/Makefile.in (original)
+++ subversion/branches/fsx/Makefile.in Thu Aug 1 14:22:03 2013
@@ -349,8 +349,8 @@ TEST_SHLIB_VAR_SWIG_RB=\
done; \
export @SVN_APR_SHLIB_PATH_VAR@; \
fi;
-
-APXS = @APXS@
+
+APXS = @APXS@
PYTHON = @PYTHON@
PERL = @PERL@
Modified: subversion/branches/fsx/autogen.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/autogen.sh?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/autogen.sh (original)
+++ subversion/branches/fsx/autogen.sh Thu Aug 1 14:22:03 2013
@@ -203,7 +203,7 @@ echo "./configure --enable-maintainer-mo
echo "./configure --disable-shared"
echo "./configure --enable-maintainer-mode --disable-shared"
echo "./configure --disable-optimize --enable-debug"
-echo "./configure CUSERFLAGS='--flags-for-C' CXXUSERFLAGS='--flags-for-C++'"
+echo "./configure CFLAGS='--flags-for-C' CXXFLAGS='--flags-for-C++'"
echo ""
echo "Note: If you wish to run a Subversion HTTP server, you will need"
echo "Apache 2.x. See the INSTALL file for details."
Modified: subversion/branches/fsx/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/build.conf?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/build.conf (original)
+++ subversion/branches/fsx/build.conf Thu Aug 1 14:22:03 2013
@@ -70,6 +70,7 @@ private-built-includes =
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LoadedLib.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LoadedLibIterator.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_Revision.h
+ subversion/bindings/javahl/include/org_apache_subversion_javahl_types_RevisionRangeList.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_callback_UserPasswordCallback.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_RemoteSession.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_RemoteFactory.h
Modified: subversion/branches/fsx/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/configure.ac?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/configure.ac (original)
+++ subversion/branches/fsx/configure.ac Thu Aug 1 14:22:03 2013
@@ -167,7 +167,6 @@ if test -n "$sqlite_compat_ver" && test
fi
SVN_CHECK_FOR_ATOMIC_BUILTINS
-
if test "$svn_cv_atomic_builtins" = "yes"; then
AC_DEFINE(SVN_HAS_ATOMIC_BUILTINS, 1, [Define if compiler provides atomic builtins])
fi
Modified: subversion/branches/fsx/subversion/bindings/cxxhl/src/aprwrap/hash.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/cxxhl/src/aprwrap/hash.hpp?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/cxxhl/src/aprwrap/hash.hpp (original)
+++ subversion/branches/fsx/subversion/bindings/cxxhl/src/aprwrap/hash.hpp Thu Aug 1 14:22:03 2013
@@ -103,6 +103,7 @@ public:
public:
typedef Key::key_type key_type;
typedef void* value_type;
+ typedef unsigned int size_type;
/**
* Create and proxy a new APR hash table in @a pool.
@@ -129,7 +130,18 @@ public:
/**
* Return the wrapped APR hash table.
*/
- apr_hash_t* hash() const throw() { return m_hash; }
+ apr_hash_t* hash() const throw()
+ {
+ return m_hash;
+ }
+
+ /**
+ * Return the number of key-value pairs in the wrapped hash table.
+ */
+ size_type size() const throw()
+ {
+ return apr_hash_count(m_hash);
+ }
/**
* Set @a key = @a value in the wrapped hash table.
@@ -277,7 +289,18 @@ public:
/**
* @return The wrapped APR hash table.
*/
- apr_hash_t* hash() const throw() { return inherited::hash(); }
+ apr_hash_t* hash() const throw()
+ {
+ return inherited::hash();
+ }
+
+ /**
+ * Return the number of key-value pairs in the wrapped hash table.
+ */
+ size_type size() const throw()
+ {
+ return inherited::size();
+ }
/**
* Set @a key = @a value in the wrapped hash table.
Modified: subversion/branches/fsx/subversion/bindings/cxxhl/src/exception.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/cxxhl/src/exception.cpp?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/cxxhl/src/exception.cpp (original)
+++ subversion/branches/fsx/subversion/bindings/cxxhl/src/exception.cpp Thu Aug 1 14:22:03 2013
@@ -290,14 +290,18 @@ void checked_call(svn_error_t* err)
if (!err)
return;
- struct ErrorBuilder : public Cancelled
+ struct ErrorBuilder : public Error
{
explicit ErrorBuilder (ErrorDescription::shared_ptr description)
- : Cancelled(description)
+ : Error(description)
{}
+ };
- Error error() { return static_cast<Error>(*this); }
- Error cancelled() { return static_cast<Cancelled>(*this); }
+ struct CancelledBuilder : public Cancelled
+ {
+ explicit CancelledBuilder (ErrorDescription::shared_ptr description)
+ : Cancelled(description)
+ {}
};
ErrorDescription::shared_ptr description;
@@ -316,9 +320,9 @@ void checked_call(svn_error_t* err)
svn_error_clear(err);
if (cancelled)
- throw ErrorBuilder(description).cancelled();
+ throw CancelledBuilder(description);
else
- throw ErrorBuilder(description).error();
+ throw ErrorBuilder(description);
}
} // namespace detail
Modified: subversion/branches/fsx/subversion/bindings/cxxhl/tests/test_aprwrap.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/cxxhl/tests/test_aprwrap.cpp?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/cxxhl/tests/test_aprwrap.cpp (original)
+++ subversion/branches/fsx/subversion/bindings/cxxhl/tests/test_aprwrap.cpp Thu Aug 1 14:22:03 2013
@@ -144,10 +144,10 @@ TEST(Arrays, Indexing)
APR::Pool pool;
Array array(fill_array(pool));
- EXPECT_EQ(array[0], APR_ARRAY_IDX(array.array(), 0, Array::value_type));
- EXPECT_EQ(array[array.size() - 1], APR_ARRAY_IDX(array.array(),
- array.array()->nelts - 1,
- Array::value_type));
+ EXPECT_STREQ(array[0], APR_ARRAY_IDX(array.array(), 0, Array::value_type));
+ EXPECT_STREQ(array[array.size() - 1], APR_ARRAY_IDX(array.array(),
+ array.array()->nelts - 1,
+ Array::value_type));
}
TEST(Arrays, CheckedIndexing)
@@ -157,10 +157,10 @@ TEST(Arrays, CheckedIndexing)
APR::Pool pool;
Array array(fill_array(pool));
- EXPECT_EQ(array.at(0), APR_ARRAY_IDX(array.array(), 0, Array::value_type));
- EXPECT_EQ(array.at(array.size() - 1), APR_ARRAY_IDX(array.array(),
- array.array()->nelts - 1,
- Array::value_type));
+ EXPECT_STREQ(array.at(0), APR_ARRAY_IDX(array.array(), 0, Array::value_type));
+ EXPECT_STREQ(array.at(array.size() - 1),
+ APR_ARRAY_IDX(array.array(), array.array()->nelts - 1,
+ Array::value_type));
}
TEST(Arrays, Iteration)
@@ -178,8 +178,8 @@ TEST(Arrays, Iteration)
bool operator()(Array::value_type& value)
{
- EXPECT_EQ(value, APR_ARRAY_IDX(m_raw_array, m_index,
- Array::value_type));
+ EXPECT_STREQ(value, APR_ARRAY_IDX(m_raw_array, m_index,
+ Array::value_type));
++m_index;
return true;
}
@@ -207,8 +207,8 @@ TEST(Arrays, ConstIteration)
bool operator()(const Array::value_type& value)
{
- EXPECT_EQ(value, APR_ARRAY_IDX(m_raw_array, m_index,
- Array::value_type));
+ EXPECT_STREQ(value, APR_ARRAY_IDX(m_raw_array, m_index,
+ Array::value_type));
++m_index;
return true;
}
@@ -237,10 +237,10 @@ TEST(Arrays, Push)
array.push("decimus");
EXPECT_EQ(point + 3, array.size());
- EXPECT_EQ(first, array[0]);
- EXPECT_EQ(last, array[point - 1]);
- EXPECT_EQ("octavius", array[point]);
- EXPECT_EQ("decimus", array[array.size() - 1]);
+ EXPECT_STREQ(first, array[0]);
+ EXPECT_STREQ(last, array[point - 1]);
+ EXPECT_STREQ("octavius", array[point]);
+ EXPECT_STREQ("decimus", array[array.size() - 1]);
}
TEST(Arrays, Pop)
@@ -306,10 +306,10 @@ TEST(ConstArrays, Indexing)
APR::Pool pool;
Array array(fill_array(pool));
- EXPECT_EQ(array[0], APR_ARRAY_IDX(array.array(), 0, Array::value_type));
- EXPECT_EQ(array[array.size() - 1], APR_ARRAY_IDX(array.array(),
- array.array()->nelts - 1,
- Array::value_type));
+ EXPECT_STREQ(array[0], APR_ARRAY_IDX(array.array(), 0, Array::value_type));
+ EXPECT_STREQ(array[array.size() - 1], APR_ARRAY_IDX(array.array(),
+ array.array()->nelts - 1,
+ Array::value_type));
}
TEST(ConstArrays, CheckedIndexing)
@@ -319,10 +319,10 @@ TEST(ConstArrays, CheckedIndexing)
APR::Pool pool;
Array array(fill_array(pool));
- EXPECT_EQ(array.at(0), APR_ARRAY_IDX(array.array(), 0, Array::value_type));
- EXPECT_EQ(array.at(array.size() - 1), APR_ARRAY_IDX(array.array(),
- array.array()->nelts - 1,
- Array::value_type));
+ EXPECT_STREQ(array.at(0), APR_ARRAY_IDX(array.array(), 0, Array::value_type));
+ EXPECT_STREQ(array.at(array.size() - 1),
+ APR_ARRAY_IDX(array.array(), array.array()->nelts - 1,
+ Array::value_type));
}
TEST(ConstArrays, Iteration)
@@ -340,8 +340,8 @@ TEST(ConstArrays, Iteration)
bool operator()(const Array::value_type& value)
{
- EXPECT_EQ(value, APR_ARRAY_IDX(m_raw_array, m_index,
- Array::value_type));
+ EXPECT_STREQ(value, APR_ARRAY_IDX(m_raw_array, m_index,
+ Array::value_type));
++m_index;
return true;
}
@@ -358,58 +358,78 @@ TEST(ConstArrays, Iteration)
// Hash tables
//
-// TODO: Convert to gmock
+TEST(Hashes, StringHash)
+{
+ typedef APR::Hash<char, const char> H;
+
+ APR::Pool pool;
+ H hash(pool);
+ hash.set("aa", "a");
+ hash.set("bbb", "b");
+ hash.set("cccc", "c");
-#include "../src/aprwrap.hpp"
-static void hashtest()
+ EXPECT_EQ(3, hash.size());
+ EXPECT_STREQ("a", hash.get("aa"));
+ EXPECT_STREQ("b", hash.get("bbb"));
+ EXPECT_STREQ("c", hash.get("cccc"));
+}
+
+TEST(Hashes, FixedStringHash)
{
+ // The point of this test is to verify that the key-length parameter
+ // of the template actually limits the lenght of the keys.
typedef APR::Hash<char, const char, 2> H;
- typedef APR::Array<H::key_type> A;
- typedef APR::ConstArray<A::value_type> CA;
APR::Pool pool;
- struct CB : public H::Iteration
- {
- A m_keys;
+ H hash(pool);
+ hash.set("aa&qux", "a");
+ hash.set("bb#foo", "b");
+ hash.set("cc@bar", "c");
- CB(const APR::Pool& array_pool)
- : m_keys(array_pool)
- {}
+ EXPECT_EQ(3, hash.size());
+ EXPECT_STREQ("a", hash.get("aa%foo"));
+ EXPECT_STREQ("b", hash.get("bb*bar"));
+ EXPECT_STREQ("c", hash.get("cc$qux"));
+}
- bool operator() (const H::Key& key, H::value_type value)
- {
- m_keys.push(key.get());
- return true;
- }
- } hash_callback(pool);
+TEST(Hashes, Delete)
+{
+ typedef APR::Hash<char, const char> H;
+ APR::Pool pool;
H hash(pool);
+ hash.set("aa", "a");
+ hash.set("bbb", "b");
+ hash.set("cccc", "c");
+
+ hash.del("bbb");
- hash.set("a", "aaa");
- hash.set("c", "ccc");
- hash.set("x", "bbb");
+ EXPECT_EQ(2, hash.size());
+ EXPECT_STREQ("a", hash.get("aa"));
+ EXPECT_STREQ("c", hash.get("cccc"));
+}
- hash.iterate(hash_callback, pool);
+TEST(Hashes, Iterate)
+{
+ typedef APR::Hash<char, const char> H;
- struct AB : public A::ConstIteration
- {
- const H& m_hash;
+ APR::Pool pool;
+ H hash(pool);
+ hash.set("aa", "a");
+ hash.set("bbb", "b");
+ hash.set("cccc", "c");
- AB(const H& hash_reference)
- : m_hash(hash_reference)
- {}
+ struct C : public H::Iteration
+ {
+ H& m_hash;
+ explicit C(H& hashref) : m_hash(hashref) {}
- bool operator() (const A::value_type& value)
+ bool operator()(const H::Key& key, H::value_type value)
{
- std::cerr << value << " = " << m_hash.get(value) << std::endl;
+ EXPECT_STREQ(value, m_hash.get(key));
return true;
}
- } array_callback(hash);
-
- CA keys(hash_callback.m_keys);
- keys.iterate(array_callback);
+ } callback(hash);
- std::cerr << keys[0] << " maps to " << hash_callback.m_keys[0] << std::endl;
- std::cerr << keys.at(1) << " maps to " << hash_callback.m_keys.at(1) << std::endl;
- std::cerr << keys[2] << " maps to " << hash_callback.m_keys[2] << std::endl;
+ hash.iterate(callback, pool);
}
Modified: subversion/branches/fsx/subversion/bindings/cxxhl/tests/test_exception.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/cxxhl/tests/test_exception.cpp?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/cxxhl/tests/test_exception.cpp (original)
+++ subversion/branches/fsx/subversion/bindings/cxxhl/tests/test_exception.cpp Thu Aug 1 14:22:03 2013
@@ -19,8 +19,6 @@
* ====================================================================
*/
-// ### TODO: Convert to Googlemock/Googletest
-
#include <algorithm>
#include <cstdio>
#include <iomanip>
@@ -32,49 +30,12 @@
#include <apr.h>
#include "svn_error.h"
+#undef TRUE
+#undef FALSE
-namespace {
-void trace(const SVN::Error::Message& msg)
-{
- std::cout << " ";
- if (!msg.trace())
- std::cout << "test_exception: E"
- << std::setw(6) << std::setfill('0') << std::right
- << msg.code() << ':' << ' ';
- std::cout << msg.message() << std::endl;
-}
-
-void traceall(const char *message, const SVN::Error& err)
-{
- typedef SVN::Error::MessageList MessageList;
- std::cout << message << std::endl;
- std::cout << "Traced Messages:" << std::endl;
- MessageList ml = err.traced_messages();
- std::for_each(ml.begin(), ml.end(), trace);
- std::cout << "Just Messages:" << std::endl;
- ml = err.messages();
- std::for_each(ml.begin(), ml.end(), trace);
-}
-
-void tracecheck(svn_error_t* err)
-{
- std::cout << "C-API handler:" << std::endl;
- svn_handle_error2(err, stdout, false, " test_exception: ");
- svn_error_clear(err);
-}
-
-svn_error_t* make_cancel_test_error()
-{
- svn_error_t* err;
- err = svn_error_create(SVN_ERR_CANCELLED, NULL, NULL);
- err = svn_error_create(SVN_ERR_CANCELLED, err, NULL);
- err = svn_error_trace(err);
- err = svn_error_create(SVN_ERR_TEST_FAILED, err, "original message");
- err = svn_error_create(SVN_ERR_BASE, err, "wrapper message");
- err = svn_error_trace(err);
- return err;
-}
+#include <gmock/gmock.h>
+namespace {
svn_error_t* make_error_test_error()
{
svn_error_t* err;
@@ -88,64 +49,85 @@ svn_error_t* make_error_test_error()
}
} // anonymous namespace
-
-bool test_cancel()
+TEST(Exceptions, CatchError)
{
try
{
- SVN::detail::checked_call(make_cancel_test_error());
- }
- catch (const SVN::Cancelled& err)
- {
- traceall("Caught: CANCELLED", err);
- tracecheck(make_cancel_test_error());
- return true;
+ SVN::detail::checked_call(make_error_test_error());
}
catch (const SVN::Error& err)
{
- traceall("Caught: ERROR", err);
- tracecheck(make_cancel_test_error());
- return false;
+ SVN::Error::MessageList ml = err.messages();
+ EXPECT_EQ(3, ml.size());
+ EXPECT_EQ(SVN_ERR_UNSUPPORTED_FEATURE, ml[0].code());
+ EXPECT_EQ(SVN_ERR_BASE, ml[1].code());
+ EXPECT_EQ(SVN_ERR_TEST_FAILED, ml[2].code());
+
+ SVN::Error::MessageList tml = err.traced_messages();
+#ifdef SVN_DEBUG
+ EXPECT_EQ(8, tml.size());
+ EXPECT_EQ(SVN_ERR_UNSUPPORTED_FEATURE, tml[0].code());
+ EXPECT_EQ(SVN_ERR_UNSUPPORTED_FEATURE, tml[1].code());
+ EXPECT_EQ(SVN_ERR_UNSUPPORTED_FEATURE, tml[2].code());
+ EXPECT_EQ(SVN_ERR_BASE, tml[3].code());
+ EXPECT_EQ(SVN_ERR_BASE, tml[4].code());
+ EXPECT_EQ(SVN_ERR_BASE, tml[5].code());
+ EXPECT_EQ(SVN_ERR_TEST_FAILED, tml[6].code());
+ EXPECT_EQ(SVN_ERR_TEST_FAILED, tml[7].code());
+#else // !SVN_DEBUG
+ EXPECT_EQ(3, tml.size());
+ EXPECT_EQ(SVN_ERR_UNSUPPORTED_FEATURE, tml[0].code());
+ EXPECT_EQ(SVN_ERR_BASE, tml[1].code());
+ EXPECT_EQ(SVN_ERR_TEST_FAILED, tml[2].code());
+#endif // SVN_DEBUG
}
- catch (...)
- {
- return false;
- }
- return false;
}
-int test_error()
+
+namespace {
+svn_error_t* make_cancel_test_error()
+{
+ svn_error_t* err;
+ err = svn_error_create(SVN_ERR_CANCELLED, NULL, NULL);
+ err = svn_error_create(SVN_ERR_CANCELLED, err, NULL);
+ err = svn_error_trace(err);
+ err = svn_error_create(SVN_ERR_TEST_FAILED, err, "original message");
+ err = svn_error_create(SVN_ERR_BASE, err, "wrapper message");
+ err = svn_error_trace(err);
+ return err;
+}
+} // anonymous namespace
+
+TEST(Exceptions, CatchCancelled)
{
try
{
- SVN::detail::checked_call(make_error_test_error());
+ SVN::detail::checked_call(make_cancel_test_error());
}
catch (const SVN::Cancelled& err)
{
- traceall("Caught: CANCELLED", err);
- tracecheck(make_error_test_error());
- return false;
+ SVN::Error::MessageList ml = err.messages();
+ EXPECT_EQ(3, ml.size());
+ EXPECT_EQ(SVN_ERR_BASE, ml[0].code());
+ EXPECT_EQ(SVN_ERR_TEST_FAILED, ml[1].code());
+ EXPECT_EQ(SVN_ERR_CANCELLED, ml[2].code());
+
+ SVN::Error::MessageList tml = err.traced_messages();
+#ifdef SVN_DEBUG
+ EXPECT_EQ(8, tml.size());
+ EXPECT_EQ(SVN_ERR_BASE, tml[0].code());
+ EXPECT_EQ(SVN_ERR_BASE, tml[1].code());
+ EXPECT_EQ(SVN_ERR_BASE, tml[2].code());
+ EXPECT_EQ(SVN_ERR_TEST_FAILED, tml[3].code());
+ EXPECT_EQ(SVN_ERR_TEST_FAILED, tml[4].code());
+ EXPECT_EQ(SVN_ERR_CANCELLED, tml[5].code());
+ EXPECT_EQ(SVN_ERR_CANCELLED, tml[6].code());
+ EXPECT_EQ(SVN_ERR_CANCELLED, tml[7].code());
+#else // !SVN_DEBUG
+ EXPECT_EQ(3, tml.size());
+ EXPECT_EQ(SVN_ERR_BASE, tml[0].code());
+ EXPECT_EQ(SVN_ERR_TEST_FAILED, tml[1].code());
+ EXPECT_EQ(SVN_ERR_CANCELLED, tml[2].code());
+#endif // SVN_DEBUG
}
- catch (const SVN::Error& err)
- {
- traceall("Caught: ERROR", err);
- tracecheck(make_error_test_error());
- return true;
- }
- catch (...)
- {
- return false;
- }
- return false;
-}
-
-#include <gmock/gmock.h>
-
-TEST(Exceptions, DummyTest)
-{
- const char *stat = (test_cancel() ? "OK" : "ERROR");
- std::cerr << "test_cancel .... " << stat << std::endl;
-
- stat = (test_error() ? "OK" : "ERROR");
- std::cerr << "test_error ..... " << stat << std::endl;
}
Modified: subversion/branches/fsx/subversion/bindings/javahl/native/CreateJ.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/javahl/native/CreateJ.cpp?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/javahl/native/CreateJ.cpp (original)
+++ subversion/branches/fsx/subversion/bindings/javahl/native/CreateJ.cpp Thu Aug 1 14:22:03 2013
@@ -30,6 +30,7 @@
#include "JNIStringHolder.h"
#include "EnumMapper.h"
#include "RevisionRange.h"
+#include "RevisionRangeList.h"
#include "CreateJ.h"
#include "../include/org_apache_subversion_javahl_types_Revision.h"
#include "../include/org_apache_subversion_javahl_CommitItemStateFlags.h"
@@ -1073,58 +1074,6 @@ CreateJ::CommitInfo(const svn_commit_inf
}
jobject
-CreateJ::RevisionRangeList(svn_rangelist_t *ranges)
-{
- JNIEnv *env = JNIUtil::getEnv();
-
- // Create a local frame for our references
- env->PushLocalFrame(LOCAL_FRAME_SIZE);
- if (JNIUtil::isJavaExceptionThrown())
- return NULL;
-
- jclass clazz = env->FindClass("java/util/ArrayList");
- if (JNIUtil::isJavaExceptionThrown())
- POP_AND_RETURN_NULL;
-
- static jmethodID init_mid = 0;
- if (init_mid == 0)
- {
- init_mid = env->GetMethodID(clazz, "<init>", "()V");
- if (JNIUtil::isJavaExceptionThrown())
- POP_AND_RETURN_NULL;
- }
-
- static jmethodID add_mid = 0;
- if (add_mid == 0)
- {
- add_mid = env->GetMethodID(clazz, "add", "(Ljava/lang/Object;)Z");
- if (JNIUtil::isJavaExceptionThrown())
- POP_AND_RETURN_NULL;
- }
-
- jobject jranges = env->NewObject(clazz, init_mid);
-
- for (int i = 0; i < ranges->nelts; ++i)
- {
- // Convert svn_merge_range_t *'s to Java RevisionRange objects.
- svn_merge_range_t *range =
- APR_ARRAY_IDX(ranges, i, svn_merge_range_t *);
-
- jobject jrange = RevisionRange::makeJRevisionRange(range);
- if (JNIUtil::isJavaExceptionThrown())
- POP_AND_RETURN_NULL;
-
- env->CallBooleanMethod(jranges, add_mid, jrange);
- if (JNIUtil::isJavaExceptionThrown())
- POP_AND_RETURN_NULL;
-
- env->DeleteLocalRef(jrange);
- }
-
- return env->PopLocalFrame(jranges);
-}
-
-jobject
CreateJ::StringSet(const apr_array_header_t *strings)
{
std::vector<jobject> jstrs;
@@ -1370,7 +1319,7 @@ jobject CreateJ::Mergeinfo(svn_mergeinfo
jstring jpath =
JNIUtil::makeJString(static_cast<const char*>(path));
jobject jranges =
- RevisionRangeList(static_cast<svn_rangelist_t*>(val));
+ RevisionRangeList(static_cast<svn_rangelist_t*>(val)).toList();
env->CallVoidMethod(jmergeinfo, addRevisions, jpath, jranges);
Modified: subversion/branches/fsx/subversion/bindings/javahl/native/CreateJ.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/javahl/native/CreateJ.h?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/javahl/native/CreateJ.h (original)
+++ subversion/branches/fsx/subversion/bindings/javahl/native/CreateJ.h Thu Aug 1 14:22:03 2013
@@ -82,9 +82,6 @@ class CreateJ
CommitInfo(const svn_commit_info_t *info);
static jobject
- RevisionRangeList(svn_rangelist_t *ranges);
-
- static jobject
StringSet(const apr_array_header_t *strings);
static jobject
Modified: subversion/branches/fsx/subversion/bindings/javahl/native/RemoteSession.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/javahl/native/RemoteSession.cpp?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/javahl/native/RemoteSession.cpp (original)
+++ subversion/branches/fsx/subversion/bindings/javahl/native/RemoteSession.cpp Thu Aug 1 14:22:03 2013
@@ -924,7 +924,25 @@ RemoteSession::checkPath(jstring jpath,
return EnumMapper::mapNodeKind(kind);
}
-// TODO: stat
+jobject
+RemoteSession::stat(jstring jpath, jlong jrevision)
+{
+ SVN::Pool subPool(pool);
+ Relpath path(jpath, subPool);
+ if (JNIUtil::isExceptionThrown())
+ return NULL;
+ SVN_JNI_ERR(path.error_occurred(), NULL);
+
+ svn_dirent_t* dirent;
+ SVN_JNI_ERR(svn_ra_stat(m_session, path.c_str(),
+ svn_revnum_t(jrevision),
+ &dirent, subPool.getPool()),
+ NULL);
+
+ if (dirent)
+ return CreateJ::DirEntry(path.c_str(), path.c_str(), dirent);
+ return NULL;
+}
namespace {
apr_array_header_t*
@@ -1057,7 +1075,114 @@ RemoteSession::getLocations(jstring jpat
return location_hash_to_map(locations, subPool.getPool());
}
-// TODO: getLocationSegments
+namespace {
+class LocationSegmentHandler
+{
+public:
+ static svn_error_t* callback(svn_location_segment_t* segment,
+ void* baton, apr_pool_t*)
+ {
+ LocationSegmentHandler* const self =
+ static_cast<LocationSegmentHandler*>(baton);
+ SVN_ERR_ASSERT(self->m_jresult_list != NULL);
+ self->add(segment);
+ SVN_ERR(JNIUtil::checkJavaException(SVN_ERR_BASE));
+ return SVN_NO_ERROR;
+ }
+
+ LocationSegmentHandler()
+ : m_jresult_list(NULL)
+ {
+ JNIEnv* env = JNIUtil::getEnv();
+ jclass cls = env->FindClass("java/util/ArrayList");
+ if (JNIUtil::isJavaExceptionThrown())
+ return;
+
+ static jmethodID mid = 0;
+ if (mid == 0)
+ {
+ mid = env->GetMethodID(cls, "<init>", "()V");
+ if (JNIUtil::isJavaExceptionThrown())
+ return;
+ }
+
+ jobject jresult_list = env->NewObject(cls, mid);
+ if (!JNIUtil::isJavaExceptionThrown() && jresult_list)
+ m_jresult_list = jresult_list;
+ }
+
+ jobject get() const { return m_jresult_list; }
+
+private:
+ void add(svn_location_segment_t* segment)
+ {
+ JNIEnv* env = JNIUtil::getEnv();
+ jclass cls = env->FindClass(JAVA_PACKAGE"/ISVNRemote$LocationSegment");
+ if (JNIUtil::isJavaExceptionThrown())
+ return;
+
+ static jmethodID mid = 0;
+ if (mid == 0)
+ {
+ mid = env->GetMethodID(cls, "<init>",
+ "(Ljava/lang/String;JJ)V");
+ if (JNIUtil::isJavaExceptionThrown())
+ return;
+ }
+
+ static jmethodID mid_add = 0;
+ if (mid_add == 0)
+ {
+ jclass list_cls = env->FindClass("java/util/ArrayList");
+ if (JNIUtil::isJavaExceptionThrown())
+ return;
+ mid_add = env->GetMethodID(list_cls, "add",
+ "(Ljava/lang/Object;)Z");
+ if (JNIUtil::isJavaExceptionThrown())
+ return;
+ }
+
+ jstring jpath = JNIUtil::makeJString(segment->path);
+ if (JNIUtil::isJavaExceptionThrown())
+ return;
+
+ env->CallBooleanMethod(m_jresult_list, mid_add,
+ env->NewObject(cls, mid, jpath,
+ jlong(segment->range_start),
+ jlong(segment->range_end)));
+ if (JNIUtil::isJavaExceptionThrown())
+ return;
+ env->DeleteLocalRef(jpath);
+ }
+
+ jobject m_jresult_list;
+};
+} // anonymous namespace
+
+jobject
+RemoteSession::getLocationSegments(jstring jpath, jlong jpeg_revision,
+ jlong jstart_revision, jlong jend_revision)
+{
+ SVN::Pool subPool(pool);
+ Relpath path(jpath, subPool);
+ if (JNIUtil::isExceptionThrown())
+ return NULL;
+ SVN_JNI_ERR(path.error_occurred(), NULL);
+
+ LocationSegmentHandler handler;
+ if (JNIUtil::isExceptionThrown())
+ return NULL;
+
+ SVN_JNI_ERR(svn_ra_get_location_segments(m_session, path.c_str(),
+ svn_revnum_t(jpeg_revision),
+ svn_revnum_t(jstart_revision),
+ svn_revnum_t(jend_revision),
+ handler.callback, &handler,
+ subPool.getPool()),
+ NULL);
+ return handler.get();
+}
+
// TODO: getFileRevisions
// TODO: lock
// TODO: unlock
Modified: subversion/branches/fsx/subversion/bindings/javahl/native/RemoteSession.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/javahl/native/RemoteSession.h?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/javahl/native/RemoteSession.h (original)
+++ subversion/branches/fsx/subversion/bindings/javahl/native/RemoteSession.h Thu Aug 1 14:22:03 2013
@@ -92,10 +92,11 @@ class RemoteSession : public SVNBase
jboolean jinclude_merged_revisions,
jobject jrevprops, jobject jlog_callback);
jobject checkPath(jstring jpath, jlong jrevision);
- // TODO: stat
+ jobject stat(jstring jpath, jlong jrevision);
jobject getLocations(jstring jpath, jlong jpeg_revision,
jobject jlocation_revisions);
- // TODO: getLocationSegments
+ jobject getLocationSegments(jstring jpath, jlong jpeg_revision,
+ jlong jstart_revision, jlong jend_revision);
// TODO: getFileRevisions
// TODO: lock
// TODO: unlock
Modified: subversion/branches/fsx/subversion/bindings/javahl/native/RevisionRange.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/javahl/native/RevisionRange.cpp?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/javahl/native/RevisionRange.cpp (original)
+++ subversion/branches/fsx/subversion/bindings/javahl/native/RevisionRange.cpp Thu Aug 1 14:22:03 2013
@@ -44,60 +44,117 @@ RevisionRange::~RevisionRange()
// explicitly destroyed.
}
-const svn_opt_revision_range_t *RevisionRange::toRange(SVN::Pool &pool) const
+namespace {
+void get_range_info(jobject jrange,
+ svn_opt_revision_t* range_start,
+ svn_opt_revision_t* range_end,
+ svn_boolean_t* range_inheritable)
{
JNIEnv *env = JNIUtil::getEnv();
jclass clazz = env->FindClass(JAVA_PACKAGE"/types/RevisionRange");
if (JNIUtil::isExceptionThrown())
- return NULL;
+ return;
- static jmethodID fmid = 0;
- if (fmid == 0)
+ if (range_start)
{
- fmid = env->GetMethodID(clazz, "getFromRevision",
- "()L"JAVA_PACKAGE"/types/Revision;");
- if (JNIUtil::isJavaExceptionThrown())
- return NULL;
+
+ static jmethodID fmid = 0;
+ if (fmid == 0)
+ {
+ fmid = env->GetMethodID(clazz, "getFromRevision",
+ "()L"JAVA_PACKAGE"/types/Revision;");
+ if (JNIUtil::isJavaExceptionThrown())
+ return;
+ }
+
+ jobject jstartRevision = env->CallObjectMethod(jrange, fmid);
+ if (JNIUtil::isExceptionThrown())
+ return;
+
+ Revision startRevision(jstartRevision);
+ if (JNIUtil::isExceptionThrown())
+ return;
+
+ *range_start = *startRevision.revision();
+ if (JNIUtil::isExceptionThrown())
+ return;
}
- static jmethodID tmid = 0;
- if (tmid == 0)
+ if (range_end)
{
- tmid = env->GetMethodID(clazz, "getToRevision",
- "()L"JAVA_PACKAGE"/types/Revision;");
- if (JNIUtil::isJavaExceptionThrown())
- return NULL;
+ static jmethodID tmid = 0;
+ if (tmid == 0)
+ {
+ tmid = env->GetMethodID(clazz, "getToRevision",
+ "()L"JAVA_PACKAGE"/types/Revision;");
+ if (JNIUtil::isJavaExceptionThrown())
+ return;
+ }
+
+ jobject jendRevision = env->CallObjectMethod(jrange, tmid);
+ if (JNIUtil::isExceptionThrown())
+ return;
+
+ Revision endRevision(jendRevision);
+ if (JNIUtil::isExceptionThrown())
+ return;
+
+ *range_end = *endRevision.revision();
+ if (JNIUtil::isExceptionThrown())
+ return;
}
- jobject jstartRevision = env->CallObjectMethod(m_range, fmid);
- if (JNIUtil::isExceptionThrown())
- return NULL;
+ if (range_inheritable)
+ {
+ static jmethodID imid = 0;
+ if (imid == 0 && range_inheritable)
+ {
+ imid = env->GetMethodID(clazz, "isInheritable", "()Z");
+ if (JNIUtil::isJavaExceptionThrown())
+ return;
+ }
+
+ jboolean inheritable = env->CallBooleanMethod(jrange, imid);
+ if (JNIUtil::isExceptionThrown())
+ return;
+ *range_inheritable = inheritable;
+ }
+}
+} // anonymous namespace
- Revision startRevision(jstartRevision);
+svn_merge_range_t* RevisionRange::toMergeRange(SVN::Pool &pool) const
+{
+ svn_opt_revision_t range_start, range_end;
+ svn_boolean_t range_inheritable;
+ get_range_info(m_range, &range_start, &range_end, &range_inheritable);
if (JNIUtil::isExceptionThrown())
return NULL;
- jobject jendRevision = env->CallObjectMethod(m_range, tmid);
- if (JNIUtil::isExceptionThrown())
- return NULL;
+ if (range_start.kind != svn_opt_revision_number
+ || range_end.kind != svn_opt_revision_number)
+ JNIUtil::raiseThrowable("java.lang.InvalidStateException",
+ "Revsision ranges must contain revision numbers");
- Revision endRevision(jendRevision);
- if (JNIUtil::isExceptionThrown())
- return NULL;
+ svn_merge_range_t* range =
+ static_cast<svn_merge_range_t*>
+ (apr_palloc(pool.getPool(), sizeof(*range)));
+
+ range->start = range_start.value.number;
+ range->end = range_end.value.number;
+ range->inheritable = range_inheritable;
+ return range;
+}
+svn_opt_revision_range_t *RevisionRange::toRange(SVN::Pool &pool) const
+{
svn_opt_revision_range_t *range =
- reinterpret_cast<svn_opt_revision_range_t *>
+ static_cast<svn_opt_revision_range_t *>
(apr_palloc(pool.getPool(), sizeof(*range)));
- range->start = *startRevision.revision();
- if (JNIUtil::isExceptionThrown())
- return NULL;
-
- range->end = *endRevision.revision();
+ get_range_info(m_range, &range->start, &range->end, NULL);
if (JNIUtil::isExceptionThrown())
- return NULL;
-
+ range = NULL;
return range;
}
Modified: subversion/branches/fsx/subversion/bindings/javahl/native/RevisionRange.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/javahl/native/RevisionRange.h?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/javahl/native/RevisionRange.h (original)
+++ subversion/branches/fsx/subversion/bindings/javahl/native/RevisionRange.h Thu Aug 1 14:22:03 2013
@@ -29,6 +29,7 @@
#include <jni.h>
#include "svn_types.h"
+#include "svn_opt.h"
#include "Pool.h"
@@ -53,7 +54,12 @@ class RevisionRange
/**
* Return an svn_opt_revision_range_t.
*/
- const svn_opt_revision_range_t *toRange(SVN::Pool &pool) const;
+ svn_opt_revision_range_t *toRange(SVN::Pool &pool) const;
+
+ /**
+ * Return an svn_merge_range_t.
+ */
+ svn_merge_range_t* toMergeRange(SVN::Pool &pool) const;
/**
* Make a (single) RevisionRange Java object.
Modified: subversion/branches/fsx/subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp (original)
+++ subversion/branches/fsx/subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp Thu Aug 1 14:22:03 2013
@@ -33,9 +33,9 @@
#include "CreateJ.h"
#include "EnumMapper.h"
+#include "svn_private_config.h"
#include "svn_config.h"
#include "svn_hash.h"
-#include "svn_private_config.h"
#include <string>
#include <vector>
Modified: subversion/branches/fsx/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp (original)
+++ subversion/branches/fsx/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp Thu Aug 1 14:22:03 2013
@@ -272,21 +272,42 @@ Java_org_apache_subversion_javahl_remote
return ras->checkPath(jpath, jrevision);
}
-// TODO: stat
+JNIEXPORT jobject JNICALL
+Java_org_apache_subversion_javahl_remote_RemoteSession_stat(
+ JNIEnv *env, jobject jthis, jstring jpath, jlong jrevision)
+{
+ JNIEntry(SVNReposAccess, stat);
+ RemoteSession *ras = RemoteSession::getCppObject(jthis);
+ CPPADDR_NULL_PTR(ras, NULL);
+
+ return ras->stat(jpath, jrevision);
+}
JNIEXPORT jobject JNICALL
Java_org_apache_subversion_javahl_remote_RemoteSession_getLocations(
JNIEnv *env, jobject jthis, jstring jpath, jlong jpeg_revision,
jobject jlocation_revisions)
{
- JNIEntry(SVNReposAccess, checkPath);
+ JNIEntry(SVNReposAccess, getLocations);
RemoteSession *ras = RemoteSession::getCppObject(jthis);
CPPADDR_NULL_PTR(ras, NULL);
return ras->getLocations(jpath, jpeg_revision, jlocation_revisions);
}
-// TODO: getLocationSegments
+JNIEXPORT jobject JNICALL
+Java_org_apache_subversion_javahl_remote_RemoteSession_getLocationSegments(
+ JNIEnv *env, jobject jthis, jstring jpath, jlong jpeg_revision,
+ jlong jstart_revision, jlong jend_revision)
+{
+ JNIEntry(SVNReposAccess, getLocationSegments);
+ RemoteSession *ras = RemoteSession::getCppObject(jthis);
+ CPPADDR_NULL_PTR(ras, NULL);
+
+ return ras->getLocationSegments(jpath, jpeg_revision,
+ jstart_revision, jend_revision);
+}
+
// TODO: getFileRevisions
// TODO: lock
// TODO: unlock
Modified: subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java (original)
+++ subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java Thu Aug 1 14:22:03 2013
@@ -27,6 +27,7 @@ import org.apache.subversion.javahl.type
import org.apache.subversion.javahl.callback.*;
import java.util.Date;
+import java.util.List;
import java.util.Map;
import java.util.Set;
import java.io.OutputStream;
@@ -433,14 +434,24 @@ public interface ISVNRemote
throws ClientException;
/**
- * Return the kind of the node in path at revision.
+ * Return the kind of the node in <code>path</code> at
+ * <code>revision</code>.
* @param path A path relative to the sessionn URL
* @throws ClientException
*/
NodeKind checkPath(String path, long revision)
throws ClientException;
- // TODO: stat
+ /**
+ * Return the directory entry object for <code>path</code> at
+ * <code>revision</code>.
+ * @param path A path relative to the sessionn URL
+ * @return A directory entry obeject, or <code>null</code> if
+ * <code>path</code> at <code>revision</code> does not exist.
+ * @throws ClientException
+ */
+ DirEntry stat(String path, long revision)
+ throws ClientException;
/**
* Find the locations of the object identified by
@@ -458,7 +469,69 @@ public interface ISVNRemote
Iterable<Long> locationRevisions)
throws ClientException;
- // TODO: getLocationSegments
+ /**
+ * The object returned from {@link getLocationSegments}.
+ */
+ public static class LocationSegment implements java.io.Serializable
+ {
+ // Update the serialVersionUID when there is a incompatible change
+ // made to this class.
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Private constructor called by the native implementation.
+ */
+ private LocationSegment(String path,
+ long startRevision,
+ long endRevision)
+ {
+ this.path = path;
+ this.startRevision = startRevision;
+ this.endRevision = endRevision;
+ }
+
+ /**
+ * @return The repository-relative path of the obejct in this
+ * history segment.
+ */
+ public String getPath() { return path; }
+
+ /**
+ * @return The start revision of the history segment.
+ */
+ public long getStartRevision() { return startRevision; }
+
+ /**
+ * @return The end revision of the history segment.
+ */
+ public long getEndRevision() { return endRevision; }
+
+ private String path;
+ private long startRevision;
+ private long endRevision;
+ }
+
+ /**
+ * Return a lost of segments in the location history of <code>path</code>
+ * at <code>pegRevision</code>, working backwards in time from
+ * <code>startRevision</code> to <code>endRevision</code>.
+ *
+ * @param path A session-relative path.
+ * @param pegRevision The peg revision to find <code>path</code> in.
+ * @param startRevision The upper bound of the revision range. Use
+ * {@link org.apache.subversion.javahl.types.Revision#SVN_INVALID_REVNUM}
+ * to indicate HEAD.
+ * @param endRevision The lower bound of the revision range. Use
+ * {@link org.apache.subversion.javahl.types.Revision#SVN_INVALID_REVNUM}
+ * to trace the history of the object to its origin.
+ * @throws ClientException
+ */
+ List<LocationSegment> getLocationSegments(String path,
+ long pegRevision,
+ long startRevision,
+ long endRevision)
+ throws ClientException;
+
// TODO: getFileRevisions
// TODO: lock
// TODO: unlock
Modified: subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java (original)
+++ subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java Thu Aug 1 14:22:03 2013
@@ -35,6 +35,7 @@ import org.apache.subversion.javahl.Clie
import java.lang.ref.WeakReference;
import java.util.Date;
+import java.util.List;
import java.util.Map;
import java.util.Set;
import java.io.OutputStream;
@@ -197,14 +198,21 @@ public class RemoteSession extends JNIOb
public native NodeKind checkPath(String path, long revision)
throws ClientException;
- // TODO: stat
+ public native DirEntry stat(String path, long revision)
+ throws ClientException;
public native Map<Long, String>
getLocations(String path, long pegRevision,
Iterable<Long> locationRevisions)
throws ClientException;
- // TODO: getLocationSegments
+ public native
+ List<LocationSegment> getLocationSegments(String path,
+ long pegRevision,
+ long startRevision,
+ long endRevision)
+ throws ClientException;
+
// TODO: getFileRevisions
// TODO: lock
// TODO: unlock
Modified: subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java (original)
+++ subversion/branches/fsx/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java Thu Aug 1 14:22:03 2013
@@ -108,6 +108,11 @@ public class Mergeinfo implements java.i
addRevisionRange(mergeSrc, range);
}
+ public void addRevisions(String mergeSrc, RevisionRangeList ranges)
+ {
+ addRevisions(mergeSrc, ranges.getRanges());
+ }
+
/**
* Add a revision range to the merged revisions for a path. If
* the merge source already has associated revision ranges, add
@@ -156,6 +161,14 @@ public class Mergeinfo implements java.i
}
/**
+ * Like {@link #getReivsionRange}, but returns a {@link RevisionRangeList}.
+ */
+ public RevisionRangeList getRevisionRangeList(String mergeSrc)
+ {
+ return new RevisionRangeList(getRevisionRange(mergeSrc));
+ }
+
+ /**
* Parse the <code>svn:mergeinfo</code> property to populate the
* merge source URLs and revision ranges of this instance.
* @param mergeinfo <code>svn:mergeinfo</code> property value.
Modified: subversion/branches/fsx/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/fsx/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Thu Aug 1 14:22:03 2013
@@ -3744,6 +3744,39 @@ public class BasicTests extends SVNTests
}
/**
+ * Test RevisionRangeList.remove
+ */
+ public void testRevisionRangeListRemove() throws Throwable
+ {
+ RevisionRangeList ranges =
+ new RevisionRangeList(new ArrayList<RevisionRange>());
+ ranges.getRanges()
+ .add(new RevisionRange(Revision.getInstance(1),
+ Revision.getInstance(5),
+ true));
+ ranges.getRanges()
+ .add(new RevisionRange(Revision.getInstance(7),
+ Revision.getInstance(9),
+ false));
+ RevisionRangeList eraser =
+ new RevisionRangeList(new ArrayList<RevisionRange>());
+ eraser.getRanges()
+ .add(new RevisionRange(Revision.getInstance(7),
+ Revision.getInstance(9),
+ true));
+
+ List<RevisionRange> result = ranges.remove(eraser, true).getRanges();
+ assertEquals(2, ranges.getRanges().size());
+ assertEquals(1, eraser.getRanges().size());
+ assertEquals(2, result.size());
+
+ result = ranges.remove(eraser.getRanges(), false);
+ assertEquals(2, ranges.getRanges().size());
+ assertEquals(1, eraser.getRanges().size());
+ assertEquals(1, result.size());
+ }
+
+ /**
* @return <code>file</code> converted into a -- possibly
* <code>canonical</code>-ized -- Subversion-internal path
* representation.
Modified: subversion/branches/fsx/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java (original)
+++ subversion/branches/fsx/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java Thu Aug 1 14:22:03 2013
@@ -170,6 +170,20 @@ public class SVNRemoteTests extends SVNT
assertEquals(NodeKind.dir, kind);
}
+ public void testStat() throws Exception
+ {
+ ISVNRemote session = getSession();
+
+ DirEntry dirent = session.stat("iota", 1);
+ assertEquals(NodeKind.file, dirent.getNodeKind());
+
+ dirent = session.stat("iota", 0);
+ assertNull(dirent);
+
+ dirent = session.stat("A", 1);
+ assertEquals(NodeKind.dir, dirent.getNodeKind());
+ }
+
private String getTestRepoUrl()
{
return thisTest.getUrl().toASCIIString();
@@ -1099,4 +1113,19 @@ public class SVNRemoteTests extends SVNT
assertTrue(locs.containsKey(expected));
assertEquals("/A", locs.get(expected));
}
+
+ public void testGetLocationSegments() throws Exception
+ {
+ ISVNRemote session = getSession();
+
+ List<ISVNRemote.LocationSegment> result =
+ session.getLocationSegments("A", 1,
+ Revision.SVN_INVALID_REVNUM,
+ Revision.SVN_INVALID_REVNUM);
+ assertEquals(1, result.size());
+ ISVNRemote.LocationSegment seg = result.get(0);
+ assertEquals("A", seg.getPath());
+ assertEquals(1, seg.getStartRevision());
+ assertEquals(1, seg.getEndRevision());
+ }
}
Modified: subversion/branches/fsx/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c (original)
+++ subversion/branches/fsx/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c Thu Aug 1 14:22:03 2013
@@ -38,11 +38,11 @@
#include <io.h>
#endif
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_opt.h"
#include "svn_time.h"
-#include "svn_private_config.h"
#include "swig_perl_external_runtime.swg"
Modified: subversion/branches/fsx/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original)
+++ subversion/branches/fsx/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Thu Aug 1 14:22:03 2013
@@ -35,6 +35,7 @@
#include <apr_portable.h>
#include <apr_thread_proc.h>
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_client.h"
#include "svn_string.h"
@@ -46,8 +47,6 @@
#include "svn_mergeinfo.h"
#include "svn_types.h"
-#include "svn_private_config.h" /* for SVN_APR_INT64_T_PYCFMT */
-
#include "swig_python_external_runtime.swg"
#include "swigutil_py.h"
Modified: subversion/branches/fsx/subversion/bindings/swig/python/svn/core.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/swig/python/svn/core.py?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/swig/python/svn/core.py (original)
+++ subversion/branches/fsx/subversion/bindings/swig/python/svn/core.py Thu Aug 1 14:22:03 2013
@@ -27,44 +27,8 @@ from libsvn.core import *
import libsvn.core as _libsvncore
import atexit as _atexit
import sys
-__all__ = [
- # Symbols that 'import *' used to pull (in 1.7)
- 'Pool',
- 'SVNSYNC_PROP_CURRENTLY_COPYING',
- 'SVNSYNC_PROP_FROM_URL',
- 'SVNSYNC_PROP_FROM_UUID',
- 'SVNSYNC_PROP_LAST_MERGED_REV',
- 'SVNSYNC_PROP_LOCK',
- 'SVNSYNC_PROP_PREFIX',
- 'SubversionException',
- # 'apr_array_header_t',
- # 'apr_file_open_stderr',
- # 'apr_file_open_stdout',
- # 'apr_file_t',
- # 'apr_hash_t',
- # 'apr_initialize',
- # 'apr_pool_clear',
- # 'apr_pool_destroy',
- # 'apr_pool_t',
- # 'apr_terminate',
- # 'apr_time_ansi_put',
- # 'run_app',
-
- # Symbols defined explicitly below.
- 'SVN_IGNORED_REVNUM',
- 'SVN_INVALID_REVNUM',
- 'svn_path_compare_paths',
- 'svn_mergeinfo_merge',
- 'svn_mergeinfo_sort',
- 'svn_rangelist_merge',
- 'svn_rangelist_reverse',
- # 'Stream',
- # 'apr_initialize',
- # 'apr_terminate',
- 'svn_pool_create',
- 'svn_pool_destroy',
- 'svn_pool_clear',
-]
+# __all__ is defined later, since some svn_* functions are implemented below.
+
class SubversionException(Exception):
@@ -343,3 +307,22 @@ def run_app(func, *args, **kw):
performed as the function exits (normally or via an exception).
'''
return func(application_pool, *args, **kw)
+
+# Currently, this excludes:
+# 'FALSE' 'TRUE'
+# 'apr_array_header_t' 'apr_file_t' 'apr_hash_t'
+# 'apr_file_open_stderr' 'apr_file_open_stdout'
+# 'apr_initialize' 'apr_terminate'
+# 'apr_pool_clear' 'apr_pool_destroy' 'apr_pool_t'
+# 'apr_time_ansi_put'
+# 'run_app'
+# 'svn__apr_hash_index_key' 'svn__apr_hash_index_klen' 'svn__apr_hash_index_val'
+# 'svn_relpath__internal_style' 'svn_uri__is_ancestor'
+# 'svn_tristate__from_word' 'svn_tristate__to_word'
+__all__ = filter(lambda s: (s.startswith('svn_')
+ or s.startswith('SVN_')
+ or s.startswith('SVNSYNC_')
+ or s in ('Pool', 'SubversionException'))
+ and '__' not in s,
+ locals())
+
Modified: subversion/branches/fsx/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c (original)
+++ subversion/branches/fsx/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c Thu Aug 1 14:22:03 2013
@@ -60,6 +60,7 @@
#include <locale.h>
#include <math.h>
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_nls.h"
#include "svn_pools.h"
Modified: subversion/branches/fsx/subversion/include/private/svn_subr_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/include/private/svn_subr_private.h?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/include/private/svn_subr_private.h (original)
+++ subversion/branches/fsx/subversion/include/private/svn_subr_private.h Thu Aug 1 14:22:03 2013
@@ -94,11 +94,32 @@ svn_spillbuf__create(apr_size_t blocksiz
apr_size_t maxsize,
apr_pool_t *result_pool);
+/* Create a spill buffer, with extra parameters. */
+svn_spillbuf_t *
+svn_spillbuf__create_extended(apr_size_t blocksize,
+ apr_size_t maxsize,
+ svn_boolean_t delete_on_close,
+ svn_boolean_t spill_all_contents,
+ const char* dirpath,
+ apr_pool_t *result_pool);
/* Determine how much content is stored in the spill buffer. */
svn_filesize_t
svn_spillbuf__get_size(const svn_spillbuf_t *buf);
+/* Determine how much content the spill buffer is caching in memory. */
+svn_filesize_t
+svn_spillbuf__get_memory_size(const svn_spillbuf_t *buf);
+
+/* Retreive the name of the spill file. The returned value can be NULL
+ if the file has not been created yet. */
+const char *
+svn_spillbuf__get_filename(const svn_spillbuf_t *buf);
+
+/* Retreive the handle of the spill file. The returned value can be
+ NULL if the file has not been created yet. */
+apr_file_t *
+svn_spillbuf__get_file(const svn_spillbuf_t *buf);
/* Write some data into the spill buffer. */
svn_error_t *
@@ -158,6 +179,14 @@ svn_spillbuf__reader_create(apr_size_t b
apr_size_t maxsize,
apr_pool_t *result_pool);
+/* Create a spill-buffer with extra parameters, and a reader for it. */
+svn_spillbuf_reader_t *
+svn_spillbuf__reader_create_extended(apr_size_t blocksize,
+ apr_size_t maxsize,
+ svn_boolean_t delete_on_close,
+ svn_boolean_t spill_all_contents,
+ const char *dirpath,
+ apr_pool_t *result_pool);
/* Read @a len bytes from @a reader into @a data. The number of bytes
actually read is stored in @a amt. If the content is exhausted, then
@@ -197,6 +226,16 @@ svn_spillbuf__reader_write(svn_spillbuf_
svn_stream_t *
svn_stream__from_spillbuf(svn_spillbuf_t *buf,
apr_pool_t *result_pool);
+/* Return a stream built on top of a spillbuf, using the same arguments as
+ svn_spillbuf__create_extended(). */
+svn_stream_t *
+svn_stream__from_spillbuf_extended(apr_size_t blocksize,
+ apr_size_t maxsize,
+ svn_boolean_t delete_on_close,
+ svn_boolean_t spill_all_contents,
+ const char *dirpath,
+ apr_pool_t *result_pool);
+
/** @} */
Modified: subversion/branches/fsx/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/include/svn_config.h?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/include/svn_config.h (original)
+++ subversion/branches/fsx/subversion/include/svn_config.h Thu Aug 1 14:22:03 2013
@@ -736,6 +736,12 @@ typedef svn_error_t *
* under @a config_dir. If the callback sets its delete_cred return
* flag, delete the associated credential.
*
+ * If @a config_dir is not NULL, it must point to an alternative
+ * config directory location. If it is NULL, the default location
+ * is used.
+ *
+ * @note @a config_dir may only be NULL in 1.8.2 and later.
+ *
* @note Removing credentials from the config-based disk store will
* not purge them from any open svn_auth_baton_t instance. Consider
* using svn_auth_forget_credentials() -- from the @a cleanup_func,
Modified: subversion/branches/fsx/subversion/include/svn_hash.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/include/svn_hash.h?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/include/svn_hash.h (original)
+++ subversion/branches/fsx/subversion/include/svn_hash.h Thu Aug 1 14:22:03 2013
@@ -37,7 +37,6 @@
#include "svn_types.h"
#include "svn_io.h" /* for svn_stream_t */
-
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
@@ -251,11 +250,8 @@ svn_hash_from_cstring_keys(apr_hash_t **
*
* @since New in 1.8.
*/
-#define svn_hash_sets(ht, key, val) \
- do { \
- const void *svn_key__temp = (key); \
- apr_hash_set(ht, svn_key__temp, strlen(svn_key__temp), val); \
- } while (0)
+#define svn_hash_sets(ht, key, val) \
+ apr_hash_set(ht, key, APR_HASH_KEY_STRING, val)
/** @} */
Modified: subversion/branches/fsx/subversion/include/svn_sorts.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/include/svn_sorts.h?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/include/svn_sorts.h (original)
+++ subversion/branches/fsx/subversion/include/svn_sorts.h Thu Aug 1 14:22:03 2013
@@ -174,7 +174,8 @@ svn_sort__hash(apr_hash_t *ht,
/* Return the lowest index at which the element @a *key should be inserted into
* the array @a array, according to the ordering defined by @a compare_func.
* The array must already be sorted in the ordering defined by @a compare_func.
- * @a compare_func is defined as for the C stdlib function bsearch().
+ * @a compare_func is defined as for the C stdlib function bsearch(); the
+ * @a key will always passed to it as the second parameter.
*
* @note Private. For use by Subversion's own code only.
*/
Modified: subversion/branches/fsx/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c (original)
+++ subversion/branches/fsx/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c Thu Aug 1 14:22:03 2013
@@ -32,6 +32,7 @@
#include <glib.h>
#include <gnome-keyring.h>
+#include "svn_private_config.h"
#include "svn_auth.h"
#include "svn_config.h"
#include "svn_error.h"
@@ -40,8 +41,6 @@
#include "private/svn_auth_private.h"
-#include "svn_private_config.h"
-
/*-----------------------------------------------------------------------*/
Modified: subversion/branches/fsx/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_client/add.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_client/add.c (original)
+++ subversion/branches/fsx/subversion/libsvn_client/add.c Thu Aug 1 14:22:03 2013
@@ -30,6 +30,8 @@
#include <string.h>
#include <apr_lib.h>
#include <apr_fnmatch.h>
+
+#include "svn_private_config.h"
#include "svn_wc.h"
#include "svn_client.h"
#include "svn_string.h"
@@ -50,8 +52,6 @@
#include "private/svn_ra_private.h"
#include "private/svn_magic.h"
-#include "svn_private_config.h"
-
/*** Code. ***/
Modified: subversion/branches/fsx/subversion/libsvn_client/cat.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_client/cat.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_client/cat.c (original)
+++ subversion/branches/fsx/subversion/libsvn_client/cat.c Thu Aug 1 14:22:03 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_client.h"
#include "svn_string.h"
@@ -39,7 +40,6 @@
#include "svn_props.h"
#include "client.h"
-#include "svn_private_config.h"
#include "private/svn_wc_private.h"
Modified: subversion/branches/fsx/subversion/libsvn_client/changelist.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_client/changelist.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_client/changelist.c (original)
+++ subversion/branches/fsx/subversion/libsvn_client/changelist.c Thu Aug 1 14:22:03 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_private_config.h"
#include "svn_client.h"
#include "svn_wc.h"
#include "svn_pools.h"
@@ -36,7 +37,6 @@
#include "client.h"
#include "private/svn_wc_private.h"
-#include "svn_private_config.h"
Modified: subversion/branches/fsx/subversion/libsvn_client/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_client/cleanup.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_client/cleanup.c (original)
+++ subversion/branches/fsx/subversion/libsvn_client/cleanup.c Thu Aug 1 14:22:03 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_private_config.h"
#include "svn_time.h"
#include "svn_wc.h"
#include "svn_client.h"
@@ -38,7 +39,6 @@
#include "client.h"
#include "svn_props.h"
-#include "svn_private_config.h"
#include "private/svn_wc_private.h"
Modified: subversion/branches/fsx/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_client/commit.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/fsx/subversion/libsvn_client/commit.c Thu Aug 1 14:22:03 2013
@@ -30,6 +30,8 @@
#include <string.h>
#include <apr_strings.h>
#include <apr_hash.h>
+
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_wc.h"
#include "svn_ra.h"
@@ -46,8 +48,6 @@
#include "private/svn_wc_private.h"
#include "private/svn_ra_private.h"
-#include "svn_private_config.h"
-
struct capture_baton_t {
svn_commit_callback2_t original_callback;
void *original_baton;
@@ -1025,9 +1025,22 @@ svn_client_commit6(const apr_array_heade
}
cleanup:
- /* Sleep to ensure timestamp integrity. */
+ /* Sleep to ensure timestamp integrity. BASE_ABSPATH may have been
+ removed by the commit or it may the common ancestor of multiple
+ working copies. */
if (timestamp_sleep)
- svn_io_sleep_for_timestamps(base_abspath, pool);
+ {
+ const char *wcroot_abspath;
+ svn_error_t *err = svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx,
+ base_abspath, pool, pool);
+ if (err)
+ {
+ svn_error_clear(err);
+ wcroot_abspath = NULL;
+ }
+
+ svn_io_sleep_for_timestamps(wcroot_abspath, pool);
+ }
/* Abort the commit if it is still in progress. */
svn_pool_clear(iterpool); /* Close open handles before aborting */
Modified: subversion/branches/fsx/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_client/commit_util.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/fsx/subversion/libsvn_client/commit_util.c Thu Aug 1 14:22:03 2013
@@ -30,6 +30,7 @@
#include <apr_hash.h>
#include <apr_md5.h>
+#include "svn_private_config.h"
#include "client.h"
#include "svn_dirent_uri.h"
#include "svn_path.h"
@@ -42,7 +43,6 @@
#include <assert.h>
#include <stdlib.h> /* for qsort() */
-#include "svn_private_config.h"
#include "private/svn_wc_private.h"
#include "private/svn_client_private.h"
Modified: subversion/branches/fsx/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_client/copy.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/fsx/subversion/libsvn_client/copy.c Thu Aug 1 14:22:03 2013
@@ -28,6 +28,8 @@
/*** Includes. ***/
#include <string.h>
+
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_client.h"
#include "svn_error.h"
@@ -43,7 +45,6 @@
#include "client.h"
#include "mergeinfo.h"
-#include "svn_private_config.h"
#include "private/svn_wc_private.h"
#include "private/svn_ra_private.h"
#include "private/svn_mergeinfo_private.h"
Modified: subversion/branches/fsx/subversion/libsvn_client/copy_foreign.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_client/copy_foreign.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_client/copy_foreign.c (original)
+++ subversion/branches/fsx/subversion/libsvn_client/copy_foreign.c Thu Aug 1 14:22:03 2013
@@ -26,6 +26,8 @@
/*** Includes. ***/
#include <string.h>
+
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_client.h"
#include "svn_delta.h"
@@ -43,7 +45,6 @@
#include "client.h"
#include "private/svn_subr_private.h"
#include "private/svn_wc_private.h"
-#include "svn_private_config.h"
struct edit_baton_t
{
Modified: subversion/branches/fsx/subversion/libsvn_client/ctx.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_client/ctx.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_client/ctx.c (original)
+++ subversion/branches/fsx/subversion/libsvn_client/ctx.c Thu Aug 1 14:22:03 2013
@@ -28,6 +28,8 @@
/*** Includes. ***/
#include <apr_pools.h>
+
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_client.h"
#include "svn_error.h"
Modified: subversion/branches/fsx/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_client/delete.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_client/delete.c (original)
+++ subversion/branches/fsx/subversion/libsvn_client/delete.c Thu Aug 1 14:22:03 2013
@@ -28,6 +28,8 @@
/*** Includes. ***/
#include <apr_file_io.h>
+
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_types.h"
#include "svn_pools.h"
@@ -42,8 +44,6 @@
#include "private/svn_wc_private.h"
#include "private/svn_ra_private.h"
-#include "svn_private_config.h"
-
/*** Code. ***/
Modified: subversion/branches/fsx/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_client/deprecated.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/fsx/subversion/libsvn_client/deprecated.c Thu Aug 1 14:22:03 2013
@@ -33,6 +33,8 @@
#define SVN_DEPRECATED
#include <string.h>
+
+#include "svn_private_config.h"
#include "svn_client.h"
#include "svn_path.h"
#include "svn_compat.h"
@@ -47,8 +49,6 @@
#include "private/svn_opt_private.h"
#include "private/svn_wc_private.h"
-#include "svn_private_config.h"
-
Modified: subversion/branches/fsx/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_client/diff.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/fsx/subversion/libsvn_client/diff.c Thu Aug 1 14:22:03 2013
@@ -30,6 +30,8 @@
#include <apr_strings.h>
#include <apr_pools.h>
#include <apr_hash.h>
+
+#include "svn_private_config.h"
#include "svn_types.h"
#include "svn_hash.h"
#include "svn_wc.h"
@@ -53,8 +55,6 @@
#include "private/svn_subr_private.h"
#include "private/svn_io_private.h"
-#include "svn_private_config.h"
-
/* Utilities */
Modified: subversion/branches/fsx/subversion/libsvn_client/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_client/diff_local.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_client/diff_local.c (original)
+++ subversion/branches/fsx/subversion/libsvn_client/diff_local.c Thu Aug 1 14:22:03 2013
@@ -30,6 +30,8 @@
#include <apr_strings.h>
#include <apr_pools.h>
#include <apr_hash.h>
+
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_types.h"
#include "svn_wc.h"
@@ -47,8 +49,6 @@
#include "private/svn_wc_private.h"
-#include "svn_private_config.h"
-
/* Try to get properties for LOCAL_ABSPATH and return them in the property
* hash *PROPS. If there are no properties because LOCAL_ABSPATH is not
Modified: subversion/branches/fsx/subversion/libsvn_client/diff_summarize.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_client/diff_summarize.c?rev=1509247&r1=1509246&r2=1509247&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_client/diff_summarize.c (original)
+++ subversion/branches/fsx/subversion/libsvn_client/diff_summarize.c Thu Aug 1 14:22:03 2013
@@ -22,7 +22,7 @@
* ====================================================================
*/
-
+#include "svn_private_config.h"
#include "svn_dirent_uri.h"
#include "svn_hash.h"
#include "svn_props.h"