You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2012/12/05 19:27:54 UTC
svn commit: r1417569 [1/4] - in /subversion/branches/in-repo-authz: ./
subversion/bindings/swig/perl/native/ subversion/include/
subversion/include/private/ subversion/libsvn_client/
subversion/libsvn_delta/ subversion/libsvn_ra_local/ subversion/libsv...
Author: breser
Date: Wed Dec 5 18:27:47 2012
New Revision: 1417569
URL: http://svn.apache.org/viewvc?rev=1417569&view=rev
Log:
Sync the 'in-repo-authz' branch with recent trunk changes.
(Merged /subversion/trunk:r1415647-r1417564)
Added:
subversion/branches/in-repo-authz/subversion/libsvn_subr/sqlite3wrapper.c
- copied unchanged from r1417564, subversion/trunk/subversion/libsvn_subr/sqlite3wrapper.c
Removed:
subversion/branches/in-repo-authz/tools/dev/gcov.patch
Modified:
subversion/branches/in-repo-authz/ (props changed)
subversion/branches/in-repo-authz/Makefile.in
subversion/branches/in-repo-authz/configure.ac
subversion/branches/in-repo-authz/subversion/bindings/swig/perl/native/Base.pm
subversion/branches/in-repo-authz/subversion/include/private/svn_cmdline_private.h
subversion/branches/in-repo-authz/subversion/include/private/svn_wc_private.h
subversion/branches/in-repo-authz/subversion/include/svn_editor.h
subversion/branches/in-repo-authz/subversion/include/svn_repos.h
subversion/branches/in-repo-authz/subversion/include/svn_wc.h
subversion/branches/in-repo-authz/subversion/libsvn_client/add.c
subversion/branches/in-repo-authz/subversion/libsvn_client/export.c
subversion/branches/in-repo-authz/subversion/libsvn_client/patch.c
subversion/branches/in-repo-authz/subversion/libsvn_client/revert.c
subversion/branches/in-repo-authz/subversion/libsvn_client/switch.c
subversion/branches/in-repo-authz/subversion/libsvn_delta/svndiff.c
subversion/branches/in-repo-authz/subversion/libsvn_ra_local/ra_plugin.c
subversion/branches/in-repo-authz/subversion/libsvn_ra_serf/update.c
subversion/branches/in-repo-authz/subversion/libsvn_repos/fs-wrap.c
subversion/branches/in-repo-authz/subversion/libsvn_subr/cmdline.c
subversion/branches/in-repo-authz/subversion/libsvn_subr/sqlite.c
subversion/branches/in-repo-authz/subversion/libsvn_wc/adm_ops.c
subversion/branches/in-repo-authz/subversion/libsvn_wc/conflicts.c
subversion/branches/in-repo-authz/subversion/libsvn_wc/crop.c
subversion/branches/in-repo-authz/subversion/libsvn_wc/deprecated.c
subversion/branches/in-repo-authz/subversion/libsvn_wc/entries.c
subversion/branches/in-repo-authz/subversion/libsvn_wc/props.c
subversion/branches/in-repo-authz/subversion/libsvn_wc/relocate.c
subversion/branches/in-repo-authz/subversion/libsvn_wc/status.c
subversion/branches/in-repo-authz/subversion/libsvn_wc/update_editor.c
subversion/branches/in-repo-authz/subversion/libsvn_wc/wc-queries.sql
subversion/branches/in-repo-authz/subversion/libsvn_wc/wc.h
subversion/branches/in-repo-authz/subversion/libsvn_wc/wc_db.c
subversion/branches/in-repo-authz/subversion/libsvn_wc/wc_db.h
subversion/branches/in-repo-authz/subversion/libsvn_wc/wc_db_private.h
subversion/branches/in-repo-authz/subversion/libsvn_wc/wc_db_update_move.c
subversion/branches/in-repo-authz/subversion/libsvn_wc/workqueue.h
subversion/branches/in-repo-authz/subversion/mod_dav_svn/reports/inherited-props.c
subversion/branches/in-repo-authz/subversion/svn/cl.h
subversion/branches/in-repo-authz/subversion/svn/conflict-callbacks.c
subversion/branches/in-repo-authz/subversion/svn/log-cmd.c
subversion/branches/in-repo-authz/subversion/svn/merge-cmd.c
subversion/branches/in-repo-authz/subversion/svn/propget-cmd.c
subversion/branches/in-repo-authz/subversion/svn/proplist-cmd.c
subversion/branches/in-repo-authz/subversion/svn/props.c
subversion/branches/in-repo-authz/subversion/svn/schema/info.rnc
subversion/branches/in-repo-authz/subversion/svn/svn.c
subversion/branches/in-repo-authz/subversion/svn/util.c
subversion/branches/in-repo-authz/subversion/svnlook/svnlook.c
subversion/branches/in-repo-authz/subversion/svnserve/serve.c
subversion/branches/in-repo-authz/subversion/tests/cmdline/svnlook_tests.py
subversion/branches/in-repo-authz/subversion/tests/libsvn_repos/repos-test.c
subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/db-test.c
subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/entries-compat.c
subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/op-depth-test.c
subversion/branches/in-repo-authz/tools/client-side/svn-bench/cl.h
subversion/branches/in-repo-authz/tools/server-side/fsfs-reorg.c
Propchange: subversion/branches/in-repo-authz/
------------------------------------------------------------------------------
Merged /subversion/branches/wc-collate-path:r1407642
Merged /subversion/trunk:r1415647-1417564
Modified: subversion/branches/in-repo-authz/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/Makefile.in?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/Makefile.in (original)
+++ subversion/branches/in-repo-authz/Makefile.in Wed Dec 5 18:27:47 2012
@@ -572,7 +572,23 @@ svnsshcheck: bin $(TEST_DEPS) @BDB_TEST_
bdbcheck: bin $(TEST_DEPS) @BDB_TEST_DEPS@
@$(MAKE) check FS_TYPE=bdb
-check-clean:
+# Create an execution coverage report from the data collected during
+# all execution since the last reset.
+gcov:
+ lcov --capture -d . -b . -o gcov-lcov.dat > gcov-lcov.log
+ genhtml gcov-lcov.dat -o gcov-report > gcov-genhtml.log
+
+# Reset all execution coverage counters to zero.
+gcov-reset:
+ lcov --zerocounters -d .
+
+# Remove the execution coverage data and the report.
+gcov-clean:
+ rm -f gcov-lcov.dat gcov-lcov.log gcov-genhtml.log
+ rm -rf gcov-report
+ find . -name "*.gcda" -o -name "*.gcno" -print0 | xargs -0 rm -f
+
+check-clean: gcov-clean
rm -rf subversion/tests/cmdline/svn-test-work \
subversion/tests/libsvn_fs/test-repo-* \
subversion/tests/libsvn_fs_base/test-repo-* \
Modified: subversion/branches/in-repo-authz/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/configure.ac?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/configure.ac (original)
+++ subversion/branches/in-repo-authz/configure.ac Wed Dec 5 18:27:47 2012
@@ -1112,6 +1112,30 @@ AC_SUBST(MOD_ACTIVATION)
+AC_ARG_ENABLE(gcov,
+AC_HELP_STRING([--enable-gcov],
+ [Turn on gcov coverage testing (GCC only).]),
+[
+ if test "$enableval" = "yes" ; then
+ dnl Probably other compilers support something similar;
+ dnl feel free to extend this to include them.
+ if test "$GCC" = "yes"; then
+ if test "$svn_enable_shared" = "yes" ; then
+ AC_MSG_ERROR([Can't have --enable-gcov without --disable-shared (we
+ recommend also using --enable-all-static).])
+ fi
+ if test ! "$enable_all_static" = "yes" ; then
+ AC_MSG_WARN(We recommend --enable-all-static with --enable-gcov.)
+ fi
+ AC_MSG_NOTICE([Enabling gcov coverage testing.])
+ CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
+ CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
+ else
+ AC_MSG_ERROR([We only support --enable-gcov with GCC right now.])
+ fi
+ fi
+])
+
AC_ARG_ENABLE(gprof,
AS_HELP_STRING([--enable-gprof],
[Produce gprof profiling data in 'gmon.out' (GCC only).]),
Modified: subversion/branches/in-repo-authz/subversion/bindings/swig/perl/native/Base.pm
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/bindings/swig/perl/native/Base.pm?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/bindings/swig/perl/native/Base.pm (original)
+++ subversion/branches/in-repo-authz/subversion/bindings/swig/perl/native/Base.pm Wed Dec 5 18:27:47 2012
@@ -40,7 +40,7 @@ with prefix trimmed in the namespace of
The 3rd through the last parameter is a list of symbol endings that
you wish for SVN::Base not to import into your namespace. This is useful
-for cases where you may want to import certaion symbols differently than
+for cases where you may want to import certain symbols differently than
normally.
=head1 CAVEATS
Modified: subversion/branches/in-repo-authz/subversion/include/private/svn_cmdline_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/private/svn_cmdline_private.h?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/private/svn_cmdline_private.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/private/svn_cmdline_private.h Wed Dec 5 18:27:47 2012
@@ -31,6 +31,7 @@
#include "svn_string.h"
#include "svn_error.h"
+#include "svn_io.h"
#ifdef __cplusplus
extern "C" {
@@ -108,6 +109,40 @@ svn_cmdline__apply_config_options(apr_ha
const char *prefix,
const char *argument_name);
+/* Return a string allocated in POOL that is a copy of STR but with each
+ * line prefixed with INDENT. A line is all characters up to the first
+ * CR-LF, LF-CR, CR or LF, or the end of STR if sooner. */
+const char *
+svn_cmdline__indent_string(const char *str,
+ const char *indent,
+ apr_pool_t *pool);
+
+/* Print to stdout a hash PROP_HASH that maps property names (char *) to
+ property values (svn_string_t *). The names are assumed to be in UTF-8
+ format; the values are either in UTF-8 (the special Subversion props) or
+ plain binary values.
+
+ If OUT is not NULL, then write to it rather than stdout.
+
+ If NAMES_ONLY is true, print just names, else print names and
+ values. */
+svn_error_t *
+svn_cmdline__print_prop_hash(svn_stream_t *out,
+ apr_hash_t *prop_hash,
+ svn_boolean_t names_only,
+ apr_pool_t *pool);
+
+/* Similar to svn_cmdline__print_prop_hash(), only output xml to *OUTSTR.
+ If INHERITED_PROPS is true, then PROP_HASH contains inherited properties,
+ otherwise PROP_HASH contains explicit properties. If *OUTSTR is NULL,
+ allocate it first from POOL, otherwise append to it. */
+svn_error_t *
+svn_cmdline__print_xml_prop_hash(svn_stringbuf_t **outstr,
+ apr_hash_t *prop_hash,
+ svn_boolean_t names_only,
+ svn_boolean_t inherited_props,
+ apr_pool_t *pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/in-repo-authz/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/private/svn_wc_private.h?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/private/svn_wc_private.h Wed Dec 5 18:27:47 2012
@@ -317,14 +317,18 @@ svn_wc__del_tree_conflict(svn_wc_context
const char *victim_abspath,
apr_pool_t *scratch_pool);
-/** Like svn_wc_is_wc_root(), but it doesn't consider switched subdirs or
+/** Check whether LOCAL_ABSPATH has a parent directory that knows about its
+ * existence. Set *IS_WCROOT to FALSE if a parent is found, and to TRUE
+ * if there is no such parent.
+ *
+ * Like svn_wc_is_wc_root2(), but doesn't consider switched subdirs or
* deleted entries as working copy roots.
*/
svn_error_t *
-svn_wc__strictly_is_wc_root(svn_boolean_t *wc_root,
- svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- apr_pool_t *scratch_pool);
+svn_wc__is_wcroot(svn_boolean_t *is_wcroot,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *scratch_pool);
/** Set @a *wcroot_abspath to the local abspath of the root of the
Modified: subversion/branches/in-repo-authz/subversion/include/svn_editor.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/svn_editor.h?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/svn_editor.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/svn_editor.h Wed Dec 5 18:27:47 2012
@@ -79,8 +79,8 @@ extern "C" {
* coupling between those subsystems.
*
* The set of changes, and the data necessary to describe it entirely, is
- * completely unbounded. An addition of one simple 20Gb file would be well
- * past the available memory of any machine processing these operations.
+ * completely unbounded. An addition of one simple 20 GB file might be well
+ * past the available memory of a machine processing these operations.
* As a result, the API to describe the changes is designed to be applied
* in a sequential (and relatively random-access) model. The operations
* can be streamed from the driver to the receiver, resulting in the
@@ -884,8 +884,11 @@ svn_editor_add_absent(svn_editor_t *edit
*
* Alter the properties of the directory at @a relpath.
*
- * @a revision specifies the expected revision of the directory and is
- * used to catch attempts at altering out-of-date directories. If the
+ * @a revision specifies the revision at which the receiver should
+ * expect to find this node. That is, @a relpath at the start of the
+ * whole edit and @a relpath at @a revision must lie within the same
+ * node-rev (aka location history segment). This information may be used
+ * to catch an attempt to alter and out-of-date directory. If the
* directory does not have a corresponding revision in the repository
* (e.g. it has not yet been committed), then @a revision should be
* #SVN_INVALID_REVNUM.
@@ -927,8 +930,8 @@ svn_editor_alter_directory(svn_editor_t
* The properties and/or the contents must be changed. It is an error to
* pass NULL for @a props, @a checksum, and @a contents.
*
- * For a description of @a checksum, and @a contents see
- * svn_editor_add_file(). This functions allows @a props to be NULL, but
+ * For a description of @a checksum and @a contents see
+ * svn_editor_add_file(). This function allows @a props to be NULL, but
* the parameter is otherwise described by svn_editor_add_file().
*
* For all restrictions on driving the editor, see #svn_editor_t.
@@ -955,7 +958,7 @@ svn_editor_alter_file(svn_editor_t *edit
* The properties and/or the target must be changed. It is an error to
* pass NULL for @a props and @a target.
*
- * This functions allows @a props to be NULL, but the parameter is
+ * This function allows @a props to be NULL, but the parameter is
* otherwise described by svn_editor_add_file().
*
* For all restrictions on driving the editor, see #svn_editor_t.
@@ -1004,8 +1007,14 @@ svn_editor_copy(svn_editor_t *editor,
svn_revnum_t replaces_rev);
/** Drive @a editor's #svn_editor_cb_move_t callback.
- * Move the node at @a src_relpath, expected to be identical to revision @a
- * src_revision of that path, to @a dst_relpath.
+ *
+ * Move the node at @a src_relpath to @a dst_relpath.
+ *
+ * @a src_revision specifies the revision at which the receiver should
+ * expect to find this node. That is, @a src_relpath at the start of
+ * the whole edit and @a src_relpath at @a src_revision must lie within
+ * the same node-rev (aka history-segment). This is just like the
+ * revisions specified to svn_editor_delete() and svn_editor_rotate().
*
* For a description of @a replaces_rev, see svn_editor_add_file().
*
@@ -1032,7 +1041,7 @@ svn_editor_move(svn_editor_t *editor,
* For example, the node at index 0 of @a relpaths and @a revisions will
* be moved to the relpath specified at index 1 of @a relpaths. The node
* at index 1 will be moved to the location at index 2. The node at index
- * N-1 will be moved to the relpath specifed at index 0.
+ * N-1 will be moved to the relpath specified at index 0.
*
* The simplest form of this operation is to swap nodes A and B. One may
* think to move A to a temporary location T, then move B to A, then move
Modified: subversion/branches/in-repo-authz/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/svn_repos.h?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/svn_repos.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/svn_repos.h Wed Dec 5 18:27:47 2012
@@ -3304,6 +3304,9 @@ svn_repos_check_revision_access(svn_repo
* inherited by @a path in @a root. If no properties are inherited,
* then set @a *inherited_values to an empty array.
*
+ * if @a propname is NULL then retrieve all explicit and/or inherited
+ * properties. Otherwise retrieve only the properties named @a propname.
+ *
* If optional @a authz_read_func is non-NULL, then use this function
* (along with optional @a authz_read_baton) to check the readability
* of each parent path from which properties are inherited. Silently omit
@@ -3318,6 +3321,7 @@ svn_error_t *
svn_repos_fs_get_inherited_props(apr_array_header_t **inherited_props,
svn_fs_root_t *root,
const char *path,
+ const char *propname,
svn_repos_authz_func_t authz_read_func,
void *authz_read_baton,
apr_pool_t *result_pool,
Modified: subversion/branches/in-repo-authz/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/svn_wc.h?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/svn_wc.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/svn_wc.h Wed Dec 5 18:27:47 2012
@@ -5404,10 +5404,10 @@ svn_wc_crawl_revisions(const char *path,
*/
/** If @a is_wcroot is not @c NULL, set @a *is_wcroot to @c TRUE if @a
- * local_abspath is the root of the working, otherwise to @c FALSE.
+ * local_abspath is the root of the working copy, otherwise to @c FALSE.
*
* If @a is_switched is not @c NULL, set @a *is_switched to @c TRUE if @a
- * local_abspath is not the root of the working, and switched against its
+ * local_abspath is not the root of the working copy, and switched against its
* parent.
*
* If @a kind is not @c NULL, set @a *kind to the node kind of @a
@@ -6161,6 +6161,8 @@ svn_wc_is_entry_prop(const char *name);
* (Currently, this is used if you are attempting to set the
* #SVN_PROP_EOL_STYLE property, to make sure that the value matches
* the mime type and contents.)
+ *
+ * @since New in 1.5.
*/
typedef svn_error_t *(*svn_wc_canonicalize_svn_prop_get_file_t)(
const svn_string_t **mime_type,
@@ -6192,7 +6194,9 @@ typedef svn_error_t *(*svn_wc_canonicali
* for error messages.
*
* ### This is not actually related to the WC, but it does need to call
- * ### svn_wc_parse_externals_description2.
+ * ### svn_wc_parse_externals_description3.
+ *
+ * @since New in 1.5.
*/
svn_error_t *
svn_wc_canonicalize_svn_prop(const svn_string_t **propval_p,
Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/add.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/add.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/add.c Wed Dec 5 18:27:47 2012
@@ -1119,11 +1119,11 @@ svn_client_add5(const char *path,
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
/* See if we're being asked to add a wc-root. That's typically not
- okay, unless we're in "force" mode. svn_wc__strictly_is_wc_root()
+ okay, unless we're in "force" mode. svn_wc__is_wcroot()
will return TRUE even if LOCAL_ABSPATH is a *symlink* to a working
copy root, which is a scenario we want to treat differently. */
- err = svn_wc__strictly_is_wc_root(&is_wc_root, ctx->wc_ctx,
- local_abspath, scratch_pool);
+ err = svn_wc__is_wcroot(&is_wc_root, ctx->wc_ctx, local_abspath,
+ scratch_pool);
if (err)
{
if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND
Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/export.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/export.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/export.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/export.c Wed Dec 5 18:27:47 2012
@@ -43,8 +43,13 @@
#include "svn_private_config.h"
#include "private/svn_subr_private.h"
+#include "private/svn_delta_private.h"
#include "private/svn_wc_private.h"
+#ifndef ENABLE_EV2_IMPL
+#define ENABLE_EV2_IMPL 0
+#endif
+
/*** Code. ***/
@@ -859,26 +864,6 @@ close_file(void *file_baton,
}
static svn_error_t *
-fetch_kind_func(svn_kind_t *kind,
- void *baton,
- const char *path,
- svn_revnum_t base_revision,
- apr_pool_t *scratch_pool)
-{
- /* We know the root of the edit is a directory. */
- if (path[0] == '\0')
- *kind = svn_kind_dir;
-
- /* ### TODO: We could possibly fetch the kind of the object in question
- from the server with a second ra_session, but right now this
- seems to work. */
- else
- *kind = svn_kind_unknown;
-
- return SVN_NO_ERROR;
-}
-
-static svn_error_t *
fetch_props_func(apr_hash_t **props,
void *baton,
const char *path,
@@ -908,16 +893,14 @@ fetch_base_func(const char **filename,
}
static svn_error_t *
-get_editor(const svn_delta_editor_t **export_editor,
- void **edit_baton,
- struct edit_baton *eb,
- svn_client_ctx_t *ctx,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
+get_editor_ev1(const svn_delta_editor_t **export_editor,
+ void **edit_baton,
+ struct edit_baton *eb,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
svn_delta_editor_t *editor = svn_delta_default_editor(result_pool);
- svn_delta_shim_callbacks_t *shim_callbacks =
- svn_delta_shim_callbacks_default(result_pool);
editor->set_target_revision = set_target_revision;
editor->open_root = open_root;
@@ -936,19 +919,453 @@ get_editor(const svn_delta_editor_t **ex
edit_baton,
result_pool));
- shim_callbacks->fetch_kind_func = fetch_kind_func;
- shim_callbacks->fetch_props_func = fetch_props_func;
- shim_callbacks->fetch_base_func = fetch_base_func;
- shim_callbacks->fetch_baton = eb;
-
- SVN_ERR(svn_editor__insert_shims(export_editor, edit_baton,
- *export_editor, *edit_baton,
- NULL, NULL, shim_callbacks,
- result_pool, scratch_pool));
+ return SVN_NO_ERROR;
+}
+
+
+/*** The Ev2 Implementation ***/
+
+static svn_error_t *
+add_file_ev2(void *baton,
+ const char *relpath,
+ const svn_checksum_t *checksum,
+ svn_stream_t *contents,
+ apr_hash_t *props,
+ svn_revnum_t replaces_rev,
+ apr_pool_t *scratch_pool)
+{
+ struct edit_baton *eb = baton;
+ const char *full_path = svn_dirent_join(eb->root_path, relpath,
+ scratch_pool);
+ /* RELPATH is not canonicalized, i.e. it may still contain spaces etc.
+ * but EB->root_url is. */
+ const char *full_url = svn_path_url_add_component2(eb->root_url,
+ relpath,
+ scratch_pool);
+ const svn_string_t *val;
+ /* The four svn: properties we might actually care about. */
+ const svn_string_t *eol_style_val = NULL;
+ const svn_string_t *keywords_val = NULL;
+ const svn_string_t *executable_val = NULL;
+ svn_boolean_t special = FALSE;
+ /* Any keyword vals to be substituted */
+ const char *revision = NULL;
+ const char *author = NULL;
+ apr_time_t date = 0;
+
+ /* Look at any properties for additional information. */
+ if ( (val = apr_hash_get(props, SVN_PROP_EOL_STYLE, APR_HASH_KEY_STRING)) )
+ eol_style_val = val;
+
+ if ( !eb->ignore_keywords && (val = apr_hash_get(props, SVN_PROP_KEYWORDS,
+ APR_HASH_KEY_STRING)) )
+ keywords_val = val;
+
+ if ( (val = apr_hash_get(props, SVN_PROP_EXECUTABLE, APR_HASH_KEY_STRING)) )
+ executable_val = val;
+
+ /* Try to fill out the baton's keywords-structure too. */
+ if ( (val = apr_hash_get(props, SVN_PROP_ENTRY_COMMITTED_REV,
+ APR_HASH_KEY_STRING)) )
+ revision = val->data;
+
+ if ( (val = apr_hash_get(props, SVN_PROP_ENTRY_COMMITTED_DATE,
+ APR_HASH_KEY_STRING)) )
+ SVN_ERR(svn_time_from_cstring(&date, val->data, scratch_pool));
+
+ if ( (val = apr_hash_get(props, SVN_PROP_ENTRY_LAST_AUTHOR,
+ APR_HASH_KEY_STRING)) )
+ author = val->data;
+
+ if ( (val = apr_hash_get(props, SVN_PROP_SPECIAL, APR_HASH_KEY_STRING)) )
+ special = TRUE;
+
+ if (special)
+ {
+ svn_stream_t *tmp_stream;
+
+ SVN_ERR(svn_subst_create_specialfile(&tmp_stream, full_path,
+ scratch_pool, scratch_pool));
+ SVN_ERR(svn_stream_copy3(contents, tmp_stream, eb->cancel_func,
+ eb->cancel_baton, scratch_pool));
+ }
+ else
+ {
+ svn_stream_t *tmp_stream;
+ const char *tmppath;
+
+ /* Create a temporary file in the same directory as the file. We're going
+ to rename the thing into place when we're done. */
+ SVN_ERR(svn_stream_open_unique(&tmp_stream, &tmppath,
+ svn_dirent_dirname(full_path,
+ scratch_pool),
+ svn_io_file_del_none,
+ scratch_pool, scratch_pool));
+
+ /* Possibly wrap the stream to be translated, as dictated by
+ the props. */
+ if (eol_style_val || keywords_val)
+ {
+ svn_subst_eol_style_t style;
+ const char *eol = NULL;
+ svn_boolean_t repair = FALSE;
+ apr_hash_t *final_kw = NULL;
+
+ if (eol_style_val)
+ {
+ SVN_ERR(get_eol_style(&style, &eol, eol_style_val->data,
+ eb->native_eol));
+ repair = TRUE;
+ }
+
+ if (keywords_val)
+ SVN_ERR(svn_subst_build_keywords2(&final_kw, keywords_val->data,
+ revision, full_url, date,
+ author, scratch_pool));
+
+ /* Writing through a translated stream is more efficient than
+ reading through one, so we wrap TMP_STREAM and not CONTENTS. */
+ tmp_stream = svn_subst_stream_translated(tmp_stream, eol, repair,
+ final_kw, TRUE, /* expand */
+ scratch_pool);
+ }
+
+ SVN_ERR(svn_stream_copy3(contents, tmp_stream, eb->cancel_func,
+ eb->cancel_baton, scratch_pool));
+
+ /* Move the file into place. */
+ SVN_ERR(svn_io_file_rename(tmppath, full_path, scratch_pool));
+ }
+
+ if (executable_val)
+ SVN_ERR(svn_io_set_file_executable(full_path, TRUE, FALSE, scratch_pool));
+
+ if (date && (! special))
+ SVN_ERR(svn_io_set_file_affected_time(date, full_path, scratch_pool));
+
+ if (eb->notify_func)
+ {
+ svn_wc_notify_t *notify = svn_wc_create_notify(full_path,
+ svn_wc_notify_update_add,
+ scratch_pool);
+ notify->kind = svn_node_file;
+ (*eb->notify_func)(eb->notify_baton, notify, scratch_pool);
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+add_directory_ev2(void *baton,
+ const char *relpath,
+ const apr_array_header_t *children,
+ apr_hash_t *props,
+ svn_revnum_t replaces_rev,
+ apr_pool_t *scratch_pool)
+{
+ struct edit_baton *eb = baton;
+ svn_node_kind_t kind;
+ const char *full_path = svn_dirent_join(eb->root_path, relpath,
+ scratch_pool);
+ svn_string_t *val;
+
+ SVN_ERR(svn_io_check_path(full_path, &kind, scratch_pool));
+ if (kind == svn_node_none)
+ SVN_ERR(svn_io_dir_make(full_path, APR_OS_DEFAULT, scratch_pool));
+ else if (kind == svn_node_file)
+ return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,
+ _("'%s' exists and is not a directory"),
+ svn_dirent_local_style(full_path, scratch_pool));
+ else if (! (kind == svn_node_dir && eb->force))
+ return svn_error_createf(SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
+ _("'%s' already exists"),
+ svn_dirent_local_style(full_path, scratch_pool));
+
+ if ( (val = apr_hash_get(props, SVN_PROP_EXTERNALS, APR_HASH_KEY_STRING)) )
+ SVN_ERR(add_externals(eb->externals, full_path, val));
+
+ if (eb->notify_func)
+ {
+ svn_wc_notify_t *notify = svn_wc_create_notify(full_path,
+ svn_wc_notify_update_add,
+ scratch_pool);
+ notify->kind = svn_node_dir;
+ (*eb->notify_func)(eb->notify_baton, notify, scratch_pool);
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+target_revision_func(void *baton,
+ svn_revnum_t target_revision,
+ apr_pool_t *scratch_pool)
+{
+ struct edit_baton *eb = baton;
+
+ *eb->target_revision = target_revision;
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+get_editor_ev2(const svn_delta_editor_t **export_editor,
+ void **edit_baton,
+ struct edit_baton *eb,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_editor_t *editor;
+ struct svn_delta__extra_baton *exb = apr_pcalloc(result_pool, sizeof(*exb));
+ svn_boolean_t *found_abs_paths = apr_palloc(result_pool,
+ sizeof(*found_abs_paths));
+
+ exb->baton = eb;
+ exb->target_revision = target_revision_func;
+
+ SVN_ERR(svn_editor_create(&editor, eb, ctx->cancel_func, ctx->cancel_baton,
+ result_pool, scratch_pool));
+ SVN_ERR(svn_editor_setcb_add_directory(editor, add_directory_ev2,
+ scratch_pool));
+ SVN_ERR(svn_editor_setcb_add_file(editor, add_file_ev2, scratch_pool));
+
+ *found_abs_paths = TRUE;
+
+ SVN_ERR(svn_delta__delta_from_editor(export_editor, edit_baton,
+ editor, NULL, NULL, found_abs_paths,
+ NULL, NULL,
+ fetch_props_func, eb,
+ fetch_base_func, eb,
+ exb, result_pool));
+
+ /* Create the root of the export. */
+ SVN_ERR(open_root_internal(eb->root_path, eb->force, eb->notify_func,
+ eb->notify_baton, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+export_file_ev2(const char *from_path_or_url,
+ const char *to_path,
+ struct edit_baton *eb,
+ svn_client__pathrev_t *loc,
+ svn_ra_session_t *ra_session,
+ svn_boolean_t overwrite,
+ apr_pool_t *scratch_pool)
+{
+ svn_boolean_t from_is_url = svn_path_is_url(from_path_or_url);
+ apr_hash_t *props;
+ svn_stream_t *tmp_stream;
+ svn_node_kind_t to_kind;
+
+ if (svn_path_is_empty(to_path))
+ {
+ if (from_is_url)
+ to_path = svn_uri_basename(from_path_or_url, scratch_pool);
+ else
+ to_path = svn_dirent_basename(from_path_or_url, NULL);
+ eb->root_path = to_path;
+ }
+ else
+ {
+ SVN_ERR(append_basename_if_dir(&to_path, from_path_or_url,
+ from_is_url, scratch_pool));
+ eb->root_path = to_path;
+ }
+
+ SVN_ERR(svn_io_check_path(to_path, &to_kind, scratch_pool));
+
+ if ((to_kind == svn_node_file || to_kind == svn_node_unknown) &&
+ ! overwrite)
+ return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("Destination file '%s' exists, and "
+ "will not be overwritten unless forced"),
+ svn_dirent_local_style(to_path, scratch_pool));
+ else if (to_kind == svn_node_dir)
+ return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("Destination '%s' exists. Cannot "
+ "overwrite directory with non-directory"),
+ svn_dirent_local_style(to_path, scratch_pool));
+
+ tmp_stream = svn_stream_buffered(scratch_pool);
+
+ SVN_ERR(svn_ra_get_file(ra_session, "", loc->rev,
+ tmp_stream, NULL, &props, scratch_pool));
+
+ /* Since you cannot actually root an editor at a file, we manually drive
+ * a function of our editor. */
+ SVN_ERR(add_file_ev2(eb, "", NULL, tmp_stream, props, SVN_INVALID_REVNUM,
+ scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+export_file(const char *from_path_or_url,
+ const char *to_path,
+ struct edit_baton *eb,
+ svn_client__pathrev_t *loc,
+ svn_ra_session_t *ra_session,
+ svn_boolean_t overwrite,
+ apr_pool_t *scratch_pool)
+{
+ apr_hash_t *props;
+ apr_hash_index_t *hi;
+ struct file_baton *fb = apr_pcalloc(scratch_pool, sizeof(*fb));
+ svn_node_kind_t to_kind;
+ svn_boolean_t from_is_url = svn_path_is_url(from_path_or_url);
+
+ if (svn_path_is_empty(to_path))
+ {
+ if (from_is_url)
+ to_path = svn_uri_basename(from_path_or_url, scratch_pool);
+ else
+ to_path = svn_dirent_basename(from_path_or_url, NULL);
+ eb->root_path = to_path;
+ }
+ else
+ {
+ SVN_ERR(append_basename_if_dir(&to_path, from_path_or_url,
+ from_is_url, scratch_pool));
+ eb->root_path = to_path;
+ }
+
+ SVN_ERR(svn_io_check_path(to_path, &to_kind, scratch_pool));
+
+ if ((to_kind == svn_node_file || to_kind == svn_node_unknown) &&
+ ! overwrite)
+ return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("Destination file '%s' exists, and "
+ "will not be overwritten unless forced"),
+ svn_dirent_local_style(to_path, scratch_pool));
+ else if (to_kind == svn_node_dir)
+ return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("Destination '%s' exists. Cannot "
+ "overwrite directory with non-directory"),
+ svn_dirent_local_style(to_path, scratch_pool));
+
+ /* Since you cannot actually root an editor at a file, we
+ * manually drive a few functions of our editor. */
+
+ /* This is the equivalent of a parentless add_file(). */
+ fb->edit_baton = eb;
+ fb->path = eb->root_path;
+ fb->url = eb->root_url;
+ fb->pool = scratch_pool;
+
+ /* Copied from apply_textdelta(). */
+ SVN_ERR(svn_stream_open_unique(&fb->tmp_stream, &fb->tmppath,
+ svn_dirent_dirname(fb->path, scratch_pool),
+ svn_io_file_del_none,
+ fb->pool, fb->pool));
+
+ /* Step outside the editor-likeness for a moment, to actually talk
+ * to the repository. */
+ /* ### note: the stream will not be closed */
+ SVN_ERR(svn_ra_get_file(ra_session, "", loc->rev,
+ fb->tmp_stream,
+ NULL, &props, scratch_pool));
+
+ /* Push the props into change_file_prop(), to update the file_baton
+ * with information. */
+ for (hi = apr_hash_first(scratch_pool, props); hi; hi = apr_hash_next(hi))
+ {
+ const char *propname = svn__apr_hash_index_key(hi);
+ const svn_string_t *propval = svn__apr_hash_index_val(hi);
+
+ SVN_ERR(change_file_prop(fb, propname, propval, scratch_pool));
+ }
+
+ /* And now just use close_file() to do all the keyword and EOL
+ * work, and put the file into place. */
+ SVN_ERR(close_file(fb, NULL, scratch_pool));
- return SVN_NO_ERROR;
+ return SVN_NO_ERROR;
}
+static svn_error_t *
+export_directory(const char *from_path_or_url,
+ const char *to_path,
+ struct edit_baton *eb,
+ svn_client__pathrev_t *loc,
+ svn_ra_session_t *ra_session,
+ svn_boolean_t overwrite,
+ svn_boolean_t ignore_externals,
+ svn_boolean_t ignore_keywords,
+ svn_depth_t depth,
+ const char *native_eol,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool)
+{
+ void *edit_baton;
+ const svn_delta_editor_t *export_editor;
+ const svn_ra_reporter3_t *reporter;
+ void *report_baton;
+ svn_boolean_t use_sleep = FALSE;
+ svn_node_kind_t kind;
+
+ if (!ENABLE_EV2_IMPL)
+ SVN_ERR(get_editor_ev1(&export_editor, &edit_baton, eb, ctx,
+ scratch_pool, scratch_pool));
+ else
+ SVN_ERR(get_editor_ev2(&export_editor, &edit_baton, eb, ctx,
+ scratch_pool, scratch_pool));
+
+ /* Manufacture a basic 'report' to the update reporter. */
+ SVN_ERR(svn_ra_do_update2(ra_session,
+ &reporter, &report_baton,
+ loc->rev,
+ "", /* no sub-target */
+ depth,
+ FALSE, /* don't want copyfrom-args */
+ export_editor, edit_baton, scratch_pool));
+
+ SVN_ERR(reporter->set_path(report_baton, "", loc->rev,
+ /* Depth is irrelevant, as we're
+ passing start_empty=TRUE anyway. */
+ svn_depth_infinity,
+ TRUE, /* "help, my dir is empty!" */
+ NULL, scratch_pool));
+
+ SVN_ERR(reporter->finish_report(report_baton, scratch_pool));
+
+ /* Special case: Due to our sly export/checkout method of updating an
+ * empty directory, no target will have been created if the exported
+ * item is itself an empty directory (export_editor->open_root never
+ * gets called, because there are no "changes" to make to the empty
+ * dir we reported to the repository).
+ *
+ * So we just create the empty dir manually; but we do it via
+ * open_root_internal(), in order to get proper notification.
+ */
+ SVN_ERR(svn_io_check_path(to_path, &kind, scratch_pool));
+ if (kind == svn_node_none)
+ SVN_ERR(open_root_internal
+ (to_path, overwrite, ctx->notify_func2,
+ ctx->notify_baton2, scratch_pool));
+
+ if (! ignore_externals && depth == svn_depth_infinity)
+ {
+ const char *repos_root_url;
+ const char *to_abspath;
+
+ SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url,
+ scratch_pool));
+ SVN_ERR(svn_dirent_get_absolute(&to_abspath, to_path, scratch_pool));
+ SVN_ERR(svn_client__export_externals(eb->externals,
+ from_path_or_url,
+ to_abspath, repos_root_url,
+ depth, native_eol,
+ ignore_keywords, &use_sleep,
+ ctx, scratch_pool));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+
/*** Public Interfaces ***/
@@ -1009,135 +1426,19 @@ svn_client_export5(svn_revnum_t *result_
if (kind == svn_node_file)
{
- apr_hash_t *props;
- apr_hash_index_t *hi;
- struct file_baton *fb = apr_pcalloc(pool, sizeof(*fb));
- svn_node_kind_t to_kind;
-
- if (svn_path_is_empty(to_path))
- {
- if (from_is_url)
- to_path = svn_uri_basename(from_path_or_url, pool);
- else
- to_path = svn_dirent_basename(from_path_or_url, NULL);
- eb->root_path = to_path;
- }
+ if (!ENABLE_EV2_IMPL)
+ SVN_ERR(export_file(from_path_or_url, to_path, eb, loc, ra_session,
+ overwrite, pool));
else
- {
- SVN_ERR(append_basename_if_dir(&to_path, from_path_or_url,
- from_is_url, pool));
- eb->root_path = to_path;
- }
-
- SVN_ERR(svn_io_check_path(to_path, &to_kind, pool));
-
- if ((to_kind == svn_node_file || to_kind == svn_node_unknown) &&
- ! overwrite)
- return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
- _("Destination file '%s' exists, and "
- "will not be overwritten unless forced"),
- svn_dirent_local_style(to_path, pool));
- else if (to_kind == svn_node_dir)
- return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
- _("Destination '%s' exists. Cannot "
- "overwrite directory with non-directory"),
- svn_dirent_local_style(to_path, pool));
-
- /* Since you cannot actually root an editor at a file, we
- * manually drive a few functions of our editor. */
-
- /* This is the equivalent of a parentless add_file(). */
- fb->edit_baton = eb;
- fb->path = eb->root_path;
- fb->url = eb->root_url;
- fb->pool = pool;
-
- /* Copied from apply_textdelta(). */
- SVN_ERR(svn_stream_open_unique(&fb->tmp_stream, &fb->tmppath,
- svn_dirent_dirname(fb->path, pool),
- svn_io_file_del_none,
- fb->pool, fb->pool));
-
- /* Step outside the editor-likeness for a moment, to actually talk
- * to the repository. */
- /* ### note: the stream will not be closed */
- SVN_ERR(svn_ra_get_file(ra_session, "", loc->rev,
- fb->tmp_stream,
- NULL, &props, pool));
-
- /* Push the props into change_file_prop(), to update the file_baton
- * with information. */
- for (hi = apr_hash_first(pool, props); hi; hi = apr_hash_next(hi))
- {
- const char *propname = svn__apr_hash_index_key(hi);
- const svn_string_t *propval = svn__apr_hash_index_val(hi);
-
- SVN_ERR(change_file_prop(fb, propname, propval, pool));
- }
-
- /* And now just use close_file() to do all the keyword and EOL
- * work, and put the file into place. */
- SVN_ERR(close_file(fb, NULL, pool));
+ SVN_ERR(export_file_ev2(from_path_or_url, to_path, eb, loc,
+ ra_session, overwrite, pool));
}
else if (kind == svn_node_dir)
{
- void *edit_baton;
- const svn_delta_editor_t *export_editor;
- const svn_ra_reporter3_t *reporter;
- void *report_baton;
- svn_boolean_t use_sleep = FALSE;
-
- SVN_ERR(get_editor(&export_editor, &edit_baton, eb, ctx,
- pool, pool));
-
- /* Manufacture a basic 'report' to the update reporter. */
- SVN_ERR(svn_ra_do_update2(ra_session,
- &reporter, &report_baton,
- loc->rev,
- "", /* no sub-target */
- depth,
- FALSE, /* don't want copyfrom-args */
- export_editor, edit_baton, pool));
-
- SVN_ERR(reporter->set_path(report_baton, "", loc->rev,
- /* Depth is irrelevant, as we're
- passing start_empty=TRUE anyway. */
- svn_depth_infinity,
- TRUE, /* "help, my dir is empty!" */
- NULL, pool));
-
- SVN_ERR(reporter->finish_report(report_baton, pool));
-
- /* Special case: Due to our sly export/checkout method of
- * updating an empty directory, no target will have been created
- * if the exported item is itself an empty directory
- * (export_editor->open_root never gets called, because there
- * are no "changes" to make to the empty dir we reported to the
- * repository).
- *
- * So we just create the empty dir manually; but we do it via
- * open_root_internal(), in order to get proper notification.
- */
- SVN_ERR(svn_io_check_path(to_path, &kind, pool));
- if (kind == svn_node_none)
- SVN_ERR(open_root_internal
- (to_path, overwrite, ctx->notify_func2,
- ctx->notify_baton2, pool));
-
- if (! ignore_externals && depth == svn_depth_infinity)
- {
- const char *repos_root_url;
- const char *to_abspath;
-
- SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url, pool));
- SVN_ERR(svn_dirent_get_absolute(&to_abspath, to_path, pool));
- SVN_ERR(svn_client__export_externals(eb->externals,
- from_path_or_url,
- to_abspath, repos_root_url,
- depth, native_eol,
- ignore_keywords, &use_sleep,
- ctx, pool));
- }
+ SVN_ERR(export_directory(from_path_or_url, to_path,
+ eb, loc, ra_session, overwrite,
+ ignore_externals, ignore_keywords, depth,
+ native_eol, ctx, pool));
}
else if (kind == svn_node_none)
{
Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/patch.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/patch.c Wed Dec 5 18:27:47 2012
@@ -2617,8 +2617,8 @@ check_dir_empty(svn_boolean_t *empty, co
int i;
/* Working copy root cannot be deleted, so never consider it empty. */
- SVN_ERR(svn_wc__strictly_is_wc_root(&is_wc_root, wc_ctx, local_abspath,
- scratch_pool));
+ SVN_ERR(svn_wc__is_wcroot(&is_wc_root, wc_ctx, local_abspath,
+ scratch_pool));
if (is_wc_root)
{
*empty = FALSE;
Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/revert.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/revert.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/revert.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/revert.c Wed Dec 5 18:27:47 2012
@@ -166,8 +166,8 @@ svn_client_revert2(const apr_array_heade
baton.changelists = changelists;
baton.ctx = ctx;
- SVN_ERR(svn_wc__strictly_is_wc_root(&wc_root, ctx->wc_ctx,
- local_abspath, pool));
+ SVN_ERR(svn_wc__is_wcroot(&wc_root, ctx->wc_ctx, local_abspath,
+ pool));
lock_target = wc_root ? local_abspath
: svn_dirent_dirname(local_abspath, pool);
err = svn_wc__call_with_write_lock(revert, &baton, ctx->wc_ctx,
Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/switch.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/switch.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/switch.c Wed Dec 5 18:27:47 2012
@@ -231,10 +231,8 @@ switch_internal(svn_revnum_t *result_rev
svn_boolean_t wc_root;
svn_boolean_t needs_iprop_cache = TRUE;
- SVN_ERR(svn_wc__strictly_is_wc_root(&wc_root,
- ctx->wc_ctx,
- local_abspath,
- pool));
+ SVN_ERR(svn_wc__is_wcroot(&wc_root, ctx->wc_ctx, local_abspath,
+ pool));
/* Switching the WC root to anything but the repos root means
we need an iprop cache. */
Modified: subversion/branches/in-repo-authz/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_delta/svndiff.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_delta/svndiff.c Wed Dec 5 18:27:47 2012
@@ -229,10 +229,11 @@ send_simple_insertion_window(svn_txdelta
ip_len = encode_int(ibuf + 1, window->tview_len) - ibuf;
}
- /* encode the window header. */
- header_current[0] = 0; /* source offset == 0 */
- header_current[1] = 0; /* source length == 0 */
- header_current = encode_int(header_current + 2, window->tview_len);
+ /* encode the window header. Please note that the source window may
+ * have content despite not being used for deltification. */
+ header_current = encode_int(header_current, window->sview_offset);
+ header_current = encode_int(header_current, window->sview_len);
+ header_current = encode_int(header_current, window->tview_len);
header_current[0] = (unsigned char)ip_len; /* 1 instruction */
header_current = encode_int(&header_current[1], len);
Modified: subversion/branches/in-repo-authz/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_ra_local/ra_plugin.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_ra_local/ra_plugin.c Wed Dec 5 18:27:47 2012
@@ -1064,7 +1064,7 @@ get_node_props(apr_hash_t **props,
int i;
SVN_ERR(svn_repos_fs_get_inherited_props(inherited_props, root, path,
- NULL, NULL,
+ NULL, NULL, NULL,
result_pool, scratch_pool));
for (i = 0; i < (*inherited_props)->nelts; i++)
Modified: subversion/branches/in-repo-authz/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_ra_serf/update.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_ra_serf/update.c Wed Dec 5 18:27:47 2012
@@ -74,7 +74,8 @@ typedef enum report_state_e {
ABSENT_FILE,
PROP,
IGNORE_PROP_NAME,
- NEED_PROP_NAME
+ NEED_PROP_NAME,
+ TXDELTA
} report_state_e;
@@ -228,6 +229,8 @@ typedef struct report_info_t
const char *final_sha1_checksum;
svn_txdelta_window_handler_t textdelta;
void *textdelta_baton;
+ svn_stream_t *svndiff_decoder;
+ svn_stream_t *base64_decoder;
/* Checksum for close_file */
const char *final_checksum;
@@ -318,6 +321,9 @@ struct report_context_t {
/* Do we want the server to send copyfrom args or not? */
svn_boolean_t send_copyfrom_args;
+ /* Is the server sending everything in one response? */
+ svn_boolean_t send_all_mode;
+
/* Is the server including properties inline for newly added
files/dirs? */
svn_boolean_t add_props_included;
@@ -1448,17 +1454,6 @@ fetch_file(report_context_t *ctx, report
/* What connection should we go on? */
conn = get_best_connection(ctx);
- /* go fetch info->name from DAV:checked-in */
- info->url = svn_ra_serf__get_ver_prop(info->props, info->base_name,
- info->base_rev, "DAV:", "checked-in");
-
- if (!info->url)
- {
- return svn_error_create(SVN_ERR_RA_DAV_MALFORMED_DATA, NULL,
- _("The REPORT or PROPFIND response did not "
- "include the requested checked-in value"));
- }
-
/* If needed, create the PROPFIND to retrieve the file's properties. */
info->propfind_handler = NULL;
if (info->fetch_props)
@@ -1625,9 +1620,15 @@ start_report(svn_ra_serf__xml_parser_t *
if (state == NONE && strcmp(name.name, "update-report") == 0)
{
- const char *val = svn_xml_get_attr_value("inline-props", attrs);
+ const char *val;
+
+ val = svn_xml_get_attr_value("inline-props", attrs);
if (val && (strcmp(val, "true") == 0))
ctx->add_props_included = TRUE;
+
+ val = svn_xml_get_attr_value("send-all", attrs);
+ if (val && (strcmp(val, "true") == 0))
+ ctx->send_all_mode = TRUE;
}
else if (state == NONE && strcmp(name.name, "target-revision") == 0)
{
@@ -1830,7 +1831,11 @@ start_report(svn_ra_serf__xml_parser_t *
info = push_state(parser, ctx, ADD_FILE);
info->base_rev = SVN_INVALID_REVNUM;
- info->fetch_file = TRUE;
+
+ /* If the server isn't in "send-all" mode, we should expect to
+ fetch contents for added files. */
+ if (! ctx->send_all_mode)
+ info->fetch_file = TRUE;
/* If the server isn't included properties for added items,
we'll need to fetch them ourselves. */
@@ -2070,7 +2075,31 @@ start_report(svn_ra_serf__xml_parser_t *
addition to <fetch-file>s and such) when *not* in
"send-all" mode. As a client, we're smart enough to know
that's wrong, so we'll just ignore these tags. */
- ;
+ if (ctx->send_all_mode)
+ {
+ const svn_delta_editor_t *update_editor = ctx->update_editor;
+
+ info = push_state(parser, ctx, TXDELTA);
+
+ if (! info->file_baton)
+ {
+ SVN_ERR(open_updated_file(info, FALSE, info->pool));
+ }
+
+ info->base_checksum = svn_xml_get_attr_value("base-checksum",
+ attrs);
+ SVN_ERR(update_editor->apply_textdelta(info->file_baton,
+ info->base_checksum,
+ info->editor_pool,
+ &info->textdelta,
+ &info->textdelta_baton));
+ info->svndiff_decoder = svn_txdelta_parse_svndiff(
+ info->textdelta,
+ info->textdelta_baton,
+ TRUE, info->pool);
+ info->base64_decoder = svn_base64_decode(info->svndiff_decoder,
+ info->pool);
+ }
}
else
{
@@ -2264,13 +2293,89 @@ end_report(svn_ra_serf__xml_parser_t *pa
info->delta_base = value ? value->data : NULL;
}
- SVN_ERR(fetch_file(ctx, info));
+ /* go fetch info->name from DAV:checked-in */
+ info->url = svn_ra_serf__get_ver_prop(info->props, info->base_name,
+ info->base_rev, "DAV:", "checked-in");
+ if (!info->url)
+ {
+ return svn_error_create(SVN_ERR_RA_DAV_MALFORMED_DATA, NULL,
+ _("The REPORT or PROPFIND response did not "
+ "include the requested checked-in value"));
+ }
+
+ /* If the server is in "send-all" mode, we might have opened the
+ file when we started seeing content for it. If we didn't get
+ any content for it, we still need to open the file. But in
+ any case, we can then immediately close it. */
+ if (ctx->send_all_mode)
+ {
+ if (! info->file_baton)
+ {
+ SVN_ERR(open_updated_file(info, FALSE, info->pool));
+ }
+ SVN_ERR(close_updated_file(info, info->pool));
+ info->dir->ref_count--;
+ }
+ /* Otherwise, if the server is *not* in "send-all" mode, we
+ should be at a point where we can queue up any auxiliary
+ content-fetching requests. */
+ else
+ {
+ SVN_ERR(fetch_file(ctx, info));
+ }
+
svn_ra_serf__xml_pop_state(parser);
}
else if (state == ADD_FILE && strcmp(name.name, "add-file") == 0)
{
- /* We should have everything we need to fetch the file. */
- SVN_ERR(fetch_file(ctx, parser->state->private));
+ report_info_t *info = parser->state->private;
+
+ /* go fetch info->name from DAV:checked-in */
+ info->url = svn_ra_serf__get_ver_prop(info->props, info->base_name,
+ info->base_rev, "DAV:", "checked-in");
+ if (!info->url)
+ {
+ return svn_error_create(SVN_ERR_RA_DAV_MALFORMED_DATA, NULL,
+ _("The REPORT or PROPFIND response did not "
+ "include the requested checked-in value"));
+ }
+
+ /* If the server is in "send-all" mode, we might have opened the
+ file when we started seeing content for it. If we didn't get
+ any content for it, we still need to open the file. But in
+ any case, we can then immediately close it. */
+ if (ctx->send_all_mode)
+ {
+ if (! info->file_baton)
+ {
+ SVN_ERR(open_updated_file(info, FALSE, info->pool));
+ }
+ SVN_ERR(close_updated_file(info, info->pool));
+ info->dir->ref_count--;
+ }
+ /* Otherwise, if the server is *not* in "send-all" mode, we
+ should be at a point where we can queue up any auxiliary
+ content-fetching requests. */
+ else
+ {
+ SVN_ERR(fetch_file(ctx, info));
+ }
+
+ svn_ra_serf__xml_pop_state(parser);
+ }
+ else if (state == TXDELTA && strcmp(name.name, "txdelta") == 0)
+ {
+ report_info_t *info = parser->state->private;
+
+ /* Pre 1.2, mod_dav_svn was using <txdelta> tags (in addition to
+ <fetch-file>s and such) when *not* in "send-all" mode. As a
+ client, we're smart enough to know that's wrong, so when not
+ in "receiving-all" mode, we'll ignore these tags. */
+ if (ctx->send_all_mode)
+ {
+ SVN_ERR(svn_stream_close(info->base64_decoder));
+ }
+
svn_ra_serf__xml_pop_state(parser);
}
else if (state == PROP)
@@ -2397,6 +2502,27 @@ cdata_report(svn_ra_serf__xml_parser_t *
svn_stringbuf_appendbytes(info->prop_value, data, len);
}
+ else if (parser->state->current_state == TXDELTA)
+ {
+ /* Pre 1.2, mod_dav_svn was using <txdelta> tags (in addition to
+ <fetch-file>s and such) when *not* in "send-all" mode. As a
+ client, we're smart enough to know that's wrong, so when not
+ in "receiving-all" mode, we'll ignore these tags. */
+ if (ctx->send_all_mode)
+ {
+ apr_size_t nlen = len;
+ report_info_t *info = parser->state->private;
+
+ SVN_ERR(svn_stream_write(info->base64_decoder, data, &nlen));
+ if (nlen != len)
+ {
+ /* Short write without associated error? "Can't happen." */
+ return svn_error_createf(SVN_ERR_STREAM_UNEXPECTED_EOF, NULL,
+ _("Error writing to '%s': unexpected EOF"),
+ info->name);
+ }
+ }
+ }
return SVN_NO_ERROR;
}
@@ -3035,9 +3161,19 @@ make_update_reporter(svn_ra_session_t *r
svn_io_file_del_on_pool_cleanup,
report->pool, scratch_pool));
+#ifdef SVN_RA_SERF__UPDATES_SEND_ALL
+ svn_xml_make_open_tag(&buf, scratch_pool, svn_xml_normal, "S:update-report",
+ "xmlns:S", SVN_XML_NAMESPACE, "send-all", "true",
+ NULL);
+#else
svn_xml_make_open_tag(&buf, scratch_pool, svn_xml_normal, "S:update-report",
"xmlns:S", SVN_XML_NAMESPACE,
NULL);
+ /* Subversion 1.8+ servers can be told to send properties for newly
+ added items inline even when doing a skelta response. */
+ make_simple_xml_tag(&buf, "S:include-props", "yes", scratch_pool);
+#endif
+
make_simple_xml_tag(&buf, "S:src-path", report->source, scratch_pool);
@@ -3076,9 +3212,18 @@ make_update_reporter(svn_ra_session_t *r
make_simple_xml_tag(&buf, "S:recursive", "no", scratch_pool);
}
- /* Subversion 1.8+ servers can be told to send properties for newly
- added items inline even when doing a skelta response. */
- make_simple_xml_tag(&buf, "S:include-props", "yes", scratch_pool);
+ /* When in 'send-all' mode, mod_dav_svn will assume that it should
+ calculate and transmit real text-deltas (instead of empty windows
+ that merely indicate "text is changed") unless it finds this
+ element. When not in 'send-all' mode, mod_dav_svn will never
+ send text-deltas at all.
+
+ NOTE: Do NOT count on servers actually obeying this, as some exist
+ which obey send-all, but do not check for this directive at all! */
+ if (! text_deltas)
+ {
+ make_simple_xml_tag(&buf, "S:text-deltas", "no", scratch_pool);
+ }
make_simple_xml_tag(&buf, "S:depth", svn_depth_to_word(depth), scratch_pool);
Modified: subversion/branches/in-repo-authz/subversion/libsvn_repos/fs-wrap.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_repos/fs-wrap.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_repos/fs-wrap.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_repos/fs-wrap.c Wed Dec 5 18:27:47 2012
@@ -743,6 +743,7 @@ svn_error_t *
svn_repos_fs_get_inherited_props(apr_array_header_t **inherited_props_p,
svn_fs_root_t *root,
const char *path,
+ const char *propname,
svn_repos_authz_func_t authz_read_func,
void *authz_read_baton,
apr_pool_t *result_pool,
@@ -757,7 +758,7 @@ svn_repos_fs_get_inherited_props(apr_arr
while (!(parent_path[0] == '/' && parent_path[1] == '\0'))
{
svn_boolean_t allowed = TRUE;
- apr_hash_t *parent_properties;
+ apr_hash_t *parent_properties = NULL;
svn_pool_clear(iterpool);
parent_path = svn_fspath__dirname(parent_path, scratch_pool);
@@ -767,8 +768,25 @@ svn_repos_fs_get_inherited_props(apr_arr
authz_read_baton, iterpool));
if (allowed)
{
- SVN_ERR(svn_fs_node_proplist(&parent_properties, root,
- parent_path, result_pool));
+ if (propname)
+ {
+ svn_string_t *propval;
+
+ SVN_ERR(svn_fs_node_prop(&propval, root, parent_path, propname,
+ result_pool));
+ if (propval)
+ {
+ parent_properties = apr_hash_make(result_pool);
+ apr_hash_set(parent_properties, propname,
+ APR_HASH_KEY_STRING, propval);
+ }
+ }
+ else
+ {
+ SVN_ERR(svn_fs_node_proplist(&parent_properties, root,
+ parent_path, result_pool));
+ }
+
if (parent_properties && apr_hash_count(parent_properties))
{
svn_prop_inherited_item_t *i_props =
Modified: subversion/branches/in-repo-authz/subversion/libsvn_subr/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_subr/cmdline.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_subr/cmdline.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_subr/cmdline.c Wed Dec 5 18:27:47 2012
@@ -52,6 +52,9 @@
#include "svn_xml.h"
#include "svn_base64.h"
#include "svn_config.h"
+#include "svn_sorts.h"
+#include "svn_props.h"
+#include "svn_subst.h"
#include "private/svn_cmdline_private.h"
#include "private/svn_utf_private.h"
@@ -758,3 +761,165 @@ svn_cmdline__apply_config_options(apr_ha
return SVN_NO_ERROR;
}
+
+/* Return a copy, allocated in POOL, of the next line of text from *STR
+ * up to and including a CR and/or an LF. Change *STR to point to the
+ * remainder of the string after the returned part. If there are no
+ * characters to be returned, return NULL; never return an empty string.
+ */
+static const char *
+next_line(const char **str, apr_pool_t *pool)
+{
+ const char *start = *str;
+ const char *p = *str;
+
+ /* n.b. Throughout this fn, we never read any character after a '\0'. */
+ /* Skip over all non-EOL characters, if any. */
+ while (*p != '\r' && *p != '\n' && *p != '\0')
+ p++;
+ /* Skip over \r\n or \n\r or \r or \n, if any. */
+ if (*p == '\r' || *p == '\n')
+ {
+ char c = *p++;
+
+ if ((c == '\r' && *p == '\n') || (c == '\n' && *p == '\r'))
+ p++;
+ }
+
+ /* Now p points after at most one '\n' and/or '\r'. */
+ *str = p;
+
+ if (p == start)
+ return NULL;
+
+ return svn_string_ncreate(start, p - start, pool)->data;
+}
+
+const char *
+svn_cmdline__indent_string(const char *str,
+ const char *indent,
+ apr_pool_t *pool)
+{
+ svn_stringbuf_t *out = svn_stringbuf_create_empty(pool);
+ const char *line;
+
+ while ((line = next_line(&str, pool)))
+ {
+ svn_stringbuf_appendcstr(out, indent);
+ svn_stringbuf_appendcstr(out, line);
+ }
+ return out->data;
+}
+
+svn_error_t *
+svn_cmdline__print_prop_hash(svn_stream_t *out,
+ apr_hash_t *prop_hash,
+ svn_boolean_t names_only,
+ apr_pool_t *pool)
+{
+ apr_array_header_t *sorted_props;
+ int i;
+
+ sorted_props = svn_sort__hash(prop_hash, svn_sort_compare_items_lexically,
+ pool);
+ for (i = 0; i < sorted_props->nelts; i++)
+ {
+ svn_sort__item_t item = APR_ARRAY_IDX(sorted_props, i, svn_sort__item_t);
+ const char *pname = item.key;
+ svn_string_t *propval = item.value;
+ const char *pname_stdout;
+
+ if (svn_prop_needs_translation(pname))
+ SVN_ERR(svn_subst_detranslate_string(&propval, propval,
+ TRUE, pool));
+
+ SVN_ERR(svn_cmdline_cstring_from_utf8(&pname_stdout, pname, pool));
+
+ if (out)
+ {
+ pname_stdout = apr_psprintf(pool, " %s\n", pname_stdout);
+ SVN_ERR(svn_subst_translate_cstring2(pname_stdout, &pname_stdout,
+ APR_EOL_STR, /* 'native' eol */
+ FALSE, /* no repair */
+ NULL, /* no keywords */
+ FALSE, /* no expansion */
+ pool));
+
+ SVN_ERR(svn_stream_puts(out, pname_stdout));
+ }
+ else
+ {
+ /* ### We leave these printfs for now, since if propval wasn't
+ translated above, we don't know anything about its encoding.
+ In fact, it might be binary data... */
+ printf(" %s\n", pname_stdout);
+ }
+
+ if (!names_only)
+ {
+ /* Add an extra newline to the value before indenting, so that
+ * every line of output has the indentation whether the value
+ * already ended in a newline or not. */
+ const char *newval = apr_psprintf(pool, "%s\n", propval->data);
+ const char *indented_newval = svn_cmdline__indent_string(newval,
+ " ",
+ pool);
+ if (out)
+ {
+ SVN_ERR(svn_stream_puts(out, indented_newval));
+ }
+ else
+ {
+ printf("%s", indented_newval);
+ }
+ }
+ }
+
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_cmdline__print_xml_prop_hash(svn_stringbuf_t **outstr,
+ apr_hash_t *prop_hash,
+ svn_boolean_t names_only,
+ svn_boolean_t inherited_props,
+ apr_pool_t *pool)
+{
+ apr_array_header_t *sorted_props;
+ int i;
+
+ if (*outstr == NULL)
+ *outstr = svn_stringbuf_create_empty(pool);
+
+ sorted_props = svn_sort__hash(prop_hash, svn_sort_compare_items_lexically,
+ pool);
+ for (i = 0; i < sorted_props->nelts; i++)
+ {
+ svn_sort__item_t item = APR_ARRAY_IDX(sorted_props, i, svn_sort__item_t);
+ const char *pname = item.key;
+ svn_string_t *propval = item.value;
+
+ if (names_only)
+ {
+ svn_xml_make_open_tag(
+ outstr, pool, svn_xml_self_closing,
+ inherited_props ? "inherited_property" : "property",
+ "name", pname, NULL);
+ }
+ else
+ {
+ const char *pname_out;
+
+ if (svn_prop_needs_translation(pname))
+ SVN_ERR(svn_subst_detranslate_string(&propval, propval,
+ TRUE, pool));
+
+ SVN_ERR(svn_cmdline_cstring_from_utf8(&pname_out, pname, pool));
+
+ svn_cmdline__print_xml_prop(outstr, pname_out, propval,
+ inherited_props, pool);
+ }
+ }
+
+ return SVN_NO_ERROR;
+}
Modified: subversion/branches/in-repo-authz/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_subr/sqlite.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_subr/sqlite.c Wed Dec 5 18:27:47 2012
@@ -43,14 +43,17 @@
#endif
#ifdef SVN_SQLITE_INLINE
-/* Include sqlite3 inline, making all symbols private. */
- #define SQLITE_API static
- #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
- #pragma GCC diagnostic ignored "-Wunused-function"
- #endif
- #include <sqlite3.c>
+/* Import the sqlite3 API vtable from sqlite3wrapper.c */
+# define SQLITE_OMIT_DEPRECATED
+# include <sqlite3ext.h>
+extern const sqlite3_api_routines *const svn_sqlite3__api_funcs;
+extern int (*const svn_sqlite3__api_initialize)(void);
+extern int (*const svn_sqlite3__api_config)(int, ...);
+# define sqlite3_api svn_sqlite3__api_funcs
+# define sqlite3_initialize svn_sqlite3__api_initialize
+# define sqlite3_config svn_sqlite3__api_config
#else
- #include <sqlite3.h>
+# include <sqlite3.h>
#endif
#if !SQLITE_VERSION_AT_LEAST(3,7,12)
Modified: subversion/branches/in-repo-authz/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_wc/adm_ops.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_wc/adm_ops.c Wed Dec 5 18:27:47 2012
@@ -1600,7 +1600,7 @@ revert_restore(svn_wc__db_t *db,
svn_boolean_t notify_required;
const apr_array_header_t *conflict_files;
svn_filesize_t recorded_size;
- apr_time_t recorded_mod_time;
+ apr_time_t recorded_time;
apr_finfo_t finfo;
#ifdef HAVE_SYMLINK
svn_boolean_t special;
@@ -1620,7 +1620,7 @@ revert_restore(svn_wc__db_t *db,
err = svn_wc__db_read_info(&status, &kind,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- &recorded_size, &recorded_mod_time, NULL,
+ &recorded_size, &recorded_time, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
db, local_abspath, scratch_pool, scratch_pool);
@@ -1651,7 +1651,7 @@ revert_restore(svn_wc__db_t *db,
status = svn_wc__db_status_normal;
kind = svn_kind_unknown;
recorded_size = SVN_INVALID_FILESIZE;
- recorded_mod_time = 0;
+ recorded_time = 0;
}
}
else if (err)
@@ -1774,9 +1774,9 @@ revert_restore(svn_wc__db_t *db,
ourselves. And we already have everything we need, because
we called stat ourselves. */
if (recorded_size != SVN_INVALID_FILESIZE
- && recorded_mod_time != 0
+ && recorded_time != 0
&& recorded_size == finfo.size
- && recorded_mod_time == finfo.mtime)
+ && recorded_time == finfo.mtime)
{
modified = FALSE;
}
Modified: subversion/branches/in-repo-authz/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_wc/conflicts.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_wc/conflicts.c Wed Dec 5 18:27:47 2012
@@ -2648,7 +2648,8 @@ conflict_status_walker(void *baton,
{
if (my_choice == svn_wc_conflict_choose_mine_conflict)
SVN_ERR(svn_wc__db_update_moved_away_conflict_victim(
- &work_items, local_abspath, cswb->db,
+ &work_items,
+ cswb->db, local_abspath,
cswb->notify_func, cswb->notify_baton,
cswb->cancel_func, cswb->cancel_baton,
scratch_pool, scratch_pool));
Modified: subversion/branches/in-repo-authz/subversion/libsvn_wc/crop.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_wc/crop.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_wc/crop.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_wc/crop.c Wed Dec 5 18:27:47 2012
@@ -196,8 +196,8 @@ svn_wc_exclude(svn_wc_context_t *wc_ctx,
svn_revnum_t revision;
const char *repos_relpath, *repos_root, *repos_uuid;
- SVN_ERR(svn_wc__check_wc_root(&is_root, NULL, &is_switched,
- wc_ctx->db, local_abspath, scratch_pool));
+ SVN_ERR(svn_wc__db_is_switched(&is_root, &is_switched, NULL,
+ wc_ctx->db, local_abspath, scratch_pool));
if (is_root)
{
Modified: subversion/branches/in-repo-authz/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_wc/deprecated.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_wc/deprecated.c Wed Dec 5 18:27:47 2012
@@ -3211,8 +3211,8 @@ svn_wc_is_wc_root2(svn_boolean_t *wc_roo
svn_error_t *err;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
- err = svn_wc__check_wc_root(&is_root, &kind, &is_switched,
- wc_ctx->db, local_abspath, scratch_pool);
+ err = svn_wc__db_is_switched(&is_root, &is_switched, &kind,
+ wc_ctx->db, local_abspath, scratch_pool);
if (err)
{
Modified: subversion/branches/in-repo-authz/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_wc/entries.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_wc/entries.c Wed Dec 5 18:27:47 2012
@@ -64,12 +64,12 @@ typedef struct db_node_t {
svn_revnum_t revision;
svn_node_kind_t kind; /* ### should switch to svn_kind_t */
svn_checksum_t *checksum;
- svn_filesize_t translated_size;
+ svn_filesize_t recorded_size;
svn_revnum_t changed_rev;
apr_time_t changed_date;
const char *changed_author;
svn_depth_t depth;
- apr_time_t last_mod_time;
+ apr_time_t recorded_time;
apr_hash_t *properties;
svn_boolean_t file_external;
} db_node_t;
@@ -1463,7 +1463,7 @@ insert_node(svn_sqlite__db_t *sdb,
node->changed_rev,
node->changed_date,
node->changed_author,
- node->last_mod_time));
+ node->recorded_time));
if (node->repos_relpath)
{
@@ -1513,8 +1513,8 @@ insert_node(svn_sqlite__db_t *sdb,
SVN_ERR(svn_sqlite__bind_properties(stmt, 15, node->properties,
scratch_pool));
- if (node->translated_size != SVN_INVALID_FILESIZE)
- SVN_ERR(svn_sqlite__bind_int64(stmt, 16, node->translated_size));
+ if (node->recorded_size != SVN_INVALID_FILESIZE)
+ SVN_ERR(svn_sqlite__bind_int64(stmt, 16, node->recorded_size));
if (node->file_external)
SVN_ERR(svn_sqlite__bind_int(stmt, 20, 1));
@@ -1905,8 +1905,8 @@ write_entry(struct write_baton **entry_n
base_node->op_depth = 0;
base_node->parent_relpath = parent_relpath;
base_node->revision = entry->revision;
- base_node->last_mod_time = entry->text_time;
- base_node->translated_size = entry->working_size;
+ base_node->recorded_time = entry->text_time;
+ base_node->recorded_size = entry->working_size;
if (entry->depth != svn_depth_exclude)
base_node->depth = entry->depth;
@@ -2103,12 +2103,12 @@ write_entry(struct write_baton **entry_n
below_working_node->checksum =
text_base_info->revert_base.sha1_checksum;
}
- below_working_node->translated_size = 0;
+ below_working_node->recorded_size = 0;
below_working_node->changed_rev = SVN_INVALID_REVNUM;
below_working_node->changed_date = 0;
below_working_node->changed_author = NULL;
below_working_node->depth = svn_depth_infinity;
- below_working_node->last_mod_time = 0;
+ below_working_node->recorded_time = 0;
below_working_node->properties = NULL;
SVN_ERR(insert_node(sdb, below_working_node, scratch_pool));
}
@@ -2120,8 +2120,8 @@ write_entry(struct write_baton **entry_n
working_node->local_relpath = local_relpath;
working_node->parent_relpath = parent_relpath;
working_node->changed_rev = SVN_INVALID_REVNUM;
- working_node->last_mod_time = entry->text_time;
- working_node->translated_size = entry->working_size;
+ working_node->recorded_time = entry->text_time;
+ working_node->recorded_size = entry->working_size;
if (entry->depth != svn_depth_exclude)
working_node->depth = entry->depth;