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/21 11:58:42 UTC
svn commit: r1424862 [1/3] - in /subversion/branches/tweak-build-take-two:
./ build/ subversion/include/ subversion/libsvn_client/
subversion/libsvn_ra/ subversion/libsvn_repos/ subversion/libsvn_subr/
subversion/libsvn_wc/ subversion/mod_authz_svn/ su...
Author: brane
Date: Fri Dec 21 10:58:41 2012
New Revision: 1424862
URL: http://svn.apache.org/viewvc?rev=1424862&view=rev
Log:
sync tweak-build-take-two branch with trunk@r1424860.
Modified:
subversion/branches/tweak-build-take-two/ (props changed)
subversion/branches/tweak-build-take-two/build/run_tests.py
subversion/branches/tweak-build-take-two/subversion/include/svn_cmdline.h
subversion/branches/tweak-build-take-two/subversion/include/svn_config.h
subversion/branches/tweak-build-take-two/subversion/include/svn_path.h
subversion/branches/tweak-build-take-two/subversion/include/svn_ra.h
subversion/branches/tweak-build-take-two/subversion/include/svn_repos.h
subversion/branches/tweak-build-take-two/subversion/include/svn_wc.h
subversion/branches/tweak-build-take-two/subversion/libsvn_client/add.c
subversion/branches/tweak-build-take-two/subversion/libsvn_client/client.h
subversion/branches/tweak-build-take-two/subversion/libsvn_client/cmdline.c
subversion/branches/tweak-build-take-two/subversion/libsvn_client/commit.c
subversion/branches/tweak-build-take-two/subversion/libsvn_client/deprecated.c
subversion/branches/tweak-build-take-two/subversion/libsvn_client/diff.c
subversion/branches/tweak-build-take-two/subversion/libsvn_client/externals.c
subversion/branches/tweak-build-take-two/subversion/libsvn_client/iprops.c
subversion/branches/tweak-build-take-two/subversion/libsvn_client/merge.c
subversion/branches/tweak-build-take-two/subversion/libsvn_client/patch.c
subversion/branches/tweak-build-take-two/subversion/libsvn_client/prop_commands.c
subversion/branches/tweak-build-take-two/subversion/libsvn_client/repos_diff.c
subversion/branches/tweak-build-take-two/subversion/libsvn_client/switch.c
subversion/branches/tweak-build-take-two/subversion/libsvn_client/update.c
subversion/branches/tweak-build-take-two/subversion/libsvn_ra/ra_loader.c
subversion/branches/tweak-build-take-two/subversion/libsvn_repos/authz.c
subversion/branches/tweak-build-take-two/subversion/libsvn_repos/deprecated.c
subversion/branches/tweak-build-take-two/subversion/libsvn_repos/repos.c
subversion/branches/tweak-build-take-two/subversion/libsvn_repos/repos.h
subversion/branches/tweak-build-take-two/subversion/libsvn_subr/cmdline.c
subversion/branches/tweak-build-take-two/subversion/libsvn_subr/config.c
subversion/branches/tweak-build-take-two/subversion/libsvn_subr/config_file.c
subversion/branches/tweak-build-take-two/subversion/libsvn_subr/config_impl.h
subversion/branches/tweak-build-take-two/subversion/libsvn_subr/path.c
subversion/branches/tweak-build-take-two/subversion/libsvn_wc/adm_ops.c
subversion/branches/tweak-build-take-two/subversion/libsvn_wc/deprecated.c
subversion/branches/tweak-build-take-two/subversion/libsvn_wc/props.c
subversion/branches/tweak-build-take-two/subversion/libsvn_wc/props.h
subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc-queries.sql
subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc_db.c
subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc_db.h
subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc_db_update_move.c
subversion/branches/tweak-build-take-two/subversion/mod_authz_svn/INSTALL
subversion/branches/tweak-build-take-two/subversion/mod_authz_svn/mod_authz_svn.c
subversion/branches/tweak-build-take-two/subversion/svn/svn.c
subversion/branches/tweak-build-take-two/subversion/svnrdump/svnrdump.c
subversion/branches/tweak-build-take-two/subversion/svnserve/serve.c
subversion/branches/tweak-build-take-two/subversion/svnserve/server.h
subversion/branches/tweak-build-take-two/subversion/svnserve/svnserve.8
subversion/branches/tweak-build-take-two/subversion/svnserve/svnserve.c
subversion/branches/tweak-build-take-two/subversion/svnserve/svnserve.conf.5
subversion/branches/tweak-build-take-two/subversion/svnsync/svnsync.c
subversion/branches/tweak-build-take-two/subversion/tests/cmdline/diff_tests.py
subversion/branches/tweak-build-take-two/subversion/tests/cmdline/merge_authz_tests.py
subversion/branches/tweak-build-take-two/subversion/tests/cmdline/merge_reintegrate_tests.py
subversion/branches/tweak-build-take-two/subversion/tests/cmdline/merge_tests.py
subversion/branches/tweak-build-take-two/subversion/tests/cmdline/merge_tree_conflict_tests.py
subversion/branches/tweak-build-take-two/subversion/tests/libsvn_repos/repos-test.c
subversion/branches/tweak-build-take-two/subversion/tests/libsvn_subr/config-test.c
subversion/branches/tweak-build-take-two/subversion/tests/libsvn_subr/path-test.c
subversion/branches/tweak-build-take-two/subversion/tests/libsvn_wc/conflict-data-test.c
subversion/branches/tweak-build-take-two/subversion/tests/libsvn_wc/utils.c
subversion/branches/tweak-build-take-two/tools/dist/release.py
subversion/branches/tweak-build-take-two/tools/server-side/fsfs-reorg.c
subversion/branches/tweak-build-take-two/tools/server-side/fsfs-stats.c
subversion/branches/tweak-build-take-two/tools/server-side/svnauthz-validate.c
subversion/branches/tweak-build-take-two/tools/server-side/svnpubsub/commit-hook.py
subversion/branches/tweak-build-take-two/tools/server-side/svnpubsub/irkerbridge.py
subversion/branches/tweak-build-take-two/tools/server-side/svnpubsub/rc.d/svnpubsub.freebsd
subversion/branches/tweak-build-take-two/tools/server-side/svnpubsub/svnpubsub/client.py
subversion/branches/tweak-build-take-two/tools/server-side/svnpubsub/svnpubsub/server.py
Propchange: subversion/branches/tweak-build-take-two/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1424288-1424860
Merged /subversion/branches/in-repo-authz:r1414342-1424779
Modified: subversion/branches/tweak-build-take-two/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/build/run_tests.py?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/build/run_tests.py (original)
+++ subversion/branches/tweak-build-take-two/build/run_tests.py Fri Dec 21 10:58:41 2012
@@ -565,11 +565,11 @@ class TestHarness:
progdir, progbase = os.path.split(prog)
if self.log:
# Using write here because we don't want even a trailing space
- test_info = '%s [%d/%d]' % (progbase, test_nr + 1, total_tests)
+ test_info = '[%02d/%d] %s' % (test_nr + 1, total_tests, progbase)
if self.list_tests:
sys.stdout.write('Listing tests in %s' % (test_info, ))
else:
- sys.stdout.write('Running tests in %s' % (test_info, ))
+ sys.stdout.write('%s' % (test_info, ))
sys.stdout.flush()
else:
# ### Hack for --log-to-stdout to work (but not print any dots).
@@ -589,7 +589,6 @@ class TestHarness:
line_length = _get_term_width()
dots_needed = line_length \
- len(test_info) \
- - len('Running tests in ') \
- len('success')
try:
os.chdir(progdir)
Modified: subversion/branches/tweak-build-take-two/subversion/include/svn_cmdline.h
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/include/svn_cmdline.h?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/include/svn_cmdline.h (original)
+++ subversion/branches/tweak-build-take-two/subversion/include/svn_cmdline.h Fri Dec 21 10:58:41 2012
@@ -381,10 +381,14 @@ svn_cmdline__getopt_init(apr_getopt_t **
const char *argv[],
apr_pool_t *pool);
-/* Determine whether standard input is associated with a terminal.
+/* Determine whether interactive mode should be enabled, based on whether
+ * the user passed the --non-interactive or --force-interactive options.
+ * If neither option was passed, interactivity is enabled if standard
+ * input is connected to a terminal device.
* @since New in 1.8. */
svn_boolean_t
-svn_cmdline__stdin_isatty(void);
+svn_cmdline__be_interactive(svn_boolean_t non_interactive,
+ svn_boolean_t force_interactive);
#ifdef __cplusplus
}
Modified: subversion/branches/tweak-build-take-two/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/include/svn_config.h?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/include/svn_config.h (original)
+++ subversion/branches/tweak-build-take-two/subversion/include/svn_config.h Fri Dec 21 10:58:41 2012
@@ -34,6 +34,7 @@
#include <apr_hash.h> /* for apr_hash_t */
#include "svn_types.h"
+#include "svn_io.h"
#ifdef __cplusplus
extern "C" {
@@ -247,6 +248,21 @@ svn_config_read(svn_config_t **cfgp,
svn_boolean_t must_exist,
apr_pool_t *pool);
+/** Read configuration data from @a stream into @a *cfgp, allocated in
+ * @a result_pool.
+ *
+ * If @a section_names_case_sensitive is TRUE, populate section name hashes
+ * case sensitively, except for the default SVN_CONFIG__DEFAULT_SECTION.
+ *
+ * @since New in 1.8.
+ */
+
+svn_error_t *
+svn_config_parse(svn_config_t **cfgp,
+ svn_stream_t *stream,
+ svn_boolean_t section_names_case_sensitive,
+ apr_pool_t *result_pool);
+
/** Like svn_config_read(), but merges the configuration data from @a file
* (a file or registry path) into @a *cfg, which was previously returned
* from svn_config_read(). This function invalidates all value
Modified: subversion/branches/tweak-build-take-two/subversion/include/svn_path.h
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/include/svn_path.h?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/include/svn_path.h (original)
+++ subversion/branches/tweak-build-take-two/subversion/include/svn_path.h Fri Dec 21 10:58:41 2012
@@ -670,6 +670,58 @@ svn_path_cstring_to_utf8(const char **pa
/** @} */
+
+/** Repository relative URLs
+ *
+ * @defgroup svn_path_repos_relative_urls Repository relative URLs
+ * @{
+ */
+
+
+/**
+ * Return true iff @a path is a repository-relative URL: specifically that
+ * it starts with the characters "^/"
+ *
+ * @a path is in UTF-8 encoding.
+ *
+ * Does not check whether @a path is a properly URI-encoded, canonical, or
+ * valid in any other way.
+ *
+ * @since New in 1.8.
+ */
+svn_boolean_t
+svn_path_is_repos_relative_url(const char *path);
+
+/**
+ * Set @a absolute_url to the absolute URL represented by @a relative_url
+ * relative to @a repos_root_url. @a absolute_url will be allocated in
+ * @a pool.
+ *
+ * @a absolute_url will end with a peg revision specifier if @a relative_url
+ * did.
+ *
+ * @a relative_url is in repository-relative syntax: "^/[REL-URL][@PEG]"
+ *
+ * @a repos_root_url is the absolute url of the repository root.
+ *
+ * All strings are in UTF-8 encoding.
+ *
+ * @a repos_root_url and @a relative_url do not have to be properly
+ * URI-encoded, canonical, or valid in any other way. The caller is expected
+ * to perform canonicalization on @a absolute_url after the call to the
+ * function.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_path_resolve_repos_relative_url(const char **absolute_url,
+ const char *relative_url,
+ const char *repos_root_url,
+ apr_pool_t *pool);
+
+
+/** @} */
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/tweak-build-take-two/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/include/svn_ra.h?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/include/svn_ra.h (original)
+++ subversion/branches/tweak-build-take-two/subversion/include/svn_ra.h Fri Dec 21 10:58:41 2012
@@ -1930,6 +1930,12 @@ svn_ra_get_deleted_rev(svn_ra_session_t
* inheritable properties are found, then set @a *inherited_props to
* an empty array.
*
+ * If @a use_relpath_keys is true, then the
+ * #svn_prop_inherited_item_t->path_or_url members of the
+ * #svn_prop_inherited_item_t * structures in @a *inherited_props are
+ * paths relative to the repository root URL (of the repository which
+ * @a ra_session is associated). Otherwise these members are URLs.
+ *
* Allocated @a *inherited_props in @a result_pool, use @a scratch_pool
* for temporary allocations.
*
@@ -1940,6 +1946,7 @@ svn_ra_get_inherited_props(svn_ra_sessio
apr_array_header_t **inherited_props,
const char *path,
svn_revnum_t revision,
+ svn_boolean_t use_relpath_keys,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
Modified: subversion/branches/tweak-build-take-two/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/include/svn_repos.h?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/include/svn_repos.h (original)
+++ subversion/branches/tweak-build-take-two/subversion/include/svn_repos.h Fri Dec 21 10:58:41 2012
@@ -3148,16 +3148,15 @@ svn_repos_get_fs_build_parser(const svn_
*/
typedef struct svn_authz_t svn_authz_t;
-/** Read authz configuration data from @a file (a file or registry
- * path) into @a *authz_p, allocated in @a pool.
- *
- * If @a file is not a valid authz rule file, then return
- * SVN_AUTHZ_INVALID_CONFIG. The contents of @a *authz_p is then
- * undefined. If @a must_exist is TRUE, a missing authz file is also
- * an error.
+/**
+ * Similar to svn_repos_authz_read2(), but without support for
+ * authz files stored in a Subversion repository (absolute or
+ * relative URLs) and without the @a repos_root argument.
*
* @since New in 1.3.
+ * @deprecated Provided for backward compatibility with the 1.7 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_repos_authz_read(svn_authz_t **authz_p,
const char *file,
@@ -3165,6 +3164,29 @@ svn_repos_authz_read(svn_authz_t **authz
apr_pool_t *pool);
/**
+ * Read authz configuration data from @a path (a file, repos relative
+ * url, an absolute file url, or a registry path) into @a *authz_p,
+ * allocated in @a pool.
+ *
+ * If @a path is not a valid authz rule file, then return
+ * SVN_AUTHZ_INVALID_CONFIG. The contents of @a *authz_p is then
+ * undefined. If @a must_exist is TRUE, a missing authz file is also
+ * an error.
+ *
+ * If @path is a repos relative URL then @a repos_root must be set to
+ * the root of the repository the authz configuration will be used with.
+ *
+ * @since New in 1.8
+ */
+svn_error_t *
+svn_repos_authz_read2(svn_authz_t **authz_p,
+ const char *path,
+ svn_boolean_t must_exist,
+ const char *repos_root,
+ apr_pool_t *pool);
+
+
+/**
* Check whether @a user can access @a path in the repository @a
* repos_name with the @a required_access. @a authz lists the ACLs to
* check against. Set @a *access_granted to indicate if the requested
Modified: subversion/branches/tweak-build-take-two/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/include/svn_wc.h?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/include/svn_wc.h (original)
+++ subversion/branches/tweak-build-take-two/subversion/include/svn_wc.h Fri Dec 21 10:58:41 2012
@@ -4528,7 +4528,16 @@ svn_wc_delete(const char *path,
/**
* Schedule the single node that exists on disk at @a local_abspath for
- * addition to the working copy. The added node will have no properties.
+ * addition to the working copy. The added node will have the properties
+ * provided in @a props, or none if that is NULL.
+ *
+ * Check and canonicalize the properties in the same way as
+ * svn_wc_prop_set4(). Return an error and don't add the node if the
+ * properties are not valid on this node. Unlike svn_wc_prop_set4()
+ * there is no option to skip some of the checks and canonicalizations.
+ *
+ * ### The error code on validity check failure should be specified, and
+ * preferably should be a single code.
*
* The versioned state of the parent path must be a modifiable directory,
* and the versioned state of @a local_abspath must be either nonexistent or
@@ -4537,14 +4546,28 @@ svn_wc_delete(const char *path,
* If @a local_abspath does not exist as file, directory or symlink, return
* #SVN_ERR_WC_PATH_NOT_FOUND.
*
- * This is a replacement for svn_wc_add4() case 2a.
+ * ### TODO: Split into add_dir, add_file, add_symlink?
*
- * ### TODO: Allow the caller to provide the node's properties?
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_wc_add_from_disk2(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ const apr_hash_t *props,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool);
+
+
+/**
+ * Similar to svn_wc_add4(), but gives the new node an empty set of properties.
*
- * ### TODO: Split into add_dir, add_file, add_symlink?
+ * This is a replacement for svn_wc_add4() case 2a.
*
* @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.7 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_wc_add_from_disk(svn_wc_context_t *wc_ctx,
const char *local_abspath,
Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/add.c?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/add.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/add.c Fri Dec 21 10:58:41 2012
@@ -275,7 +275,6 @@ add_file(const char *local_abspath,
apr_pool_t *pool)
{
apr_hash_t *properties;
- apr_hash_index_t *hi;
const char *mimetype;
svn_node_kind_t kind;
svn_boolean_t is_special;
@@ -283,10 +282,7 @@ add_file(const char *local_abspath,
/* Check to see if this is a special file. */
SVN_ERR(svn_io_check_special_path(local_abspath, &kind, &is_special, pool));
- /* Add the file */
- SVN_ERR(svn_wc_add_from_disk(ctx->wc_ctx, local_abspath,
- NULL, NULL, pool));
-
+ /* Determine the properties that the file should have */
if (is_special)
{
mimetype = NULL;
@@ -320,47 +316,9 @@ add_file(const char *local_abspath,
pool));
}
- /* loop through the hashtable and add the properties */
- for (hi = apr_hash_first(pool, properties);
- hi != NULL; hi = apr_hash_next(hi))
- {
- const char *pname = svn__apr_hash_index_key(hi);
- const svn_string_t *pval = svn__apr_hash_index_val(hi);
- svn_error_t *err;
-
- /* It's probably best to pass 0 for force, so that if
- the autoprops say to set some weird combination,
- we just error and let the user sort it out. */
- err = svn_wc_prop_set4(ctx->wc_ctx, local_abspath, pname, pval,
- svn_depth_empty, FALSE, NULL,
- NULL, NULL /* cancellation */,
- NULL, NULL /* notification */,
- pool);
- if (err)
- {
- /* Don't leave the job half-done. If we fail to set a property,
- * (try to) un-add the file. */
- return svn_error_compose_create(
- err,
- svn_wc_revert4(ctx->wc_ctx,
- local_abspath,
- svn_depth_empty,
- FALSE /* use_commit_times */,
- NULL /* changelists */,
- NULL, NULL, NULL, NULL,
- pool));
- }
- }
-
- /* Report the addition to the caller. */
- if (ctx->notify_func2 != NULL)
- {
- svn_wc_notify_t *notify = svn_wc_create_notify(local_abspath,
- svn_wc_notify_add, pool);
- notify->kind = svn_node_file;
- notify->mime_type = mimetype;
- (*ctx->notify_func2)(ctx->notify_baton2, notify, pool);
- }
+ /* Add the file */
+ SVN_ERR(svn_wc_add_from_disk2(ctx->wc_ctx, local_abspath, properties,
+ ctx->notify_func2, ctx->notify_baton2, pool));
return SVN_NO_ERROR;
}
@@ -425,9 +383,9 @@ add_dir_recursive(const char *dir_abspat
iterpool));
/* Add this directory to revision control. */
- err = svn_wc_add_from_disk(ctx->wc_ctx, dir_abspath,
- ctx->notify_func2, ctx->notify_baton2,
- iterpool);
+ err = svn_wc_add_from_disk2(ctx->wc_ctx, dir_abspath, NULL /*props*/,
+ ctx->notify_func2, ctx->notify_baton2,
+ iterpool);
if (err)
{
if (err->apr_err == SVN_ERR_ENTRY_EXISTS && force)
@@ -1009,9 +967,10 @@ add(const char *local_abspath,
parent_abspath, local_abspath);
SVN_ERR(svn_io_make_dir_recursively(parent_abspath, scratch_pool));
- SVN_ERR(svn_wc_add_from_disk(ctx->wc_ctx, parent_abspath,
- ctx->notify_func2, ctx->notify_baton2,
- scratch_pool));
+ SVN_ERR(svn_wc_add_from_disk2(ctx->wc_ctx, parent_abspath,
+ NULL /*props*/,
+ ctx->notify_func2, ctx->notify_baton2,
+ scratch_pool));
}
svn_pool_destroy(iterpool);
}
Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/client.h?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/client.h (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/client.h Fri Dec 21 10:58:41 2012
@@ -653,7 +653,10 @@ svn_client__list_internal(const char *pa
as any WC roots under LOCAL_ABSPATH (as limited by DEPTH) using
RA_SESSION. Store the results in *WCROOT_IPROPS, a hash mapping
const char * absolute working copy paths to depth-first ordered arrays
- of svn_prop_inherited_item_t * structures.
+ of svn_prop_inherited_item_t * structures. If WANT_RELPATH_KEYS is true,
+ then any svn_prop_inherited_item_t->path_or_url members returned in
+ *WCROOT_IPROPS are repository relative paths, otherwise these members are
+ URLs.
If LOCAL_ABSPATH has no base then do nothing.
@@ -668,6 +671,7 @@ svn_client__get_inheritable_props(apr_ha
const char *local_abspath,
svn_revnum_t revision,
svn_depth_t depth,
+ svn_boolean_t use_relpath_keys,
svn_ra_session_t *ra_session,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/cmdline.c?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/cmdline.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/cmdline.c Fri Dec 21 10:58:41 2012
@@ -43,51 +43,6 @@
#define DEFAULT_ARRAY_SIZE 5
-/* Return true iff ARG is a repository-relative URL: specifically that
- * it starts with the characters "^/".
- * ARG is in UTF-8 encoding.
- * Do not check whether ARG is properly URI-encoded, canonical, or valid
- * in any other way. */
-static svn_boolean_t
-arg_is_repos_relative_url(const char *arg)
-{
- return (0 == strncmp("^/", arg, 2));
-}
-
-/* Set *ABSOLUTE_URL to the absolute URL represented by RELATIVE_URL
- * relative to REPOS_ROOT_URL.
- * *ABSOLUTE_URL will end with a peg revision specifier if RELATIVE_URL did.
- * RELATIVE_URL is in repository-relative syntax:
- * "^/[REL-URL][@PEG]",
- * REPOS_ROOT_URL is the absolute URL of the repository root.
- * All strings are in UTF-8 encoding.
- * Allocate *ABSOLUTE_URL in POOL.
- *
- * REPOS_ROOT_URL and RELATIVE_URL do not have to be properly URI-encoded,
- * canonical, or valid in any other way. The caller is expected to perform
- * canonicalization on *ABSOLUTE_URL after the call to the function.
- */
-static svn_error_t *
-resolve_repos_relative_url(const char **absolute_url,
- const char *relative_url,
- const char *repos_root_url,
- apr_pool_t *pool)
-{
- if (! arg_is_repos_relative_url(relative_url))
- return svn_error_createf(SVN_ERR_BAD_URL, NULL,
- _("Improper relative URL '%s'"),
- relative_url);
-
- /* No assumptions are made about the canonicalization of the input
- * arguments, it is presumed that the output will be canonicalized after
- * this function, which will remove any duplicate path separator.
- */
- *absolute_url = apr_pstrcat(pool, repos_root_url, relative_url + 1,
- (char *)NULL);
-
- return SVN_NO_ERROR;
-}
-
/* Attempt to find the repository root url for TARGET, possibly using CTX for
* authentication. If one is found and *ROOT_URL is not NULL, then just check
@@ -189,7 +144,7 @@ svn_client_args_to_target_array2(apr_arr
SVN_ERR(svn_utf_cstring_to_utf8(&utf8_target,
raw_target, pool));
- if (arg_is_repos_relative_url(utf8_target))
+ if (svn_path_is_repos_relative_url(utf8_target))
rel_url_found = TRUE;
APR_ARRAY_PUSH(input_targets, const char *) = utf8_target;
@@ -204,7 +159,7 @@ svn_client_args_to_target_array2(apr_arr
const char *utf8_target = APR_ARRAY_IDX(known_targets,
i, const char *);
- if (arg_is_repos_relative_url(utf8_target))
+ if (svn_path_is_repos_relative_url(utf8_target))
rel_url_found = TRUE;
APR_ARRAY_PUSH(input_targets, const char *) = utf8_target;
@@ -220,7 +175,7 @@ svn_client_args_to_target_array2(apr_arr
/* Relative urls will be canonicalized when they are resolved later in
* the function
*/
- if (arg_is_repos_relative_url(utf8_target))
+ if (svn_path_is_repos_relative_url(utf8_target))
{
APR_ARRAY_PUSH(output_targets, const char *) = utf8_target;
}
@@ -367,7 +322,7 @@ svn_client_args_to_target_array2(apr_arr
const char *target = APR_ARRAY_IDX(output_targets, i,
const char *);
- if (arg_is_repos_relative_url(target))
+ if (svn_path_is_repos_relative_url(target))
{
const char *abs_target;
const char *true_target;
@@ -376,8 +331,9 @@ svn_client_args_to_target_array2(apr_arr
SVN_ERR(svn_opt__split_arg_at_peg_revision(&true_target, &peg_rev,
target, pool));
- SVN_ERR(resolve_repos_relative_url(&abs_target, true_target,
- root_url, pool));
+ SVN_ERR(svn_path_resolve_repos_relative_url(&abs_target,
+ true_target,
+ root_url, pool));
SVN_ERR(svn_opt__arg_canonicalize_url(&true_target, abs_target,
pool));
Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/commit.c?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/commit.c Fri Dec 21 10:58:41 2012
@@ -1028,25 +1028,3 @@ svn_client_commit6(const apr_array_heade
return svn_error_trace(reconcile_errors(cmt_err, unlock_err, bump_err,
pool));
}
-
-svn_error_t *
-svn_client_commit5(const apr_array_header_t *targets,
- svn_depth_t depth,
- svn_boolean_t keep_locks,
- svn_boolean_t keep_changelists,
- svn_boolean_t commit_as_operations,
- const apr_array_header_t *changelists,
- const apr_hash_t *revprop_table,
- svn_commit_callback2_t commit_callback,
- void *commit_baton,
- svn_client_ctx_t *ctx,
- apr_pool_t *pool)
-{
- return svn_client_commit6(targets, depth, keep_locks, keep_changelists,
- commit_as_operations,
- TRUE, /* include_file_externals */
- FALSE, /* include_dir_externals */
- changelists, revprop_table, commit_callback,
- commit_baton, ctx, pool);
-}
-
Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/deprecated.c?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/deprecated.c Fri Dec 21 10:58:41 2012
@@ -512,6 +512,26 @@ downgrade_commit_copied_notify_func(void
b->orig_notify_func2(b->orig_notify_baton2, notify, pool);
}
+svn_error_t *
+svn_client_commit5(const apr_array_header_t *targets,
+ svn_depth_t depth,
+ svn_boolean_t keep_locks,
+ svn_boolean_t keep_changelists,
+ svn_boolean_t commit_as_operations,
+ const apr_array_header_t *changelists,
+ const apr_hash_t *revprop_table,
+ svn_commit_callback2_t commit_callback,
+ void *commit_baton,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool)
+{
+ return svn_client_commit6(targets, depth, keep_locks, keep_changelists,
+ commit_as_operations,
+ FALSE, /* include_file_externals */
+ FALSE, /* include_dir_externals */
+ changelists, revprop_table, commit_callback,
+ commit_baton, ctx, pool);
+}
svn_error_t *
svn_client_commit4(svn_commit_info_t **commit_info_p,
Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/diff.c?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/diff.c Fri Dec 21 10:58:41 2012
@@ -613,6 +613,8 @@ static svn_error_t *
diff_props_changed(svn_wc_notify_state_t *state,
svn_boolean_t *tree_conflicted,
const char *path,
+ svn_revnum_t rev1,
+ svn_revnum_t rev2,
svn_boolean_t dir_was_added,
const apr_array_header_t *propchanges,
apr_hash_t *original_props,
@@ -642,8 +644,8 @@ diff_props_changed(svn_wc_notify_state_t
SVN_ERR(display_prop_diffs(props, original_props, path,
diff_cmd_baton->orig_path_1,
diff_cmd_baton->orig_path_2,
- diff_cmd_baton->revnum1,
- diff_cmd_baton->revnum2,
+ rev1,
+ rev2,
diff_cmd_baton->header_encoding,
diff_cmd_baton->outstream,
diff_cmd_baton->relative_to_dir,
@@ -686,6 +688,10 @@ diff_dir_props_changed(svn_wc_notify_sta
return svn_error_trace(diff_props_changed(state,
tree_conflicted, path,
+ /* ### These revs be filled
+ * ### with per node info */
+ diff_cmd_baton->revnum1,
+ diff_cmd_baton->revnum2,
dir_was_added,
propchanges,
original_props,
@@ -952,7 +958,7 @@ diff_file_changed(svn_wc_notify_state_t
SVN_INVALID_REVNUM, diff_cmd_baton));
if (prop_changes->nelts > 0)
SVN_ERR(diff_props_changed(prop_state, tree_conflicted,
- path, FALSE, prop_changes,
+ path, rev1, rev2, FALSE, prop_changes,
original_props, diff_cmd_baton, scratch_pool));
if (content_state)
*content_state = svn_wc_notify_state_unknown;
@@ -1025,7 +1031,8 @@ diff_file_added(svn_wc_notify_state_t *c
diff_cmd_baton));
if (prop_changes->nelts > 0)
SVN_ERR(diff_props_changed(prop_state, tree_conflicted,
- path, FALSE, prop_changes,
+ path, rev1, rev2,
+ FALSE, prop_changes,
original_props, diff_cmd_baton, scratch_pool));
if (content_state)
*content_state = svn_wc_notify_state_unknown;
@@ -1877,6 +1884,8 @@ arbitrary_diff_walker(void *baton, const
scratch_pool));
if (prop_changes->nelts > 0)
SVN_ERR(diff_props_changed(NULL, NULL, child_relpath,
+ b->callback_baton->revnum1,
+ b->callback_baton->revnum2,
b->recursing_within_added_subtree,
prop_changes, original_props,
b->callback_baton, scratch_pool));
Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/externals.c?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/externals.c Fri Dec 21 10:58:41 2012
@@ -484,7 +484,8 @@ switch_file_external(const char *local_a
ctx, subpool));
/* Get the external file's iprops. */
SVN_ERR(svn_ra_get_inherited_props(ra_session, &inherited_props, "",
- switch_loc->rev, subpool, subpool));
+ switch_loc->rev, TRUE,
+ subpool, subpool));
SVN_ERR(svn_ra_reparent(ra_session, svn_uri_dirname(url, subpool),
subpool));
Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/iprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/iprops.c?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/iprops.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/iprops.c Fri Dec 21 10:58:41 2012
@@ -41,10 +41,12 @@
/*** Code. ***/
/* Determine if LOCAL_ABSPATH needs an inherited property cache. If it does,
- then set *NEEDS_CACHE to TRUE, set it to FALSE otherwise. */
+ then set *NEEDS_CACHE to TRUE, set it to FALSE otherwise. All other args
+ are as per svn_client__get_inheritable_props(). */
static svn_error_t *
need_to_cache_iprops(svn_boolean_t *needs_cache,
const char *local_abspath,
+ svn_ra_session_t *ra_session,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
{
@@ -71,7 +73,25 @@ need_to_cache_iprops(svn_boolean_t *need
}
}
- *needs_cache = (is_wc_root || is_switched);
+ /* Starting assumption. */
+ *needs_cache = FALSE;
+
+ if (is_wc_root || is_switched)
+ {
+ const char *session_url;
+ const char *session_root_url;
+
+ /* Looks likely that we need an inherited properties cache...Unless
+ LOCAL_ABSPATH is a WC root that points to the repos root. Then it
+ doesn't need a cache because it has nowhere to inherit from. Check
+ for that case. */
+ SVN_ERR(svn_ra_get_session_url(ra_session, &session_url, scratch_pool));
+ SVN_ERR(svn_ra_get_repos_root2(ra_session, &session_root_url,
+ scratch_pool));
+
+ if (strcmp(session_root_url, session_url) != 0)
+ *needs_cache = TRUE;
+ }
return SVN_NO_ERROR;
}
@@ -81,6 +101,7 @@ svn_client__get_inheritable_props(apr_ha
const char *local_abspath,
svn_revnum_t revision,
svn_depth_t depth,
+ svn_boolean_t use_relpath_keys,
svn_ra_session_t *ra_session,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
@@ -111,7 +132,7 @@ svn_client__get_inheritable_props(apr_ha
svn_boolean_t needs_cached_iprops;
SVN_ERR(need_to_cache_iprops(&needs_cached_iprops, local_abspath,
- ctx, iterpool));
+ ra_session, ctx, iterpool));
if (needs_cached_iprops)
{
const char *target_abspath = apr_pstrdup(scratch_pool,
@@ -163,8 +184,8 @@ svn_client__get_inheritable_props(apr_ha
}
SVN_ERR(svn_ra_get_inherited_props(ra_session, &inherited_props,
- "", revision, result_pool,
- iterpool));
+ "", revision, use_relpath_keys,
+ result_pool, iterpool));
apr_hash_set(*wcroot_iprops,
apr_pstrdup(result_pool, child_abspath),
APR_HASH_KEY_STRING,
Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/merge.c?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/merge.c Fri Dec 21 10:58:41 2012
@@ -4429,13 +4429,24 @@ find_gaps_in_merge_source_history(svn_re
if (rangelist->nelts > 1) /* Copy */
{
+ const svn_merge_range_t *gap;
/* As mentioned above, multiple gaps *shouldn't* be possible. */
SVN_ERR_ASSERT(apr_hash_count(implicit_src_mergeinfo) == 1);
+ gap = APR_ARRAY_IDX(rangelist, rangelist->nelts - 1,
+ const svn_merge_range_t *);
+
*gap_start = MIN(source->loc1->rev, source->loc2->rev);
- *gap_end = (APR_ARRAY_IDX(rangelist,
- rangelist->nelts - 1,
- svn_merge_range_t *))->start;
+ *gap_end = gap->start;
+
+ /* ### Issue #4132:
+ ### This assertion triggers in merge_tests.py svnmucc_abuse_1()
+ ### when a node is replaced by an older copy of itself.
+
+ BH: I think we should review this and the 'rename' case to find
+ out which behavior we really want, and if we can really
+ determine what happened this way. */
+ SVN_ERR_ASSERT(*gap_start < *gap_end);
}
else if (apr_hash_count(implicit_src_mergeinfo) > 1) /* Rename */
{
Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/patch.c?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/patch.c Fri Dec 21 10:58:41 2012
@@ -2288,9 +2288,10 @@ create_missing_parents(patch_target_t *t
if (ctx->cancel_func)
SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
- SVN_ERR(svn_wc_add_from_disk(ctx->wc_ctx, local_abspath,
- ctx->notify_func2, ctx->notify_baton2,
- iterpool));
+ SVN_ERR(svn_wc_add_from_disk2(ctx->wc_ctx, local_abspath,
+ NULL /*props*/,
+ ctx->notify_func2, ctx->notify_baton2,
+ iterpool));
}
}
}
@@ -2402,8 +2403,9 @@ install_patched_target(patch_target_t *t
* Suppress notification, we'll do that later (and also
* during dry-run). Don't allow cancellation because
* we'd rather notify about what we did before aborting. */
- SVN_ERR(svn_wc_add_from_disk(ctx->wc_ctx, target->local_abspath,
- NULL, NULL, pool));
+ SVN_ERR(svn_wc_add_from_disk2(ctx->wc_ctx, target->local_abspath,
+ NULL /*props*/,
+ NULL, NULL, pool));
}
/* Restore the target's executable bit if necessary. */
@@ -2494,10 +2496,11 @@ install_patched_prop_targets(patch_targe
{
SVN_ERR(svn_io_file_create(target->local_abspath, "",
scratch_pool));
- SVN_ERR(svn_wc_add_from_disk(ctx->wc_ctx, target->local_abspath,
- /* suppress notification */
- NULL, NULL,
- iterpool));
+ SVN_ERR(svn_wc_add_from_disk2(ctx->wc_ctx, target->local_abspath,
+ NULL /*props*/,
+ /* suppress notification */
+ NULL, NULL,
+ iterpool));
}
target->added = TRUE;
}
Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/prop_commands.c?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/prop_commands.c Fri Dec 21 10:58:41 2012
@@ -639,7 +639,7 @@ remote_propget(apr_hash_t *props,
/* We will filter out all but PROPNAME later, making a final copy
in RESULT_POOL, so pass SCRATCH_POOL for both pools. */
SVN_ERR(svn_ra_get_inherited_props(ra_session, inherited_props,
- target_relative, revnum,
+ target_relative, revnum, FALSE,
scratch_pool, scratch_pool));
}
@@ -1125,7 +1125,7 @@ remote_proplist(const char *target_prefi
if (get_target_inherited_props)
SVN_ERR(svn_ra_get_inherited_props(ra_session, &inherited_props,
- target_relative, revnum,
+ target_relative, revnum, FALSE,
result_pool, scratch_pool));
else
inherited_props = NULL;
Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/repos_diff.c?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/repos_diff.c Fri Dec 21 10:58:41 2012
@@ -143,6 +143,9 @@ struct dir_baton {
/* A cache of any property changes (svn_prop_t) received for this dir. */
apr_array_header_t *propchanges;
+ /* Boolean indicating whether a node property was changed */
+ svn_boolean_t has_propchange;
+
/* The pool passed in by add_dir, open_dir, or open_root.
Also, the pool this dir baton is allocated in. */
apr_pool_t *pool;
@@ -199,6 +202,9 @@ struct file_baton {
/* A cache of any property changes (svn_prop_t) received for this file. */
apr_array_header_t *propchanges;
+ /* Boolean indicating whether a node property was changed */
+ svn_boolean_t has_propchange;
+
/* The pool passed in by add_file or open_file.
Also, the pool this file_baton is allocated in. */
apr_pool_t *pool;
@@ -230,7 +236,7 @@ make_dir_baton(const char *path,
dir_baton->skip_children = FALSE;
dir_baton->pool = dir_pool;
dir_baton->path = apr_pstrdup(dir_pool, path);
- dir_baton->propchanges = apr_array_make(pool, 1, sizeof(svn_prop_t));
+ dir_baton->propchanges = apr_array_make(pool, 8, sizeof(svn_prop_t));
dir_baton->base_revision = base_revision;
return dir_baton;
@@ -256,7 +262,7 @@ make_file_baton(const char *path,
file_baton->skip = FALSE;
file_baton->pool = file_pool;
file_baton->path = apr_pstrdup(file_pool, path);
- file_baton->propchanges = apr_array_make(pool, 1, sizeof(svn_prop_t));
+ file_baton->propchanges = apr_array_make(pool, 8, sizeof(svn_prop_t));
file_baton->base_revision = edit_baton->revision;
return file_baton;
@@ -271,29 +277,29 @@ make_file_baton(const char *path,
static void
get_file_mime_types(const char **mimetype1,
const char **mimetype2,
- struct file_baton *b)
+ struct file_baton *fb)
{
/* Defaults */
*mimetype1 = NULL;
*mimetype2 = NULL;
- if (b->pristine_props)
+ if (fb->pristine_props)
{
svn_string_t *pristine_val;
- pristine_val = apr_hash_get(b->pristine_props, SVN_PROP_MIME_TYPE,
+ pristine_val = apr_hash_get(fb->pristine_props, SVN_PROP_MIME_TYPE,
strlen(SVN_PROP_MIME_TYPE));
if (pristine_val)
*mimetype2 = *mimetype1 = pristine_val->data;
}
- if (b->propchanges)
+ if (fb->propchanges)
{
int i;
svn_prop_t *propchange;
- for (i = 0; i < b->propchanges->nelts; i++)
+ for (i = 0; i < fb->propchanges->nelts; i++)
{
- propchange = &APR_ARRAY_IDX(b->propchanges, i, svn_prop_t);
+ propchange = &APR_ARRAY_IDX(fb->propchanges, i, svn_prop_t);
if (strcmp(propchange->name, SVN_PROP_MIME_TYPE) == 0)
{
if (propchange->value)
@@ -305,22 +311,22 @@ get_file_mime_types(const char **mimetyp
}
-/* Get revision B->base_revision of the file described by B from the
- * repository, through B->edit_baton->ra_session.
+/* Get revision FB->base_revision of the file described by FB from the
+ * repository, through FB->edit_baton->ra_session.
*
* Unless PROPS_ONLY is true:
- * Set B->path_start_revision to the path of a new temporary file containing
+ * Set FB->path_start_revision to the path of a new temporary file containing
* the file's text.
- * Set B->start_md5_checksum to that file's MD-5 checksum.
- * Install a pool cleanup handler on B->pool to delete the file.
+ * Set FB->start_md5_checksum to that file's MD-5 checksum.
+ * Install a pool cleanup handler on FB->pool to delete the file.
*
* Always:
- * Set B->pristine_props to a new hash containing the file's properties.
+ * Set FB->pristine_props to a new hash containing the file's properties.
*
- * Allocate all results in B->pool.
+ * Allocate all results in FB->pool.
*/
static svn_error_t *
-get_file_from_ra(struct file_baton *b,
+get_file_from_ra(struct file_baton *fb,
svn_boolean_t props_only,
apr_pool_t *scratch_pool)
{
@@ -328,30 +334,30 @@ get_file_from_ra(struct file_baton *b,
{
svn_stream_t *fstream;
- SVN_ERR(svn_stream_open_unique(&fstream, &(b->path_start_revision), NULL,
- svn_io_file_del_on_pool_cleanup,
- b->pool, scratch_pool));
+ SVN_ERR(svn_stream_open_unique(&fstream, &(fb->path_start_revision),
+ NULL, svn_io_file_del_on_pool_cleanup,
+ fb->pool, scratch_pool));
- fstream = svn_stream_checksummed2(fstream, NULL, &b->start_md5_checksum,
+ fstream = svn_stream_checksummed2(fstream, NULL, &fb->start_md5_checksum,
svn_checksum_md5, TRUE, scratch_pool);
/* Retrieve the file and its properties */
- SVN_ERR(svn_ra_get_file(b->edit_baton->ra_session,
- b->path,
- b->base_revision,
+ SVN_ERR(svn_ra_get_file(fb->edit_baton->ra_session,
+ fb->path,
+ fb->base_revision,
fstream, NULL,
- &(b->pristine_props),
- b->pool));
+ &(fb->pristine_props),
+ fb->pool));
SVN_ERR(svn_stream_close(fstream));
}
else
{
- SVN_ERR(svn_ra_get_file(b->edit_baton->ra_session,
- b->path,
- b->base_revision,
+ SVN_ERR(svn_ra_get_file(fb->edit_baton->ra_session,
+ fb->path,
+ fb->base_revision,
NULL, NULL,
- &(b->pristine_props),
- b->pool));
+ &(fb->pristine_props),
+ fb->pool));
}
return SVN_NO_ERROR;
@@ -461,10 +467,10 @@ open_root(void *edit_baton,
void **root_baton)
{
struct edit_baton *eb = edit_baton;
- struct dir_baton *b = make_dir_baton("", NULL, eb, FALSE, base_revision,
- pool);
+ struct dir_baton *db = make_dir_baton("", NULL, eb, FALSE, base_revision,
+ pool);
- *root_baton = b;
+ *root_baton = db;
return SVN_NO_ERROR;
}
@@ -477,26 +483,26 @@ diff_deleted_file(svn_wc_notify_state_t
struct edit_baton *eb,
apr_pool_t *scratch_pool)
{
- struct file_baton *b = make_file_baton(path, FALSE, eb, scratch_pool);
-/* struct edit_baton *eb = b->edit_baton;*/
+ struct file_baton *fb = make_file_baton(path, FALSE, eb, scratch_pool);
+/* struct edit_baton *eb = fb->edit_baton;*/
const char *mimetype1, *mimetype2;
if (eb->cancel_func)
SVN_ERR(eb->cancel_func(eb->cancel_baton));
if (eb->text_deltas)
- SVN_ERR(get_file_from_ra(b, FALSE, scratch_pool));
+ SVN_ERR(get_file_from_ra(fb, FALSE, scratch_pool));
else
- SVN_ERR(get_empty_file(eb, &b->path_start_revision));
- SVN_ERR(get_empty_file(eb, &b->path_end_revision));
- get_file_mime_types(&mimetype1, &mimetype2, b);
+ SVN_ERR(get_empty_file(eb, &fb->path_start_revision));
+ SVN_ERR(get_empty_file(eb, &fb->path_end_revision));
+ get_file_mime_types(&mimetype1, &mimetype2, fb);
SVN_ERR(eb->diff_callbacks->file_deleted(state_p, tree_conflicted_p,
- b->path,
- b->path_start_revision,
- b->path_end_revision,
+ fb->path,
+ fb->path_start_revision,
+ fb->path_end_revision,
mimetype1, mimetype2,
- b->pristine_props,
+ fb->pristine_props,
eb->diff_cmd_baton,
scratch_pool));
return SVN_NO_ERROR;
@@ -654,26 +660,26 @@ add_directory(const char *path,
{
struct dir_baton *pb = parent_baton;
struct edit_baton *eb = pb->edit_baton;
- struct dir_baton *b;
+ struct dir_baton *db;
svn_wc_notify_state_t state;
/* ### TODO: support copyfrom? */
- b = make_dir_baton(path, pb, eb, TRUE, SVN_INVALID_REVNUM, pool);
- *child_baton = b;
+ db = make_dir_baton(path, pb, eb, TRUE, SVN_INVALID_REVNUM, pool);
+ *child_baton = db;
/* Skip *everything* within a newly tree-conflicted directory,
* and directories the children of which should be skipped. */
if (pb->skip || pb->tree_conflicted || pb->skip_children)
{
- b->skip = TRUE;
+ db->skip = TRUE;
return SVN_NO_ERROR;
}
SVN_ERR(eb->diff_callbacks->dir_added(
- &state, &b->tree_conflicted,
- &b->skip, &b->skip_children, b->path,
+ &state, &db->tree_conflicted,
+ &db->skip, &db->skip_children, db->path,
eb->target_revision, copyfrom_path, copyfrom_revision,
eb->diff_cmd_baton, pool));
@@ -692,12 +698,12 @@ add_directory(const char *path,
/* Find out if a pending delete notification for this path is
* still around. */
- dpn = apr_hash_get(eb->deleted_paths, b->path, APR_HASH_KEY_STRING);
+ dpn = apr_hash_get(eb->deleted_paths, db->path, APR_HASH_KEY_STRING);
if (dpn)
{
/* If any was found, we will handle the pending 'deleted path
* notification' (DPN) here. Remove it from the list. */
- apr_hash_set(eb->deleted_paths, b->path,
+ apr_hash_set(eb->deleted_paths, db->path,
APR_HASH_KEY_STRING, NULL);
/* the pending delete might be on a different node kind. */
@@ -707,7 +713,7 @@ add_directory(const char *path,
/* Determine what the notification (ACTION) should be.
* In case of a pending 'delete', this might become a 'replace'. */
- if (b->tree_conflicted)
+ if (db->tree_conflicted)
action = svn_wc_notify_tree_conflict;
else if (dpn)
{
@@ -723,7 +729,7 @@ add_directory(const char *path,
else
action = svn_wc_notify_update_add;
- notify = svn_wc_create_notify(b->path, action, pool);
+ notify = svn_wc_create_notify(db->path, action, pool);
notify->kind = kind;
notify->content_state = notify->prop_state = state;
(*eb->notify_func)(eb->notify_baton, notify, pool);
@@ -742,24 +748,24 @@ open_directory(const char *path,
{
struct dir_baton *pb = parent_baton;
struct edit_baton *eb = pb->edit_baton;
- struct dir_baton *b;
+ struct dir_baton *db;
- b = make_dir_baton(path, pb, pb->edit_baton, FALSE, base_revision, pool);
+ db = make_dir_baton(path, pb, eb, FALSE, base_revision, pool);
- *child_baton = b;
+ *child_baton = db;
/* Skip *everything* within a newly tree-conflicted directory
* and directories the children of which should be skipped. */
if (pb->skip || pb->tree_conflicted || pb->skip_children)
{
- b->skip = TRUE;
+ db->skip = TRUE;
return SVN_NO_ERROR;
}
SVN_ERR(eb->diff_callbacks->dir_opened(
- &b->tree_conflicted, &b->skip,
- &b->skip_children, b->path, base_revision,
- b->edit_baton->diff_cmd_baton, pool));
+ &db->tree_conflicted, &db->skip,
+ &db->skip_children, db->path, base_revision,
+ eb->diff_cmd_baton, pool));
return SVN_NO_ERROR;
}
@@ -775,22 +781,22 @@ add_file(const char *path,
void **file_baton)
{
struct dir_baton *pb = parent_baton;
- struct file_baton *b;
+ struct file_baton *fb;
/* ### TODO: support copyfrom? */
- b = make_file_baton(path, TRUE, pb->edit_baton, pool);
- *file_baton = b;
+ fb = make_file_baton(path, TRUE, pb->edit_baton, pool);
+ *file_baton = fb;
/* Skip *everything* within a newly tree-conflicted directory.
* and directories the children of which should be skipped. */
if (pb->skip || pb->tree_conflicted || pb->skip_children)
{
- b->skip = TRUE;
+ fb->skip = TRUE;
return SVN_NO_ERROR;
}
- b->pristine_props = pb->edit_baton->empty_hash;
+ fb->pristine_props = pb->edit_baton->empty_hash;
return SVN_NO_ERROR;
}
@@ -804,24 +810,24 @@ open_file(const char *path,
void **file_baton)
{
struct dir_baton *pb = parent_baton;
- struct file_baton *b;
+ struct file_baton *fb;
struct edit_baton *eb = pb->edit_baton;
- b = make_file_baton(path, FALSE, pb->edit_baton, pool);
- *file_baton = b;
+ fb = make_file_baton(path, FALSE, pb->edit_baton, pool);
+ *file_baton = fb;
/* Skip *everything* within a newly tree-conflicted directory
* and directories the children of which should be skipped. */
if (pb->skip || pb->tree_conflicted || pb->skip_children)
{
- b->skip = TRUE;
+ fb->skip = TRUE;
return SVN_NO_ERROR;
}
- b->base_revision = base_revision;
+ fb->base_revision = base_revision;
SVN_ERR(eb->diff_callbacks->file_opened(
- &b->tree_conflicted, &b->skip,
- b->path, base_revision, eb->diff_cmd_baton, pool));
+ &fb->tree_conflicted, &fb->skip,
+ fb->path, base_revision, eb->diff_cmd_baton, pool));
return SVN_NO_ERROR;
}
@@ -831,14 +837,15 @@ static svn_error_t *
window_handler(svn_txdelta_window_t *window,
void *window_baton)
{
- struct file_baton *b = window_baton;
+ struct file_baton *fb = window_baton;
- SVN_ERR(b->apply_handler(window, b->apply_baton));
+ SVN_ERR(fb->apply_handler(window, fb->apply_baton));
if (!window)
{
- b->result_md5_checksum = svn_checksum__from_digest_md5(b->result_digest,
- b->pool);
+ fb->result_md5_checksum = svn_checksum__from_digest_md5(
+ fb->result_digest,
+ fb->pool);
}
return SVN_NO_ERROR;
@@ -852,13 +859,13 @@ apply_textdelta(void *file_baton,
svn_txdelta_window_handler_t *handler,
void **handler_baton)
{
- struct file_baton *b = file_baton;
+ struct file_baton *fb = file_baton;
svn_stream_t *src_stream;
svn_stream_t *result_stream;
- apr_pool_t *scratch_pool = b->pool;
+ apr_pool_t *scratch_pool = fb->pool;
/* Skip *everything* within a newly tree-conflicted directory. */
- if (b->skip)
+ if (fb->skip)
{
*handler = svn_delta_noop_window_handler;
*handler_baton = NULL;
@@ -866,11 +873,11 @@ apply_textdelta(void *file_baton,
}
/* If we're not sending file text, then ignore any that we receive. */
- if (! b->edit_baton->text_deltas)
+ if (! fb->edit_baton->text_deltas)
{
/* Supply valid paths to indicate there is a text change. */
- SVN_ERR(get_empty_file(b->edit_baton, &b->path_start_revision));
- SVN_ERR(get_empty_file(b->edit_baton, &b->path_end_revision));
+ SVN_ERR(get_empty_file(fb->edit_baton, &fb->path_start_revision));
+ SVN_ERR(get_empty_file(fb->edit_baton, &fb->path_end_revision));
*handler = svn_delta_noop_window_handler;
*handler_baton = NULL;
@@ -879,12 +886,12 @@ apply_textdelta(void *file_baton,
}
/* We need the expected pristine file, so go get it */
- if (!b->added)
- SVN_ERR(get_file_from_ra(b, FALSE, scratch_pool));
+ if (!fb->added)
+ SVN_ERR(get_file_from_ra(fb, FALSE, scratch_pool));
else
- SVN_ERR(get_empty_file(b->edit_baton, &(b->path_start_revision)));
+ SVN_ERR(get_empty_file(fb->edit_baton, &(fb->path_start_revision)));
- SVN_ERR_ASSERT(b->path_start_revision != NULL);
+ SVN_ERR_ASSERT(fb->path_start_revision != NULL);
if (base_md5_digest != NULL)
{
@@ -893,30 +900,30 @@ apply_textdelta(void *file_baton,
SVN_ERR(svn_checksum_parse_hex(&base_md5_checksum, svn_checksum_md5,
base_md5_digest, scratch_pool));
- if (!svn_checksum_match(base_md5_checksum, b->start_md5_checksum))
+ if (!svn_checksum_match(base_md5_checksum, fb->start_md5_checksum))
return svn_error_trace(svn_checksum_mismatch_err(
base_md5_checksum,
- b->start_md5_checksum,
+ fb->start_md5_checksum,
scratch_pool,
_("Base checksum mismatch for '%s'"),
- b->path));
+ fb->path));
}
/* Open the file to be used as the base for second revision */
- SVN_ERR(svn_stream_open_readonly(&src_stream, b->path_start_revision,
+ SVN_ERR(svn_stream_open_readonly(&src_stream, fb->path_start_revision,
scratch_pool, scratch_pool));
/* Open the file that will become the second revision after applying the
text delta, it starts empty */
- SVN_ERR(svn_stream_open_unique(&result_stream, &b->path_end_revision, NULL,
+ SVN_ERR(svn_stream_open_unique(&result_stream, &fb->path_end_revision, NULL,
svn_io_file_del_on_pool_cleanup,
scratch_pool, scratch_pool));
svn_txdelta_apply(src_stream,
result_stream,
- b->result_digest,
- b->path, b->pool,
- &(b->apply_handler), &(b->apply_baton));
+ fb->result_digest,
+ fb->path, fb->pool,
+ &(fb->apply_handler), &(fb->apply_baton));
*handler = window_handler;
*handler_baton = file_baton;
@@ -939,20 +946,20 @@ close_file(void *file_baton,
const char *expected_md5_digest,
apr_pool_t *pool)
{
- struct file_baton *b = file_baton;
- struct edit_baton *eb = b->edit_baton;
+ struct file_baton *fb = file_baton;
+ struct edit_baton *eb = fb->edit_baton;
svn_wc_notify_state_t content_state = svn_wc_notify_state_unknown;
svn_wc_notify_state_t prop_state = svn_wc_notify_state_unknown;
apr_pool_t *scratch_pool;
/* Skip *everything* within a newly tree-conflicted directory. */
- if (b->skip)
+ if (fb->skip)
{
- svn_pool_destroy(b->pool);
+ svn_pool_destroy(fb->pool);
return SVN_NO_ERROR;
}
- scratch_pool = b->pool;
+ scratch_pool = fb->pool;
if (expected_md5_digest && eb->text_deltas)
{
@@ -961,57 +968,56 @@ close_file(void *file_baton,
SVN_ERR(svn_checksum_parse_hex(&expected_md5_checksum, svn_checksum_md5,
expected_md5_digest, scratch_pool));
- if (!svn_checksum_match(expected_md5_checksum, b->result_md5_checksum))
+ if (!svn_checksum_match(expected_md5_checksum, fb->result_md5_checksum))
return svn_error_trace(svn_checksum_mismatch_err(
expected_md5_checksum,
- b->result_md5_checksum,
+ fb->result_md5_checksum,
pool,
_("Checksum mismatch for '%s'"),
- b->path));
+ fb->path));
}
- if (!b->added && b->propchanges->nelts > 0)
+ if (fb->path_end_revision || fb->has_propchange)
{
- if (!b->pristine_props)
+ const char *mimetype1, *mimetype2;
+
+ if (!fb->added && !fb->pristine_props)
{
/* We didn't receive a text change, so we have no pristine props.
Retrieve just the props now. */
- SVN_ERR(get_file_from_ra(b, TRUE, scratch_pool));
+ SVN_ERR(get_file_from_ra(fb, TRUE, scratch_pool));
}
- remove_non_prop_changes(b->pristine_props, b->propchanges);
- }
+ if (fb->pristine_props)
+ remove_non_prop_changes(fb->pristine_props, fb->propchanges);
- if (b->path_end_revision || b->propchanges->nelts > 0)
- {
- const char *mimetype1, *mimetype2;
- get_file_mime_types(&mimetype1, &mimetype2, b);
+ get_file_mime_types(&mimetype1, &mimetype2, fb);
- if (b->added)
+ if (fb->added)
SVN_ERR(eb->diff_callbacks->file_added(
- &content_state, &prop_state, &b->tree_conflicted,
- b->path,
- b->path_end_revision ? b->path_start_revision : NULL,
- b->path_end_revision,
+ &content_state, &prop_state, &fb->tree_conflicted,
+ fb->path,
+ fb->path_end_revision ? fb->path_start_revision : NULL,
+ fb->path_end_revision,
0,
- b->edit_baton->target_revision,
+ eb->target_revision,
mimetype1, mimetype2,
NULL, SVN_INVALID_REVNUM,
- b->propchanges, b->pristine_props,
- b->edit_baton->diff_cmd_baton,
+ fb->propchanges, fb->pristine_props,
+ eb->diff_cmd_baton,
scratch_pool));
else
SVN_ERR(eb->diff_callbacks->file_changed(
&content_state, &prop_state,
- &b->tree_conflicted, b->path,
- b->path_end_revision ? b->path_start_revision : NULL,
- b->path_end_revision,
- b->edit_baton->revision,
- b->edit_baton->target_revision,
+ &fb->tree_conflicted, fb->path,
+ fb->path_end_revision ? fb->path_start_revision : NULL,
+ fb->path_end_revision,
+ eb->revision,
+ eb->target_revision,
mimetype1, mimetype2,
- b->propchanges, b->pristine_props,
- b->edit_baton->diff_cmd_baton,
+ fb->propchanges, fb->pristine_props,
+ eb->diff_cmd_baton,
scratch_pool));
}
@@ -1025,12 +1031,12 @@ close_file(void *file_baton,
/* Find out if a pending delete notification for this path is
* still around. */
- dpn = apr_hash_get(eb->deleted_paths, b->path, APR_HASH_KEY_STRING);
+ dpn = apr_hash_get(eb->deleted_paths, fb->path, APR_HASH_KEY_STRING);
if (dpn)
{
/* If any was found, we will handle the pending 'deleted path
* notification' (DPN) here. Remove it from the list. */
- apr_hash_set(eb->deleted_paths, b->path,
+ apr_hash_set(eb->deleted_paths, fb->path,
APR_HASH_KEY_STRING, NULL);
/* the pending delete might be on a different node kind. */
@@ -1040,12 +1046,12 @@ close_file(void *file_baton,
/* Determine what the notification (ACTION) should be.
* In case of a pending 'delete', this might become a 'replace'. */
- if (b->tree_conflicted)
+ if (fb->tree_conflicted)
action = svn_wc_notify_tree_conflict;
else if (dpn)
{
if (dpn->action == svn_wc_notify_update_delete
- && b->added)
+ && fb->added)
action = svn_wc_notify_update_replace;
else
/* Note: dpn->action might be svn_wc_notify_tree_conflict */
@@ -1054,19 +1060,19 @@ close_file(void *file_baton,
else if ((content_state == svn_wc_notify_state_missing)
|| (content_state == svn_wc_notify_state_obstructed))
action = svn_wc_notify_skip;
- else if (b->added)
+ else if (fb->added)
action = svn_wc_notify_update_add;
else
action = svn_wc_notify_update_update;
- notify = svn_wc_create_notify(b->path, action, scratch_pool);
+ notify = svn_wc_create_notify(fb->path, action, scratch_pool);
notify->kind = kind;
notify->content_state = content_state;
notify->prop_state = prop_state;
(*eb->notify_func)(eb->notify_baton, notify, scratch_pool);
}
- svn_pool_destroy(b->pool); /* Destroy file and scratch pool */
+ svn_pool_destroy(fb->pool); /* Destroy file and scratch pool */
return SVN_NO_ERROR;
}
@@ -1082,8 +1088,8 @@ static svn_error_t *
close_directory(void *dir_baton,
apr_pool_t *pool)
{
- struct dir_baton *b = dir_baton;
- struct edit_baton *eb = b->edit_baton;
+ struct dir_baton *db = dir_baton;
+ struct edit_baton *eb = db->edit_baton;
svn_wc_notify_state_t content_state = svn_wc_notify_state_unknown;
svn_wc_notify_state_t prop_state = svn_wc_notify_state_unknown;
svn_boolean_t skipped = FALSE;
@@ -1091,56 +1097,59 @@ close_directory(void *dir_baton,
apr_hash_t *pristine_props;
/* Skip *everything* within a newly tree-conflicted directory. */
- if (b->skip)
+ if (db->skip)
{
- svn_pool_destroy(b->pool);
+ svn_pool_destroy(db->pool);
return SVN_NO_ERROR;
}
- scratch_pool = b->pool;
+ scratch_pool = db->pool;
- if (b->added)
- {
- pristine_props = eb->empty_hash;
- }
- else
+ if (db->has_propchange)
{
- SVN_ERR(svn_ra_get_dir2(eb->ra_session, NULL, NULL, &pristine_props,
- b->path, b->base_revision, 0, scratch_pool));
- }
-
- if (b->propchanges->nelts > 0)
- {
- remove_non_prop_changes(pristine_props, b->propchanges);
- }
+ if (db->added)
+ {
+ pristine_props = eb->empty_hash;
+ }
+ else
+ {
+ SVN_ERR(svn_ra_get_dir2(eb->ra_session, NULL, NULL, &pristine_props,
+ db->path, db->base_revision, 0, scratch_pool));
+ }
- if (b->propchanges->nelts > 0)
- {
- svn_boolean_t tree_conflicted = FALSE;
- SVN_ERR(eb->diff_callbacks->dir_props_changed(
- &prop_state, &tree_conflicted,
- b->path, b->added,
- b->propchanges, pristine_props,
- b->edit_baton->diff_cmd_baton, scratch_pool));
- if (tree_conflicted)
- b->tree_conflicted = TRUE;
+ if (db->propchanges->nelts > 0)
+ {
+ remove_non_prop_changes(pristine_props, db->propchanges);
+ }
- if (prop_state == svn_wc_notify_state_obstructed
- || prop_state == svn_wc_notify_state_missing)
+ if (db->propchanges->nelts > 0)
{
- content_state = prop_state;
- skipped = TRUE;
+ svn_boolean_t tree_conflicted = FALSE;
+ SVN_ERR(eb->diff_callbacks->dir_props_changed(
+ &prop_state, &tree_conflicted,
+ db->path, db->added,
+ db->propchanges, pristine_props,
+ eb->diff_cmd_baton, scratch_pool));
+ if (tree_conflicted)
+ db->tree_conflicted = TRUE;
+
+ if (prop_state == svn_wc_notify_state_obstructed
+ || prop_state == svn_wc_notify_state_missing)
+ {
+ content_state = prop_state;
+ skipped = TRUE;
+ }
}
}
SVN_ERR(eb->diff_callbacks->dir_closed(NULL, NULL, NULL,
- b->path, b->added,
- b->edit_baton->diff_cmd_baton,
+ db->path, db->added,
+ eb->diff_cmd_baton,
scratch_pool));
/* Notify about any deleted paths within this directory that have not
* already been notified. */
- if (!skipped && !b->added && eb->notify_func)
+ if (!skipped && !db->added && eb->notify_func)
{
apr_hash_index_t *hi;
@@ -1151,11 +1160,11 @@ close_directory(void *dir_baton,
const char *deleted_path = svn__apr_hash_index_key(hi);
deleted_path_notify_t *dpn = svn__apr_hash_index_val(hi);
- /* Ignore paths which are not children of b->path. (There
+ /* Ignore paths which are not children of bb->path. (There
should be none due to editor ordering constraints, but
ra_serf drops the ball here -- see issue #3802 for
details.) */
- if (! svn_relpath_skip_ancestor(b->path, deleted_path))
+ if (! svn_relpath_skip_ancestor(db->path, deleted_path))
continue;
notify = svn_wc_create_notify(deleted_path, dpn->action, pool);
@@ -1170,19 +1179,19 @@ close_directory(void *dir_baton,
/* Notify about this directory itself (unless it was added, in which
* case the notification was done at that time). */
- if (!b->added && eb->notify_func)
+ if (!db->added && eb->notify_func)
{
svn_wc_notify_t *notify;
svn_wc_notify_action_t action;
- if (b->tree_conflicted)
+ if (db->tree_conflicted)
action = svn_wc_notify_tree_conflict;
else if (skipped)
action = svn_wc_notify_skip;
else
action = svn_wc_notify_update_update;
- notify = svn_wc_create_notify(b->path, action, pool);
+ notify = svn_wc_create_notify(db->path, action, pool);
notify->kind = svn_node_dir;
/* In case of a tree conflict during merge, the diff callback
@@ -1195,7 +1204,7 @@ close_directory(void *dir_baton,
(*eb->notify_func)(eb->notify_baton, notify, scratch_pool);
}
- svn_pool_destroy(b->pool); /* Destroy baton and scratch_pool */
+ svn_pool_destroy(db->pool); /* Destroy baton and scratch_pool */
return SVN_NO_ERROR;
}
@@ -1210,16 +1219,19 @@ change_file_prop(void *file_baton,
const svn_string_t *value,
apr_pool_t *pool)
{
- struct file_baton *b = file_baton;
+ struct file_baton *fb = file_baton;
svn_prop_t *propchange;
/* Skip *everything* within a newly tree-conflicted directory. */
- if (b->skip)
+ if (fb->skip)
return SVN_NO_ERROR;
- propchange = apr_array_push(b->propchanges);
- propchange->name = apr_pstrdup(b->pool, name);
- propchange->value = value ? svn_string_dup(value, b->pool) : NULL;
+ if (!fb->has_propchange && svn_property_kind2(name) == svn_prop_regular_kind)
+ fb->has_propchange = TRUE;
+
+ propchange = apr_array_push(fb->propchanges);
+ propchange->name = apr_pstrdup(fb->pool, name);
+ propchange->value = value ? svn_string_dup(value, fb->pool) : NULL;
return SVN_NO_ERROR;
}
@@ -1240,6 +1252,9 @@ change_dir_prop(void *dir_baton,
if (db->skip)
return SVN_NO_ERROR;
+ if (!db->has_propchange && svn_property_kind2(name) == svn_prop_regular_kind)
+ db->has_propchange = TRUE;
+
propchange = apr_array_push(db->propchanges);
propchange->name = apr_pstrdup(db->pool, name);
propchange->value = value ? svn_string_dup(value, db->pool) : NULL;
Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/switch.c?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/switch.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/switch.c Fri Dec 21 10:58:41 2012
@@ -267,7 +267,7 @@ switch_internal(svn_revnum_t *result_rev
if (needs_iprop_cache)
{
SVN_ERR(svn_ra_get_inherited_props(ra_session, &inherited_props,
- "", switch_loc->rev, pool,
+ "", switch_loc->rev, TRUE, pool,
pool));
apr_hash_set(wcroot_iprops, local_abspath, APR_HASH_KEY_STRING,
inherited_props);
Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/update.c?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/update.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/update.c Fri Dec 21 10:58:41 2012
@@ -377,8 +377,8 @@ update_internal(svn_revnum_t *result_rev
dfb.anchor_url = anchor_loc->url;
err = svn_client__get_inheritable_props(&wcroot_iprops, local_abspath,
- revnum, depth, ra_session, ctx,
- pool, pool);
+ revnum, depth, TRUE, ra_session,
+ ctx, pool, pool);
/* We might be trying to update to a non-existant path-rev. */
if (err)
Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_ra/ra_loader.c?rev=1424862&r1=1424861&r2=1424862&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_ra/ra_loader.c Fri Dec 21 10:58:41 2012
@@ -1298,6 +1298,7 @@ svn_ra_get_inherited_props(svn_ra_sessio
apr_array_header_t **iprops,
const char *path,
svn_revnum_t revision,
+ svn_boolean_t use_relpath_keys,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -1323,6 +1324,23 @@ svn_ra_get_inherited_props(svn_ra_sessio
result_pool, scratch_pool));
}
+ if (use_relpath_keys && (*iprops)->nelts)
+ {
+ const char *repos_root_url;
+ int i;
+
+ SVN_ERR(svn_ra_get_repos_root2(session, &repos_root_url, scratch_pool));
+ for (i = 0; i < (*iprops)->nelts; i++)
+ {
+ svn_prop_inherited_item_t *elt =
+ APR_ARRAY_IDX(*iprops, i, svn_prop_inherited_item_t *);
+ elt->path_or_url =
+ svn_dirent_skip_ancestor(repos_root_url, elt->path_or_url);
+ elt->path_or_url = svn_path_uri_decode(elt->path_or_url,
+ result_pool);
+ }
+ }
+
return SVN_NO_ERROR;
}