You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/10/11 21:08:25 UTC
svn commit: r1182027 [1/2] - in /subversion/branches/svn_mutex: ./
build/ac-macros/ contrib/hook-scripts/ contrib/server-side/fsfsfixer/fixer/
subversion/include/ subversion/include/private/ subversion/libsvn_client/
subversion/libsvn_fs_fs/ subversion...
Author: stefan2
Date: Tue Oct 11 19:08:23 2011
New Revision: 1182027
URL: http://svn.apache.org/viewvc?rev=1182027&view=rev
Log:
On svn_mutex branch: Bring up-to-date with trunk.
Removed:
subversion/branches/svn_mutex/tools/buildbot/slaves/ubuntu-x64/mount-ramdrive.c
subversion/branches/svn_mutex/tools/buildbot/slaves/ubuntu-x64/unmount-ramdrive.c
Modified:
subversion/branches/svn_mutex/ (props changed)
subversion/branches/svn_mutex/INSTALL
subversion/branches/svn_mutex/build/ac-macros/sqlite.m4
subversion/branches/svn_mutex/contrib/hook-scripts/hook_toolbox.py (props changed)
subversion/branches/svn_mutex/contrib/server-side/fsfsfixer/fixer/fixer_config.py (props changed)
subversion/branches/svn_mutex/subversion/include/private/svn_adler32.h (props changed)
subversion/branches/svn_mutex/subversion/include/private/svn_io_private.h (props changed)
subversion/branches/svn_mutex/subversion/include/private/svn_string_private.h (props changed)
subversion/branches/svn_mutex/subversion/include/private/svn_temp_serializer.h (props changed)
subversion/branches/svn_mutex/subversion/include/svn_dav.h
subversion/branches/svn_mutex/subversion/include/svn_error_codes.h
subversion/branches/svn_mutex/subversion/include/svn_ra.h
subversion/branches/svn_mutex/subversion/include/svn_ra_svn.h
subversion/branches/svn_mutex/subversion/libsvn_client/client.h
subversion/branches/svn_mutex/subversion/libsvn_client/copy.c
subversion/branches/svn_mutex/subversion/libsvn_client/merge.c
subversion/branches/svn_mutex/subversion/libsvn_client/mergeinfo.c
subversion/branches/svn_mutex/subversion/libsvn_client/mergeinfo.h
subversion/branches/svn_mutex/subversion/libsvn_fs_fs/fs_fs.c
subversion/branches/svn_mutex/subversion/libsvn_fs_fs/structure
subversion/branches/svn_mutex/subversion/libsvn_fs_fs/temp_serializer.c (props changed)
subversion/branches/svn_mutex/subversion/libsvn_fs_fs/temp_serializer.h (props changed)
subversion/branches/svn_mutex/subversion/libsvn_ra/deprecated.c
subversion/branches/svn_mutex/subversion/libsvn_ra/ra_loader.c
subversion/branches/svn_mutex/subversion/libsvn_ra/ra_loader.h
subversion/branches/svn_mutex/subversion/libsvn_ra_local/ra_plugin.c
subversion/branches/svn_mutex/subversion/libsvn_ra_neon/fetch.c
subversion/branches/svn_mutex/subversion/libsvn_ra_neon/mergeinfo.c
subversion/branches/svn_mutex/subversion/libsvn_ra_neon/options.c
subversion/branches/svn_mutex/subversion/libsvn_ra_neon/ra_neon.h
subversion/branches/svn_mutex/subversion/libsvn_ra_serf/mergeinfo.c
subversion/branches/svn_mutex/subversion/libsvn_ra_serf/options.c
subversion/branches/svn_mutex/subversion/libsvn_ra_serf/ra_serf.h
subversion/branches/svn_mutex/subversion/libsvn_ra_serf/update.c
subversion/branches/svn_mutex/subversion/libsvn_ra_svn/client.c
subversion/branches/svn_mutex/subversion/libsvn_ra_svn/protocol
subversion/branches/svn_mutex/subversion/libsvn_subr/adler32.c (props changed)
subversion/branches/svn_mutex/subversion/libsvn_subr/svn_temp_serializer.c (props changed)
subversion/branches/svn_mutex/subversion/libsvn_wc/adm_crawler.c
subversion/branches/svn_mutex/subversion/libsvn_wc/update_editor.c
subversion/branches/svn_mutex/subversion/libsvn_wc/wc-queries.sql
subversion/branches/svn_mutex/subversion/libsvn_wc/wc_db.c
subversion/branches/svn_mutex/subversion/libsvn_wc/workqueue.c
subversion/branches/svn_mutex/subversion/mod_dav_svn/reports/mergeinfo.c
subversion/branches/svn_mutex/subversion/mod_dav_svn/version.c
subversion/branches/svn_mutex/subversion/svnserve/serve.c
subversion/branches/svn_mutex/subversion/tests/cmdline/redirect_tests.py (props changed)
subversion/branches/svn_mutex/subversion/tests/cmdline/svntest/err.py (props changed)
subversion/branches/svn_mutex/subversion/tests/cmdline/svntest/objects.py (props changed)
subversion/branches/svn_mutex/subversion/tests/cmdline/upgrade_tests.py
subversion/branches/svn_mutex/subversion/tests/manual/tree-conflicts-add-vs-add.py (props changed)
subversion/branches/svn_mutex/tools/buildbot/master/Feeder.py (props changed)
subversion/branches/svn_mutex/tools/buildbot/master/SVNMailNotifier.py (props changed)
subversion/branches/svn_mutex/tools/buildbot/master/private-sample.py (props changed)
subversion/branches/svn_mutex/tools/buildbot/slaves/ubuntu-x64/svncheck.sh
subversion/branches/svn_mutex/tools/buildbot/slaves/ubuntu-x64/svnclean.sh
subversion/branches/svn_mutex/tools/dev/benchmarks/suite1/benchmark.py (props changed)
subversion/branches/svn_mutex/tools/dev/gen-py-errors.py (props changed)
subversion/branches/svn_mutex/tools/dev/gen_junit_report.py (props changed)
subversion/branches/svn_mutex/tools/dev/log_revnum_change_asf.py (props changed)
subversion/branches/svn_mutex/tools/dev/mklog.py (props changed)
subversion/branches/svn_mutex/tools/dev/wc-format.py (props changed)
subversion/branches/svn_mutex/tools/dev/wc-ng/bump-to-19.py (props changed)
subversion/branches/svn_mutex/tools/dev/wc-ng/count-progress.py (props changed)
subversion/branches/svn_mutex/tools/dev/wc-ng/graph-data.py (props changed)
subversion/branches/svn_mutex/tools/dev/wc-ng/populate-pristine.py (props changed)
subversion/branches/svn_mutex/tools/dist/release.py (props changed)
subversion/branches/svn_mutex/tools/hook-scripts/validate-extensions.py (props changed)
subversion/branches/svn_mutex/win-tests.py
Propchange: subversion/branches/svn_mutex/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 11 19:08:23 2011
@@ -52,3 +52,4 @@
/subversion/branches/tree-conflicts:868291-873154
/subversion/branches/tree-conflicts-notify:873926-874008
/subversion/branches/uris-as-urls:1060426-1064427
+/subversion/trunk:1141684-1142212
Modified: subversion/branches/svn_mutex/INSTALL
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/INSTALL?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/INSTALL (original)
+++ subversion/branches/svn_mutex/INSTALL Tue Oct 11 19:08:23 2011
@@ -225,19 +225,10 @@ I. INTRODUCTION
| expected to either have the APR libraries already installed |
| on their system, or to be capable of fetching them easily. |
| |
- | For convenience, we still offer a "deps" distribution too, |
- | containing APR, APR-UTIL, and various other dependencies. |
- | The deps dist used to contain APR[-UTIL] 0.9.x, but as of |
- | 1.5.0 we are finally upgrading it to APR[-UTIL] 1.X. This |
- | is because we think by now there are very few systems that |
- | will have binary compatibility issues, and of those, few are |
- | likely to build using the "deps" dist. |
- | |
| Note that it's *perfectly* safe to use APR 1.X from the |
| beginning. In fact, we recommend it. If you're building |
| Subversion for the first time, there's no compatibility |
- | issue to worry about, so grab the latest version of APR (or |
- | just use our deps dist). |
+ | issue to worry about, so grab the latest version of APR.
| |
| If you already have a Subversion installation using APR |
| 0.9.x, it's still possible to move to APR 1.X safely. Just |
Modified: subversion/branches/svn_mutex/build/ac-macros/sqlite.m4
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/build/ac-macros/sqlite.m4?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/build/ac-macros/sqlite.m4 (original)
+++ subversion/branches/svn_mutex/build/ac-macros/sqlite.m4 Tue Oct 11 19:08:23 2011
@@ -244,7 +244,6 @@ AC_DEFUN(SVN_DOWNLOAD_SQLITE,
echo "unpack the archive using tar/gunzip and copy sqlite3.c from the"
echo "resulting directory to:"
echo "$abs_srcdir/sqlite-amalgamation/sqlite3.c"
- echo "This file also ships as part of the subversion-deps distribution."
echo ""
AC_MSG_ERROR([Subversion requires SQLite])
])
Propchange: subversion/branches/svn_mutex/contrib/hook-scripts/hook_toolbox.py
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: subversion/branches/svn_mutex/contrib/server-side/fsfsfixer/fixer/fixer_config.py
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: subversion/branches/svn_mutex/subversion/include/private/svn_adler32.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 11 19:08:23 2011
@@ -43,3 +43,4 @@
/subversion/branches/tc_url_rev/subversion/libsvn_diff/diff.h:874351-874483
/subversion/branches/tree-conflicts/subversion/libsvn_diff/diff.h:868291-873154
/subversion/branches/tree-conflicts-notify/subversion/libsvn_diff/diff.h:873926-874008
+/subversion/trunk/subversion/include/private/svn_adler32.h:1141684-1142212
Propchange: subversion/branches/svn_mutex/subversion/include/private/svn_io_private.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: subversion/branches/svn_mutex/subversion/include/private/svn_string_private.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 11 19:08:23 2011
@@ -52,3 +52,4 @@
/subversion/branches/tree-conflicts/subversion/include/svn_string.h:868291-873154
/subversion/branches/tree-conflicts-notify/subversion/include/svn_string.h:873926-874008
/subversion/branches/uris-as-urls/subversion/include/svn_string.h:1060426-1064427
+/subversion/trunk/subversion/include/private/svn_string_private.h:1141684-1142212
Propchange: subversion/branches/svn_mutex/subversion/include/private/svn_temp_serializer.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 11 19:08:23 2011
@@ -1 +1 @@
-/subversion/trunk/subversion/include/private/svn_temp_serializer.h:1067687-1072301
+/subversion/trunk/subversion/include/private/svn_temp_serializer.h:1067687-1072301,1141684-1142212
Modified: subversion/branches/svn_mutex/subversion/include/svn_dav.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/include/svn_dav.h?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/include/svn_dav.h (original)
+++ subversion/branches/svn_mutex/subversion/include/svn_dav.h Tue Oct 11 19:08:23 2011
@@ -266,6 +266,11 @@ extern "C" {
*/
#define SVN_DAV_NS_DAV_SVN_MERGEINFO SVN_DAV_PROP_NS_DAV "svn/mergeinfo"
+/** Similar SVN_DAV_NS_DAV_SVN_MERGEINFO but indicates that the server
+ * knows how to handle requests to validate inherited mergeinfo. */
+#define SVN_DAV_NS_DAV_SVN_MERGEINFO_VALIDATION \
+ SVN_DAV_PROP_NS_DAV "svn/mergeinfo-validation"
+
/** Presence of this in a DAV header in an OPTIONS response indicates
* that the transmitter (in this case, the server) knows how to send
* custom revprops in log responses. */
Modified: subversion/branches/svn_mutex/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/include/svn_error_codes.h?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/svn_mutex/subversion/include/svn_error_codes.h Tue Oct 11 19:08:23 2011
@@ -522,7 +522,8 @@ SVN_ERROR_START
/** @since New in 1.7. */
SVN_ERRDEF(SVN_ERR_WC_CLEANUP_REQUIRED,
SVN_ERR_WC_CATEGORY_START + 37,
- "Previous operation was interrupted; run 'svn cleanup'")
+ "Previous operation has not finished; "
+ "run 'cleanup' if it was interrupted")
/** @since New in 1.7. */
SVN_ERRDEF(SVN_ERR_WC_INVALID_OPERATION_DEPTH,
Modified: subversion/branches/svn_mutex/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/include/svn_ra.h?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/include/svn_ra.h (original)
+++ subversion/branches/svn_mutex/subversion/include/svn_ra.h Tue Oct 11 19:08:23 2011
@@ -1017,13 +1017,11 @@ svn_ra_get_dir(svn_ra_session_t *session
* @a inherit indicates whether explicit, explicit or inherited, or
* only inherited mergeinfo for @a paths is retrieved.
*
- * If the mergeinfo for any path is inherited and
- * @a *validate_inherited_mergeinfo is TRUE, then request that the server
+ * If server supports the #SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO
+ * capability, the mergeinfo for any path is inherited, and
+ * @a validate_inherited_mergeinfo is TRUE, then request that the server
* validate the mergeinfo in @a *catalog, so it contains only merge source
- * path-revisions that actually exist in repository. If validation is
- * requested and the server supports it, then set
- * @a *validate_inherited_mergeinfo to TRUE on return. Set it to FALSE
- * in all other cases.
+ * path-revisions that actually exist in repository.
*
* If @a include_descendants is TRUE, then additionally return the
* mergeinfo for any descendant of any element of @a paths which has
@@ -1049,7 +1047,7 @@ svn_ra_get_mergeinfo2(svn_ra_session_t *
const apr_array_header_t *paths,
svn_revnum_t revision,
svn_mergeinfo_inheritance_t inherit,
- svn_boolean_t *validate_inherited_mergeinfo,
+ svn_boolean_t validate_inherited_mergeinfo,
svn_boolean_t include_descendants,
apr_pool_t *pool);
@@ -1982,6 +1980,15 @@ svn_ra_has_capability(svn_ra_session_t *
*/
#define SVN_RA_CAPABILITY_ATOMIC_REVPROPS "atomic-revprops"
+/**
+ * The capability of validating inherited mergeinfo in
+ * svn_ra_get_mergeinfo2().
+ *
+ * @since New in 1.7.
+ */
+#define SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO \
+ "validate-inherited-mergeinfo"
+
/* *** PLEASE READ THIS IF YOU ADD A NEW CAPABILITY ***
*
* RA layers generally fetch all capabilities when asked about any
Modified: subversion/branches/svn_mutex/subversion/include/svn_ra_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/include/svn_ra_svn.h?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/include/svn_ra_svn.h (original)
+++ subversion/branches/svn_mutex/subversion/include/svn_ra_svn.h Tue Oct 11 19:08:23 2011
@@ -54,6 +54,9 @@ extern "C" {
#define SVN_RA_SVN_CAP_COMMIT_REVPROPS "commit-revprops"
/* maps to SVN_RA_CAPABILITY_MERGEINFO: */
#define SVN_RA_SVN_CAP_MERGEINFO "mergeinfo"
+/* maps to SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO: */
+#define SVN_RA_SVN_CAP_VALIDATE_INHERITED_MERGEINFO \
+ "validate-inherited-mergeinfo"
/* maps to SVN_RA_CAPABILITY_DEPTH: */
#define SVN_RA_SVN_CAP_DEPTH "depth"
/* maps to SVN_RA_CAPABILITY_LOG_REVPROPS */
Modified: subversion/branches/svn_mutex/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_client/client.h?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_client/client.h (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_client/client.h Tue Oct 11 19:08:23 2011
@@ -292,7 +292,7 @@ svn_client__default_walker_error_handler
in *CORRECTED_URL. (This function mirrors svn_ra_open4(), which
see, regarding the interpretation and handling of these two parameters.)
- The root of the session is specified by BASE_URL and BASE_DIR.
+ The root of the session is specified by BASE_URL and BASE_DIR_ABSPATH.
Additional control parameters:
@@ -758,7 +758,7 @@ typedef svn_error_t *(*svn_client__check
svn_revnum_t revision,
apr_pool_t *scratch_pool);
-/* Recursively crawl a set of working copy paths (DIR_ABSPATH + each
+/* Recursively crawl a set of working copy paths (BASE_DIR_ABSPATH + each
item in the TARGETS array) looking for commit candidates, locking
working copy directories as the crawl progresses. For each
candidate found:
Modified: subversion/branches/svn_mutex/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_client/copy.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_client/copy.c Tue Oct 11 19:08:23 2011
@@ -113,8 +113,6 @@ calculate_target_mergeinfo(svn_ra_sessio
if (! locally_added)
{
- svn_boolean_t validate_inherited_mergeinfo = FALSE;
-
/* Fetch any existing (explicit) mergeinfo. We'll temporarily
reparent to the target URL here, just to keep the code simple.
We could, as an alternative, first see if the target URL was a
@@ -126,8 +124,7 @@ calculate_target_mergeinfo(svn_ra_sessio
SVN_ERR(svn_client__get_repos_mergeinfo(ra_session, &src_mergeinfo,
"", src_revnum,
svn_mergeinfo_inherited, TRUE,
- &validate_inherited_mergeinfo,
- pool));
+ FALSE, pool));
if (old_session_url)
SVN_ERR(svn_ra_reparent(ra_session, old_session_url, pool));
}
Modified: subversion/branches/svn_mutex/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_client/merge.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_client/merge.c Tue Oct 11 19:08:23 2011
@@ -180,6 +180,10 @@ typedef struct merge_cmd_baton_t {
is TRUE.*/
svn_boolean_t mergeinfo_capable; /* Whether the merge source server
is capable of Merge Tracking. */
+ svn_boolean_t mergeinfo_validation_capable; /* Whether the merge source
+ server is capable of
+ validating inherited
+ mergeinfo. */
svn_boolean_t ignore_ancestry; /* Are we ignoring ancestry (and by
extension, mergeinfo)? FALSE if
SOURCES_ANCESTRAL is FALSE. */
@@ -3163,18 +3167,15 @@ fix_deleted_subtree_ranges(const char *u
base revision and set *VALIDATED to indicate to the caller if we can
determine what portions of that inherited mergeinfo are invalid.
- If no mergeinfo is inherited set *INVALID_INHERITED_MERGEINFO to NULL and
- *VALIDATED to true.
+ If no mergeinfo is inherited set *INVALID_INHERITED_MERGEINFO to NULL.
If only empty mergeinfo is inherited set *INVALID_INHERITED_MERGEINFO to
- and empty hash and *VALIDATED to true.
+ and empty hash.
- If non-empty inherited mergeinfo is inherited then, if the server (1.7+)
- supports inherited mergeinfo validation, remove all valid path-revisions
- from the raw inherited mergeinfo, set *INVALID_INHERITED_MERGEINFO to the
- remainder, and set *VALIDATED to true. If the server doesn't support
- inherited mergeinfo validation then set *INVALID_INHERITED_MERGEINFO to
- NULL and set *VALIDATED to false.
+ If non-empty inherited mergeinfo is inherited then, if the server
+ supports the SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO capability,
+ remove all valid path-revisions from the raw inherited mergeinfo, and set
+ *INVALID_INHERITED_MERGEINFO to the remainder.
Note that if validation occurs, but all inherited mergeinfo describes
non-existent paths, then *INVALID_INHERITED_MERGEINFO is set to an empty
@@ -3188,7 +3189,6 @@ fix_deleted_subtree_ranges(const char *u
is used for any temporary allocations. */
static svn_error_t *
get_invalid_inherited_mergeinfo(svn_mergeinfo_t *invalid_inherited_mergeinfo,
- svn_boolean_t *validated,
svn_ra_session_t *ra_session,
const char *target_abspath,
svn_client_ctx_t *ctx,
@@ -3198,11 +3198,9 @@ get_invalid_inherited_mergeinfo(svn_merg
svn_mergeinfo_t repos_raw_inherited;
svn_mergeinfo_t repos_validated_inherited;
svn_revnum_t base_revision;
- svn_boolean_t validate_inherited_mergeinfo;
/* Our starting assumptions. */
*invalid_inherited_mergeinfo = NULL;
- *validated = TRUE;
SVN_ERR(svn_wc__node_get_base_rev(&base_revision, ctx->wc_ctx,
target_abspath, scratch_pool));
@@ -3223,12 +3221,10 @@ get_invalid_inherited_mergeinfo(svn_merg
/* Contact the repository to derive the portion of
TARGET_ABSPATH's inherited mergeinfo which is non-existent
and remove it from */
- validate_inherited_mergeinfo = FALSE;
SVN_ERR(svn_client__get_repos_mergeinfo(
ra_session, &repos_raw_inherited, "", base_revision,
svn_mergeinfo_inherited, TRUE,
- &validate_inherited_mergeinfo,
- scratch_pool));
+ FALSE, scratch_pool));
if (repos_raw_inherited == NULL)
{
@@ -3243,15 +3239,11 @@ get_invalid_inherited_mergeinfo(svn_merg
SVN_ERR(svn_client__get_repos_mergeinfo(
ra_session, &repos_validated_inherited, "", base_revision,
svn_mergeinfo_inherited, TRUE,
- validated,
- scratch_pool));
- if (*validated)
- SVN_ERR(svn_mergeinfo_remove2(invalid_inherited_mergeinfo,
- repos_validated_inherited,
- repos_raw_inherited, FALSE,
- result_pool, scratch_pool));
- else
- *invalid_inherited_mergeinfo = NULL;
+ TRUE, scratch_pool));
+ SVN_ERR(svn_mergeinfo_remove2(invalid_inherited_mergeinfo,
+ repos_validated_inherited,
+ repos_raw_inherited, FALSE,
+ result_pool, scratch_pool));
}
SVN_ERR(svn_client__ensure_ra_session_url(&session_url, ra_session,
session_url, scratch_pool));
@@ -3277,6 +3269,11 @@ get_invalid_inherited_mergeinfo(svn_merg
is inherited and not explicit. If RECORDED_MERGEINFO is NULL then
INDIRECT is ignored.
+ If the server supports the SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO
+ capability, the resulting *RECORDED_MERGEINFO is inherited, and
+ VALIDATE_INHERITED us TRUE, then *RECORDED_MERGEINFO is validated as per
+ svn_ra_get_mergeinfo2().
+
If IMPLICIT_MERGEINFO is not NULL then START and END are limits on the
the natural history sought, must both be valid revision numbers, and
START must be greater than END. If TARGET_ABSPATH's base revision
@@ -3293,6 +3290,7 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
svn_mergeinfo_t *implicit_mergeinfo,
svn_boolean_t *indirect,
svn_mergeinfo_inheritance_t inherit,
+ svn_boolean_t validate_inherited,
svn_ra_session_t *ra_session,
const char *target_abspath,
svn_revnum_t start,
@@ -3302,7 +3300,6 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
apr_pool_t *scratch_pool)
{
svn_boolean_t inherited = FALSE;
- svn_boolean_t inherited_validated = FALSE;
/* First, we get the real mergeinfo. We use SCRATCH_POOL throughout this
block because we'll make a final copy of *RECORDED_MERGEINFO only after
@@ -3319,17 +3316,16 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
/* Issue #3669: Remove any non-existent mergeinfo sources
from TARGET_ABSPATH's inherited mergeinfo. */
- if (inherited)
+ if (inherited && validate_inherited)
{
svn_mergeinfo_t invalid_inherited_mergeinfo;
SVN_ERR(get_invalid_inherited_mergeinfo(
- &invalid_inherited_mergeinfo, &inherited_validated,
+ &invalid_inherited_mergeinfo,
ra_session, target_abspath, ctx,
scratch_pool, scratch_pool));
- if (inherited_validated
- && invalid_inherited_mergeinfo
+ if (invalid_inherited_mergeinfo
&& apr_hash_count(invalid_inherited_mergeinfo))
SVN_ERR(svn_mergeinfo_remove2(recorded_mergeinfo,
invalid_inherited_mergeinfo,
@@ -3421,7 +3417,7 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
http://subversion.tigris.org/issues/show_bug.cgi?id=3668#desc5 */
if (implicit_mergeinfo
&& inherited
- && inherited_validated)
+ && validate_inherited)
SVN_ERR(svn_mergeinfo_remove2(recorded_mergeinfo,
*implicit_mergeinfo,
*recorded_mergeinfo, FALSE,
@@ -3443,6 +3439,9 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
If PARENT->IMPLICIT_MERGEINFO is NULL, obtain it from the server.
+ VALIDATE_INHERITED functions as per the argument of the same name
+ in get_full_mergeinfo().
+
Set CHILD->IMPLICIT_MERGEINFO to the mergeinfo inherited from
PARENT->IMPLICIT_MERGEINFO. CHILD->IMPLICIT_MERGEINFO is allocated
in POOL.
@@ -3452,6 +3451,7 @@ inherit_implicit_mergeinfo_from_parent(s
svn_client__merge_path_t *child,
svn_revnum_t revision1,
svn_revnum_t revision2,
+ svn_boolean_t validate_inherited,
svn_ra_session_t *ra_session,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
@@ -3468,7 +3468,7 @@ inherit_implicit_mergeinfo_from_parent(s
if (!parent->implicit_mergeinfo)
SVN_ERR(get_full_mergeinfo(NULL, &(parent->implicit_mergeinfo),
NULL, svn_mergeinfo_inherited,
- ra_session, child->abspath,
+ validate_inherited, ra_session, child->abspath,
MAX(revision1, revision2),
MIN(revision1, revision2),
ctx, result_pool, scratch_pool));
@@ -3496,6 +3496,9 @@ inherit_implicit_mergeinfo_from_parent(s
PARNET->IMPLICIT_MERGEINFO, otherwise contact the repository. Use
SCRATCH_POOL for all temporary allocations.
+ VALIDATE_INHERITED functions as per the argument of the same name
+ in get_full_mergeinfo().
+
PARENT, CHILD, REVISION1, REVISION2, RA_SESSION, and
CTX are all cascased from the arguments of the same name in
filter_merged_revisions() and the same conditions for that function
@@ -3504,6 +3507,7 @@ static svn_error_t *
ensure_implicit_mergeinfo(svn_client__merge_path_t *parent,
svn_client__merge_path_t *child,
svn_boolean_t child_inherits_parent,
+ svn_boolean_t validate_inherited,
svn_revnum_t revision1,
svn_revnum_t revision2,
svn_ra_session_t *ra_session,
@@ -3522,6 +3526,7 @@ ensure_implicit_mergeinfo(svn_client__me
child,
revision1,
revision2,
+ validate_inherited,
ra_session,
ctx,
result_pool,
@@ -3530,6 +3535,7 @@ ensure_implicit_mergeinfo(svn_client__me
SVN_ERR(get_full_mergeinfo(NULL,
&(child->implicit_mergeinfo),
NULL, svn_mergeinfo_inherited,
+ validate_inherited,
ra_session, child->abspath,
MAX(revision1, revision2),
MIN(revision1, revision2),
@@ -3577,6 +3583,9 @@ ensure_implicit_mergeinfo(svn_client__me
mergeinfo on CHILD->ABSPATH or an empty hash if CHILD->ABSPATH has empty
mergeinfo.
+ VALIDATE_INHERITED functions as per the argument of the same name
+ in get_full_mergeinfo().
+
SCRATCH_POOL is used for all temporary allocations.
NOTE: This should only be called when honoring mergeinfo.
@@ -3592,6 +3601,7 @@ filter_merged_revisions(svn_client__merg
svn_revnum_t revision1,
svn_revnum_t revision2,
svn_boolean_t child_inherits_implicit,
+ svn_boolean_t validate_inherited,
svn_ra_session_t *ra_session,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
@@ -3681,6 +3691,7 @@ filter_merged_revisions(svn_client__merg
SVN_ERR(ensure_implicit_mergeinfo(parent,
child,
child_inherits_implicit,
+ validate_inherited,
revision1,
revision2,
ra_session,
@@ -3770,6 +3781,7 @@ filter_merged_revisions(svn_client__merg
SVN_ERR(ensure_implicit_mergeinfo(parent,
child,
child_inherits_implicit,
+ validate_inherited,
revision1,
revision2,
ra_session,
@@ -3823,6 +3835,9 @@ filter_merged_revisions(svn_client__merg
If not null, IMPLICIT_SRC_GAP is the gap, if any, in the natural history
of URL1@REVISION1:URL2@REVISION2, see merge_cmd_baton_t.implicit_src_gap.
+ VALIDATE_INHERITED functions as per the argument of the same name
+ in get_full_mergeinfo().
+
SCRATCH_POOL is used for all temporary allocations. Changes to CHILD and
PARENT are made in RESULT_POOL.
@@ -3850,6 +3865,7 @@ calculate_remaining_ranges(svn_client__m
svn_mergeinfo_t target_mergeinfo,
const apr_array_header_t *implicit_src_gap,
svn_boolean_t child_inherits_implicit,
+ svn_boolean_t validate_inherited,
svn_ra_session_t *ra_session,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
@@ -3900,6 +3916,7 @@ calculate_remaining_ranges(svn_client__m
adjusted_target_mergeinfo,
revision1, revision2,
child_inherits_implicit,
+ validate_inherited,
ra_session, ctx, result_pool,
scratch_pool));
@@ -4177,6 +4194,7 @@ populate_remaining_ranges(apr_array_head
SVN_ERR(get_full_mergeinfo(NULL, /* child->pre_merge_mergeinfo */
&(child->implicit_mergeinfo),
NULL, /* child->indirect_mergeinfo */
+ merge_b->mergeinfo_validation_capable,
svn_mergeinfo_inherited, ra_session,
child->abspath,
MAX(revision1, revision2),
@@ -4198,11 +4216,13 @@ populate_remaining_ranges(apr_array_head
SVN_ERR_ASSERT(parent);
child_inherits_implicit = (parent && !child->switched);
- SVN_ERR(ensure_implicit_mergeinfo(parent, child,
- child_inherits_implicit,
- revision1, revision2,
- ra_session, merge_b->ctx,
- result_pool, iterpool));
+ SVN_ERR(ensure_implicit_mergeinfo(
+ parent, child,
+ child_inherits_implicit,
+ merge_b->mergeinfo_validation_capable,
+ revision1, revision2,
+ ra_session, merge_b->ctx,
+ result_pool, iterpool));
}
child->remaining_ranges = svn_rangelist__initialize(revision1,
@@ -4274,7 +4294,8 @@ populate_remaining_ranges(apr_array_head
/* Get implicit only for merge target. */
(i == 0) ? &(child->implicit_mergeinfo) : NULL,
&(child->indirect_mergeinfo),
- svn_mergeinfo_inherited, ra_session,
+ svn_mergeinfo_inherited,
+ merge_b->mergeinfo_validation_capable, ra_session,
child->abspath,
MAX(revision1, revision2),
0, /* Get all implicit mergeinfo */
@@ -4300,16 +4321,18 @@ populate_remaining_ranges(apr_array_head
exists but is not CHILD's repository parent. */
child_inherits_implicit = (parent && !child->switched);
- SVN_ERR(calculate_remaining_ranges(parent, child,
- source_root_url,
- child_url1, revision1,
- child_url2, revision2,
- child->pre_merge_mergeinfo,
- merge_b->implicit_src_gap,
- child_inherits_implicit,
- ra_session,
- merge_b->ctx, result_pool,
- iterpool));
+ SVN_ERR(calculate_remaining_ranges(
+ parent, child,
+ source_root_url,
+ child_url1, revision1,
+ child_url2, revision2,
+ child->pre_merge_mergeinfo,
+ merge_b->implicit_src_gap,
+ child_inherits_implicit,
+ merge_b->mergeinfo_validation_capable,
+ ra_session,
+ merge_b->ctx, result_pool,
+ iterpool));
/* Deal with any gap in URL1@REVISION1:URL2@REVISION2's natural history.
@@ -6742,6 +6765,7 @@ do_file_merge(svn_mergeinfo_catalog_t re
err = get_full_mergeinfo(&target_mergeinfo,
&(merge_target->implicit_mergeinfo),
&indirect, svn_mergeinfo_inherited,
+ merge_b->mergeinfo_validation_capable,
merge_b->ra_session1, target_abspath,
MAX(revision1, revision2),
0, /* Get all implicit mergeinfo */
@@ -6767,14 +6791,16 @@ do_file_merge(svn_mergeinfo_catalog_t re
by REVISION1:REVISION2. */
if (!merge_b->record_only)
{
- SVN_ERR(calculate_remaining_ranges(NULL, merge_target,
- source_root_url,
- url1, revision1, url2, revision2,
- target_mergeinfo,
- merge_b->implicit_src_gap, FALSE,
- merge_b->ra_session1,
- ctx, scratch_pool,
- iterpool));
+ SVN_ERR(calculate_remaining_ranges(
+ NULL, merge_target,
+ source_root_url,
+ url1, revision1, url2, revision2,
+ target_mergeinfo,
+ merge_b->implicit_src_gap, FALSE,
+ merge_b->mergeinfo_validation_capable,
+ merge_b->ra_session1,
+ ctx, scratch_pool,
+ iterpool));
remaining_ranges = merge_target->remaining_ranges;
}
}
@@ -8658,6 +8684,7 @@ do_merge(apr_hash_t **modified_subtrees,
merge_cmd_baton.ignore_ancestry = ignore_ancestry;
merge_cmd_baton.same_repos = same_repos;
merge_cmd_baton.mergeinfo_capable = FALSE;
+ merge_cmd_baton.mergeinfo_validation_capable = FALSE;
merge_cmd_baton.sources_ancestral = sources_ancestral;
merge_cmd_baton.ctx = ctx;
merge_cmd_baton.target_missing_child = FALSE;
@@ -8739,10 +8766,30 @@ do_merge(apr_hash_t **modified_subtrees,
an RA session to set, but shouldn't be reset for each iteration. */
if (! checked_mergeinfo_capability)
{
+ svn_error_t *err;
+
SVN_ERR(svn_ra_has_capability(ra_session1,
&merge_cmd_baton.mergeinfo_capable,
SVN_RA_CAPABILITY_MERGEINFO,
iterpool));
+ err = svn_ra_has_capability(
+ ra_session1,
+ &merge_cmd_baton.mergeinfo_validation_capable,
+ SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO,
+ iterpool);
+ if (err)
+ {
+ if (err->apr_err == SVN_ERR_UNKNOWN_CAPABILITY)
+ {
+ svn_error_clear(err);
+ merge_cmd_baton.mergeinfo_validation_capable = FALSE;
+ }
+ else
+ {
+ return svn_error_trace(err);
+ }
+ }
+
checked_mergeinfo_capability = TRUE;
}
@@ -9939,7 +9986,6 @@ find_unmerged_mergeinfo(svn_mergeinfo_ca
svn_node_kind_t kind;
svn_mergeinfo_catalog_t subtree_catalog;
apr_array_header_t *source_repos_rel_path_as_array;
- svn_boolean_t validate_inherited_mergeinfo = FALSE;
SVN_ERR(svn_ra_check_path(source_ra_session,
source_path_rel_to_session,
@@ -9956,7 +10002,7 @@ find_unmerged_mergeinfo(svn_mergeinfo_ca
SVN_ERR(svn_ra_get_mergeinfo2(source_ra_session, &subtree_catalog,
source_repos_rel_path_as_array,
source_rev, svn_mergeinfo_inherited,
- &validate_inherited_mergeinfo, FALSE,
+ FALSE, FALSE,
iterpool));
if (subtree_catalog)
source_mergeinfo = apr_hash_get(subtree_catalog, source_path,
@@ -10199,7 +10245,6 @@ calculate_left_hand_side(const char **ur
svn_revnum_t youngest_merged_rev;
const char *yc_ancestor_path;
svn_revnum_t yc_ancestor_rev;
- svn_boolean_t validate_inherited_mergeinfo = FALSE;
const char *source_url;
const char *target_url;
@@ -10303,7 +10348,7 @@ calculate_left_hand_side(const char **ur
SVN_ERR(svn_ra_get_mergeinfo2(source_ra_session, &mergeinfo_catalog,
source_repos_rel_path_as_array, source_rev,
svn_mergeinfo_inherited,
- &validate_inherited_mergeinfo, TRUE,
+ FALSE, TRUE,
iterpool));
if (mergeinfo_catalog)
Modified: subversion/branches/svn_mutex/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_client/mergeinfo.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_client/mergeinfo.c Tue Oct 11 19:08:23 2011
@@ -438,7 +438,7 @@ svn_client__get_repos_mergeinfo(svn_ra_s
svn_revnum_t rev,
svn_mergeinfo_inheritance_t inherit,
svn_boolean_t squelch_incapable,
- svn_boolean_t *validate_inherited_mergeinfo,
+ svn_boolean_t validate_inherited_mergeinfo,
apr_pool_t *pool)
{
svn_mergeinfo_catalog_t tgt_mergeinfo_cat;
@@ -471,7 +471,7 @@ svn_client__get_repos_mergeinfo_catalog(
svn_mergeinfo_inheritance_t inherit,
svn_boolean_t squelch_incapable,
svn_boolean_t include_descendants,
- svn_boolean_t *validate_inherited_mergeinfo,
+ svn_boolean_t validate_inherited_mergeinfo,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -628,7 +628,7 @@ svn_client__get_wc_or_repos_mergeinfo_ca
SVN_ERR(svn_client__get_repos_mergeinfo_catalog(
target_mergeinfo_catalog, ra_session,
"", target_rev, inherit,
- TRUE, FALSE, &validate_inherited_mergeinfo,
+ TRUE, FALSE, validate_inherited_mergeinfo,
result_pool, scratch_pool));
if (*target_mergeinfo_catalog
@@ -1071,7 +1071,7 @@ get_mergeinfo(svn_mergeinfo_catalog_t *m
rev = peg_rev;
SVN_ERR(svn_client__get_repos_mergeinfo_catalog(
&tmp_catalog, ra_session, "", rev, svn_mergeinfo_inherited,
- FALSE, include_descendants, &validate_inherited_mergeinfo,
+ FALSE, include_descendants, validate_inherited_mergeinfo,
result_pool, scratch_pool));
/* If we're not querying the root of the repository, the catalog
Modified: subversion/branches/svn_mutex/subversion/libsvn_client/mergeinfo.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_client/mergeinfo.h?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_client/mergeinfo.h (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_client/mergeinfo.h Tue Oct 11 19:08:23 2011
@@ -173,13 +173,12 @@ svn_client__get_wc_mergeinfo_catalog(svn
will only contain merge source path-revisions that actually
exist in repository.
- If the *TARGET_MERGEINFO for REL_PATH path is inherited and
- *VALIDATE_INHERITED_MERGEINFO is TRUE, then request that the server
- validate the mergeinfo in *TARGET_MERGEINFO, so it contains only merge
- source path-revisions that actually exist in repository. If validation
- is requested and the server supports it, then set
- *VALIDATE_INHERITED_MERGEINFO to TRUE on return. Set it to FALSE in
- all other cases. */
+ If the *TARGET_MERGEINFO for REL_PATH path is inherited,
+ VALIDATE_INHERITED_MERGEINFO is TRUE, and the server supports
+ the #SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO capability,
+ then request that the server validate the mergeinfo in
+ *TARGET_MERGEINFO, so it contains only merge source path-revisions
+ that actually exist in repository. */
svn_error_t *
svn_client__get_repos_mergeinfo(svn_ra_session_t *ra_session,
svn_mergeinfo_t *target_mergeinfo,
@@ -187,7 +186,7 @@ svn_client__get_repos_mergeinfo(svn_ra_s
svn_revnum_t rev,
svn_mergeinfo_inheritance_t inherit,
svn_boolean_t squelch_incapable,
- svn_boolean_t *validate_inherited_mergeinfo,
+ svn_boolean_t validate_inherited_mergeinfo,
apr_pool_t *pool);
/* If INCLUDE_DESCENDANTS is FALSE, behave exactly like
@@ -209,7 +208,7 @@ svn_client__get_repos_mergeinfo_catalog(
svn_mergeinfo_inheritance_t inherit,
svn_boolean_t squelch_incapable,
svn_boolean_t include_descendants,
- svn_boolean_t *validate_inherited_mergeinfo,
+ svn_boolean_t validate_inherited_mergeinfo,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
Modified: subversion/branches/svn_mutex/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_fs_fs/fs_fs.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_fs_fs/fs_fs.c Tue Oct 11 19:08:23 2011
@@ -3086,8 +3086,9 @@ revision_proplist(apr_hash_t **proplist_
SVN_ERR(svn_sqlite__bind_int64(stmt, 1, rev));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
if (!have_row)
- return svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, NULL,
- _("No such revision %ld"), rev);
+ return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
+ _("Missing %ld row in %s"),
+ rev, PATH_REVPROPS_DB);
SVN_ERR(svn_sqlite__column_properties(&proplist, stmt, 0, pool, pool));
SVN_ERR(svn_sqlite__reset(stmt));
Modified: subversion/branches/svn_mutex/subversion/libsvn_fs_fs/structure
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_fs_fs/structure?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_fs_fs/structure (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_fs_fs/structure Tue Oct 11 19:08:23 2011
@@ -40,6 +40,7 @@ repository) is:
revprops/ Subdirectory containing rev-props
<shard>/ Shard directory, if sharding is in use (see below)
<revnum> File containing rev-props for <revnum>
+ revprops.db SQLite database of the packed revision properties
transactions/ Subdirectory containing transactions
<txnid>.txn/ Directory containing transaction <txnid>
txn-protorevs/ Subdirectory containing transaction proto-revision files
@@ -61,7 +62,6 @@ repository) is:
min-unpacked-rev File containing the oldest revision not in a pack file
min-unpacked-revprop File containing the oldest revision of unpacked revprop
rep-cache.db SQLite database mapping rep checksums to locations
- revprops.db SQLite database of the packed revision properties
Files in the revprops directory are in the hash dump format used by
svn_hash_write.
@@ -171,6 +171,8 @@ Revision changed paths list:
Format 1-3: Does not contain the node's kind.
Format 4-5: Contains the node's kind.
+# Incomplete list. See SVN_FS_FS__MIN_*_FORMAT
+
Filesystem format options
-------------------------
@@ -205,10 +207,10 @@ The known layouts, and the parameters th
revs/0/ directory will contain revisions 0-999, revs/1/ will contain
1000-1999, and so on.
-Packing
--------
+Packing revisions
+-----------------
-A repository can optionally be "packed" to conserve space on disk. The
+A filesystem can optionally be "packed" to conserve space on disk. The
packing process concatenates all the revision files in each full shard to
create pack files. A manifest file is also created for each shard which
records the indexes of the corresponding revision files in the pack file.
@@ -219,6 +221,18 @@ The manifest file consists of a list of
pack file. The offsets are stored as ASCII decimal, and separated by a newline
character.
+Packing revision properties
+---------------------------
+
+Revprop shards may be packed too. The packing process moves all revprops from
+a the oldest unpacked shard to the SQLite database "revprops/revprops.db". The
+sequel documents the schema of FSFS format 5, which corresponds to schema
+version USER_VERSION=1:
+
+The database maps revision numbers to serialized "proplist" skels. Every
+packed revision must have a mapping entry (a table row), even if it maps the
+revnum to an empty skel.
+
Node-revision IDs
-----------------
Propchange: subversion/branches/svn_mutex/subversion/libsvn_fs_fs/temp_serializer.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 11 19:08:23 2011
@@ -1 +1 @@
-/subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c:1067687-1072301
+/subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c:1067687-1072301,1141684-1142212
Propchange: subversion/branches/svn_mutex/subversion/libsvn_fs_fs/temp_serializer.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 11 19:08:23 2011
@@ -1 +1 @@
-/subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h:1067687-1072301
+/subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h:1067687-1072301,1141684-1142212
Modified: subversion/branches/svn_mutex/subversion/libsvn_ra/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_ra/deprecated.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_ra/deprecated.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_ra/deprecated.c Tue Oct 11 19:08:23 2011
@@ -426,10 +426,8 @@ svn_error_t *svn_ra_get_mergeinfo(svn_ra
svn_boolean_t include_descendants,
apr_pool_t *pool)
{
- svn_boolean_t validate_inherited_mergeinfo = FALSE;
-
return svn_error_trace(svn_ra_get_mergeinfo2(session, catalog, paths,
- revision, inherit, &validate_inherited_mergeinfo,
+ revision, inherit, FALSE,
include_descendants, pool));
}
Modified: subversion/branches/svn_mutex/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_ra/ra_loader.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_ra/ra_loader.c Tue Oct 11 19:08:23 2011
@@ -771,7 +771,7 @@ svn_error_t *svn_ra_get_mergeinfo2(svn_r
const apr_array_header_t *paths,
svn_revnum_t revision,
svn_mergeinfo_inheritance_t inherit,
- svn_boolean_t *validate_inherited_mergeinfo,
+ svn_boolean_t validate_inherited_mergeinfo,
svn_boolean_t include_descendants,
apr_pool_t *pool)
{
Modified: subversion/branches/svn_mutex/subversion/libsvn_ra/ra_loader.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_ra/ra_loader.h?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_ra/ra_loader.h (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_ra/ra_loader.h Tue Oct 11 19:08:23 2011
@@ -131,7 +131,7 @@ typedef struct svn_ra__vtable_t {
const apr_array_header_t *paths,
svn_revnum_t revision,
svn_mergeinfo_inheritance_t inherit,
- svn_boolean_t *validate_inherited_mergeinfo,
+ svn_boolean_t validate_inherited_mergeinfo,
svn_boolean_t include_merged_revisions,
apr_pool_t *pool);
/* See svn_ra_do_update2(). */
Modified: subversion/branches/svn_mutex/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_ra_local/ra_plugin.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_ra_local/ra_plugin.c Tue Oct 11 19:08:23 2011
@@ -700,7 +700,7 @@ svn_ra_local__get_mergeinfo(svn_ra_sessi
const apr_array_header_t *paths,
svn_revnum_t revision,
svn_mergeinfo_inheritance_t inherit,
- svn_boolean_t *validate_inherited_mergeinfo,
+ svn_boolean_t validate_inherited_mergeinfo,
svn_boolean_t include_descendants,
apr_pool_t *pool)
{
@@ -719,7 +719,7 @@ svn_ra_local__get_mergeinfo(svn_ra_sessi
SVN_ERR(svn_repos_fs_get_mergeinfo2(&tmp_catalog, sess->repos, abs_paths,
revision, inherit,
- *validate_inherited_mergeinfo,
+ validate_inherited_mergeinfo,
include_descendants,
NULL, NULL, pool));
if (apr_hash_count(tmp_catalog) > 0)
@@ -1422,7 +1422,9 @@ svn_ra_local__has_capability(svn_ra_sess
{
*has = TRUE;
}
- else if (strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
+ else if ((strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
+ || (strcmp(capability,
+ SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO) == 0))
{
/* With mergeinfo, the code's capabilities may not reflect the
repository's, so inquire further. */
Modified: subversion/branches/svn_mutex/subversion/libsvn_ra_neon/fetch.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_ra_neon/fetch.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_ra_neon/fetch.c Tue Oct 11 19:08:23 2011
@@ -2290,7 +2290,8 @@ static svn_error_t * reporter_set_path(v
"%s</S:entry>" DEBUG_CR,
revision, depthstring, tokenstring, qpath->data);
- return svn_io_file_write_full(rb->tmpfile, entry, strlen(entry), NULL, pool);
+ return svn_error_trace(svn_io_file_write_full(rb->tmpfile, entry,
+ strlen(entry), NULL, pool));
}
@@ -2343,7 +2344,8 @@ static svn_error_t * reporter_link_path(
revision, depthstring, tokenstring,
qlinkpath->data, qpath->data);
- return svn_io_file_write_full(rb->tmpfile, entry, strlen(entry), NULL, pool);
+ return svn_error_trace(svn_io_file_write_full(rb->tmpfile, entry,
+ strlen(entry), NULL, pool));
}
@@ -2360,7 +2362,8 @@ static svn_error_t * reporter_delete_pat
"<S:missing>%s</S:missing>" DEBUG_CR,
qpath->data);
- return svn_io_file_write_full(rb->tmpfile, s, strlen(s), NULL, pool);
+ return svn_error_trace(svn_io_file_write_full(rb->tmpfile, s, strlen(s),
+ NULL, pool));
}
@@ -2369,7 +2372,7 @@ static svn_error_t * reporter_abort_repo
{
report_baton_t *rb = report_baton;
- (void) apr_file_close(rb->tmpfile);
+ SVN_ERR(svn_io_file_close(rb->tmpfile, pool));
return SVN_NO_ERROR;
}
@@ -2414,8 +2417,10 @@ static svn_error_t * reporter_finish_rep
/* We're done with the file. this should delete it. Note: it
isn't a big deal if this line is never executed -- the pool
will eventually get it. We're just being proactive here. */
- (void) apr_file_close(rb->tmpfile);
- return err;
+ return svn_error_trace(
+ svn_error_compose_create(err,
+ svn_io_file_close(rb->tmpfile,
+ pool)));
}
/* dispatch the REPORT. */
@@ -2429,17 +2434,16 @@ static svn_error_t * reporter_finish_rep
rb->spool_response, pool);
/* We're done with the file. Proactively close/delete the thing. */
- (void) apr_file_close(rb->tmpfile);
-
- SVN_ERR(err);
+ SVN_ERR(svn_error_compose_create(err,
+ svn_io_file_close(rb->tmpfile, pool)));
/* We got the whole HTTP response thing done. *Whew*. Our edit
baton should have been closed by now, so return a failure if it
hasn't been. */
if (rb->edit_baton)
{
- return svn_error_createf
- (SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
+ return svn_error_createf(
+ SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
_("REPORT response handling failed to complete the editor drive"));
}
Modified: subversion/branches/svn_mutex/subversion/libsvn_ra_neon/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_ra_neon/mergeinfo.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_ra_neon/mergeinfo.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_ra_neon/mergeinfo.c Tue Oct 11 19:08:23 2011
@@ -51,7 +51,6 @@ struct mergeinfo_baton
svn_stringbuf_t *curr_path;
svn_stringbuf_t *curr_info;
svn_mergeinfo_catalog_t catalog;
- svn_boolean_t validated_inherited_mergeinfo;
svn_error_t *err;
};
@@ -63,8 +62,6 @@ static const svn_ra_neon__xml_elm_t merg
SVN_RA_NEON__XML_CDATA },
{ SVN_XML_NAMESPACE, SVN_DAV__MERGEINFO_INFO, ELEM_mergeinfo_info,
SVN_RA_NEON__XML_CDATA },
- { SVN_XML_NAMESPACE, SVN_DAV__VALIDATE_INHERITED,
- ELEM_validate_inherited_mergeinfo, SVN_RA_NEON__XML_CDATA },
{ NULL }
};
@@ -96,10 +93,6 @@ start_element(int *elem, void *baton, in
svn_stringbuf_setempty(mb->curr_info);
svn_stringbuf_setempty(mb->curr_path);
}
- else if (elm->id == ELEM_validate_inherited_mergeinfo)
- {
- mb->validated_inherited_mergeinfo = TRUE;
- }
SVN_ERR(mb->err);
@@ -170,7 +163,7 @@ svn_ra_neon__get_mergeinfo(svn_ra_sessio
const apr_array_header_t *paths,
svn_revnum_t revision,
svn_mergeinfo_inheritance_t inherit,
- svn_boolean_t *validate_inherited_mergeinfo,
+ svn_boolean_t validate_inherited_mergeinfo,
svn_boolean_t include_descendants,
apr_pool_t *pool)
{
@@ -202,7 +195,7 @@ svn_ra_neon__get_mergeinfo(svn_ra_sessio
"</S:inherit>",
svn_inheritance_to_word(inherit)));
- if (*validate_inherited_mergeinfo)
+ if (validate_inherited_mergeinfo)
{
/* Send it only if true; server will default to "no". */
svn_stringbuf_appendcstr(request_body,
@@ -240,7 +233,6 @@ svn_ra_neon__get_mergeinfo(svn_ra_sessio
mb.curr_path = svn_stringbuf_create("", pool);
mb.curr_info = svn_stringbuf_create("", pool);
mb.catalog = apr_hash_make(pool);
- mb.validated_inherited_mergeinfo = FALSE;
mb.err = SVN_NO_ERROR;
/* ras's URL may not exist in HEAD, and thus it's not safe to send
@@ -268,7 +260,5 @@ svn_ra_neon__get_mergeinfo(svn_ra_sessio
if (mb.err == SVN_NO_ERROR && apr_hash_count(mb.catalog))
*catalog = mb.catalog;
- *validate_inherited_mergeinfo = mb.validated_inherited_mergeinfo;
-
return mb.err;
}
Modified: subversion/branches/svn_mutex/subversion/libsvn_ra_neon/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_ra_neon/options.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_ra_neon/options.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_ra_neon/options.c Tue Oct 11 19:08:23 2011
@@ -195,11 +195,16 @@ parse_capabilities(ne_request *req,
apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_DEPTH,
APR_HASH_KEY_STRING, capability_yes);
+ /* For mergeinfo capabilities, the server doesn't know what repository
+ we're referring to, so it can't just say capability_yes. */
if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_MERGEINFO, vals))
- /* The server doesn't know what repository we're referring
- to, so it can't just say capability_yes. */
apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_MERGEINFO,
APR_HASH_KEY_STRING, capability_server_yes);
+ if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_MERGEINFO_VALIDATION,
+ vals))
+ apr_hash_set(ras->capabilities,
+ SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO,
+ APR_HASH_KEY_STRING, capability_server_yes);
if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_LOG_REVPROPS, vals))
apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_LOG_REVPROPS,
@@ -402,7 +407,9 @@ svn_ra_neon__has_capability(svn_ra_sessi
check there as well. */
if (cap_result == capability_server_yes)
{
- if (strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
+ if ((strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
+ || (strcmp(capability,
+ SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO) == 0))
{
/* Handle mergeinfo specially. Mergeinfo depends on the
repository as well as the server, but the server routine
@@ -422,7 +429,7 @@ svn_ra_neon__has_capability(svn_ra_sessi
err = svn_ra_neon__get_mergeinfo(session, &ignored, paths, 0,
FALSE,
- &validate_inherited_mergeinfo,
+ validate_inherited_mergeinfo,
FALSE, pool);
if (err)
@@ -447,9 +454,14 @@ svn_ra_neon__has_capability(svn_ra_sessi
else
cap_result = capability_yes;
- apr_hash_set(ras->capabilities,
- SVN_RA_CAPABILITY_MERGEINFO, APR_HASH_KEY_STRING,
- cap_result);
+ if (strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
+ apr_hash_set(ras->capabilities,
+ SVN_RA_CAPABILITY_MERGEINFO, APR_HASH_KEY_STRING,
+ cap_result);
+ else
+ apr_hash_set(ras->capabilities,
+ SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO,
+ APR_HASH_KEY_STRING, cap_result);
}
else
{
Modified: subversion/branches/svn_mutex/subversion/libsvn_ra_neon/ra_neon.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_ra_neon/ra_neon.h?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_ra_neon/ra_neon.h (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_ra_neon/ra_neon.h Tue Oct 11 19:08:23 2011
@@ -308,7 +308,7 @@ svn_error_t * svn_ra_neon__get_mergeinfo
const apr_array_header_t *paths,
svn_revnum_t revision,
svn_mergeinfo_inheritance_t inherit,
- svn_boolean_t *validate_inherited_mergeinfo,
+ svn_boolean_t validate_inherited_mergeinfo,
svn_boolean_t include_descendants,
apr_pool_t *pool);
Modified: subversion/branches/svn_mutex/subversion/libsvn_ra_serf/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_ra_serf/mergeinfo.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_ra_serf/mergeinfo.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_ra_serf/mergeinfo.c Tue Oct 11 19:08:23 2011
@@ -44,8 +44,7 @@ typedef enum mergeinfo_state_e {
MERGEINFO_REPORT,
MERGEINFO_ITEM,
MERGEINFO_PATH,
- MERGEINFO_INFO,
- MERGEINFO_VALIDATED
+ MERGEINFO_INFO
} mergeinfo_state_e;
/* Baton for accumulating mergeinfo. RESULT_CATALOG stores the final
@@ -63,7 +62,6 @@ typedef struct mergeinfo_context_t {
svn_revnum_t revision;
svn_mergeinfo_inheritance_t inherit;
svn_boolean_t validate_inherited_mergeinfo;
- svn_boolean_t validated_inherited_mergeinfo;
svn_boolean_t include_descendants;
} mergeinfo_context_t;
@@ -82,11 +80,6 @@ start_element(svn_ra_serf__xml_parser_t
svn_ra_serf__xml_push_state(parser, MERGEINFO_REPORT);
}
else if (state == MERGEINFO_REPORT &&
- strcmp(name.name, SVN_DAV__VALIDATE_INHERITED) == 0)
- {
- svn_ra_serf__xml_push_state(parser, MERGEINFO_VALIDATED);
- }
- else if (state == MERGEINFO_REPORT &&
strcmp(name.name, SVN_DAV__MERGEINFO_ITEM) == 0)
{
svn_ra_serf__xml_push_state(parser, MERGEINFO_ITEM);
@@ -176,11 +169,6 @@ cdata_handler(svn_ra_serf__xml_parser_t
svn_stringbuf_appendbytes(mergeinfo_ctx->curr_info, data, len);
break;
- case MERGEINFO_VALIDATED:
- if (strncmp(data, "yes", 3) == 0)
- mergeinfo_ctx->validated_inherited_mergeinfo = TRUE;
- break;
-
default:
break;
}
@@ -254,7 +242,7 @@ svn_ra_serf__get_mergeinfo(svn_ra_sessio
const apr_array_header_t *paths,
svn_revnum_t revision,
svn_mergeinfo_inheritance_t inherit,
- svn_boolean_t *validate_inherited_mergeinfo,
+ svn_boolean_t validate_inherited_mergeinfo,
svn_boolean_t include_descendants,
apr_pool_t *pool)
{
@@ -284,8 +272,7 @@ svn_ra_serf__get_mergeinfo(svn_ra_sessio
mergeinfo_ctx->paths = paths;
mergeinfo_ctx->revision = revision;
mergeinfo_ctx->inherit = inherit;
- mergeinfo_ctx->validate_inherited_mergeinfo = *validate_inherited_mergeinfo;
- mergeinfo_ctx->validated_inherited_mergeinfo = FALSE;
+ mergeinfo_ctx->validate_inherited_mergeinfo = validate_inherited_mergeinfo;
mergeinfo_ctx->include_descendants = include_descendants;
handler = apr_pcalloc(pool, sizeof(*handler));
@@ -325,9 +312,6 @@ svn_ra_serf__get_mergeinfo(svn_ra_sessio
SVN_ERR(err);
- *validate_inherited_mergeinfo =
- mergeinfo_ctx->validated_inherited_mergeinfo;
-
if (mergeinfo_ctx->done && apr_hash_count(mergeinfo_ctx->result_catalog))
*catalog = mergeinfo_ctx->result_catalog;
Modified: subversion/branches/svn_mutex/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_ra_serf/options.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_ra_serf/options.c Tue Oct 11 19:08:23 2011
@@ -296,13 +296,22 @@ capabilities_headers_iterator_callback(v
apr_hash_set(orc->session->capabilities, SVN_RA_CAPABILITY_DEPTH,
APR_HASH_KEY_STRING, capability_yes);
}
+
+ /* For mergeinfo capabilities, the server doesn't know what repository
+ we're referring to, so it can't just say capability_yes. */
if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_MERGEINFO, vals))
{
- /* The server doesn't know what repository we're referring
- to, so it can't just say capability_yes. */
apr_hash_set(orc->session->capabilities, SVN_RA_CAPABILITY_MERGEINFO,
APR_HASH_KEY_STRING, capability_server_yes);
}
+ if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_MERGEINFO_VALIDATION,
+ vals))
+ {
+ apr_hash_set(orc->session->capabilities,
+ SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO,
+ APR_HASH_KEY_STRING, capability_server_yes);
+ }
+
if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_LOG_REVPROPS, vals))
{
apr_hash_set(orc->session->capabilities,
@@ -558,7 +567,9 @@ svn_ra_serf__has_capability(svn_ra_sessi
check there as well. */
if (cap_result == capability_server_yes)
{
- if (strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
+ if ((strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
+ || (strcmp(capability,
+ SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO) == 0))
{
/* Handle mergeinfo specially. Mergeinfo depends on the
repository as well as the server, but the server routine
@@ -578,7 +589,7 @@ svn_ra_serf__has_capability(svn_ra_sessi
err = svn_ra_serf__get_mergeinfo(ra_session, &ignored, paths, 0,
FALSE,
- &validate_inherited_mergeinfo,
+ validate_inherited_mergeinfo,
FALSE, pool);
if (err)
@@ -602,9 +613,14 @@ svn_ra_serf__has_capability(svn_ra_sessi
else
cap_result = capability_yes;
- apr_hash_set(serf_sess->capabilities,
- SVN_RA_CAPABILITY_MERGEINFO, APR_HASH_KEY_STRING,
- cap_result);
+ if (strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
+ apr_hash_set(serf_sess->capabilities,
+ SVN_RA_CAPABILITY_MERGEINFO, APR_HASH_KEY_STRING,
+ cap_result);
+ else
+ apr_hash_set(serf_sess->capabilities,
+ SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO,
+ APR_HASH_KEY_STRING, cap_result);
}
else
{
Modified: subversion/branches/svn_mutex/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_ra_serf/ra_serf.h?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_ra_serf/ra_serf.h Tue Oct 11 19:08:23 2011
@@ -1376,7 +1376,7 @@ svn_error_t * svn_ra_serf__get_mergeinfo
const apr_array_header_t *paths,
svn_revnum_t revision,
svn_mergeinfo_inheritance_t inherit,
- svn_boolean_t *validate_inherited_mergeinfo,
+ svn_boolean_t validate_inherited_mergeinfo,
svn_boolean_t include_descendants,
apr_pool_t *pool);
Modified: subversion/branches/svn_mutex/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_ra_serf/update.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_ra_serf/update.c Tue Oct 11 19:08:23 2011
@@ -115,9 +115,13 @@ typedef struct report_dir_t
/* the expanded directory name (including all parent names) */
const char *name;
- /* the canonical url for this directory. */
+ /* the canonical url for this directory after updating. (received) */
const char *url;
+ /* The original repos_relpath of this url (from the workingcopy)
+ or NULL if the repos_relpath can be calculated from the edit root. */
+ const char *repos_relpath;
+
/* Our base revision - SVN_INVALID_REVNUM if we're adding this dir. */
svn_revnum_t base_rev;
@@ -315,6 +319,13 @@ struct report_context_t {
/* Path -> lock token mapping. */
apr_hash_t *lock_path_tokens;
+ /* Path -> const char *repos_relpath mapping */
+ apr_hash_t *switched_paths;
+
+ /* Boolean indicating whether "" is switched.
+ (This indicates that the we are updating a single file) */
+ svn_boolean_t root_is_switched;
+
/* Our master update editor and baton. */
const svn_delta_editor_t *update_editor;
void *update_baton;
@@ -1361,6 +1372,9 @@ start_report(svn_ra_serf__xml_parser_t *
info->base_name = info->dir->base_name;
info->name = info->dir->name;
+
+ info->dir->repos_relpath = apr_hash_get(ctx->switched_paths, "",
+ APR_HASH_KEY_STRING);
}
else if (state == NONE)
{
@@ -1408,6 +1422,15 @@ start_report(svn_ra_serf__xml_parser_t *
dir->name = svn_relpath_join(dir->parent_dir->name, dir->base_name,
dir->pool);
info->name = dir->name;
+
+ dir->repos_relpath = apr_hash_get(ctx->switched_paths, dir->name,
+ APR_HASH_KEY_STRING);
+
+ if (!dir->repos_relpath
+ && dir->parent_dir
+ && dir->parent_dir->repos_relpath)
+ dir->repos_relpath = svn_relpath_join(dir->parent_dir->repos_relpath,
+ dir->base_name, dir->pool);
}
else if ((state == OPEN_DIR || state == ADD_DIR) &&
strcmp(name.name, "add-directory") == 0)
@@ -1855,8 +1878,44 @@ end_report(svn_ra_serf__xml_parser_t *pa
svn_path_uri_encode(info->name, info->pool),
info->pool);
+#if 0
+ /* If this file is switched vs the editor root we should provide
+ its real url instead of the one calculated from the session root.
+ */
+ fs_path = apr_hash_get(ctx->switched_paths, info->name,
+ APR_HASH_KEY_STRING);
+
+ if (!fs_path)
+ {
+ if (ctx->root_is_switched)
+ {
+ /* ### BH: Needs more review.
+
+ We are updating a direct target (most likely a file)
+ that is switched vs its parent url */
+ SVN_ERR_ASSERT(*svn_relpath_dirname(info->name, info->pool)
+ == '\0');
+
+ fs_path = apr_hash_get(ctx->switched_paths, "",
+ APR_HASH_KEY_STRING);
+ }
+ else if (info->dir->repos_relpath)
+ fs_path = svn_relpath_join(info->dir->repos_relpath,
+ info->base_name, info->pool);
+ else if (!fs_path)
+ SVN_ERR(svn_ra_serf__get_relative_path(&fs_path, full_path,
+ ctx->sess, NULL,
+ info->pool));
+ }
+#else
+ /* This code path is broken for files where fs_path is not
+ the same as the repository path. (E.g. when the file is switched)
+ */
SVN_ERR(svn_ra_serf__get_relative_path(&fs_path, full_path,
ctx->sess, NULL, info->pool));
+#endif
+
+
info->delta_base = svn_string_createf(info->pool, "%s/%ld/%s",
ctx->sess->rev_root_stub,
info->base_rev, fs_path);
@@ -2214,11 +2273,18 @@ link_path(void *report_baton,
SVN_ERR(svn_io_file_write_full(report->body_file, buf->data, buf->len,
NULL, pool));
+ /* Store the switch roots to allow generating repos_relpaths from just
+ the working copy paths. (Needed for HTTPv2) */
+ path = apr_pstrdup(report->pool, path);
+ apr_hash_set(report->switched_paths, path, APR_HASH_KEY_STRING,
+ apr_pstrdup(report->pool, link+1));
+
+ if (!*path)
+ report->root_is_switched = TRUE;
+
if (lock_token)
{
- apr_hash_set(report->lock_path_tokens,
- apr_pstrdup(report->pool, path),
- APR_HASH_KEY_STRING,
+ apr_hash_set(report->lock_path_tokens, path, APR_HASH_KEY_STRING,
apr_pstrdup(report->pool, lock_token));
}
@@ -2639,6 +2705,7 @@ make_update_reporter(svn_ra_session_t *r
report->send_copyfrom_args = send_copyfrom_args;
report->text_deltas = text_deltas;
report->lock_path_tokens = apr_hash_make(report->pool);
+ report->switched_paths = apr_hash_make(report->pool);
report->source = src_path;
report->destination = dest_path;
Modified: subversion/branches/svn_mutex/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_ra_svn/client.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_ra_svn/client.c Tue Oct 11 19:08:23 2011
@@ -1185,7 +1185,7 @@ static svn_error_t *ra_svn_get_mergeinfo
const apr_array_header_t *paths,
svn_revnum_t revision,
svn_mergeinfo_inheritance_t inherit,
- svn_boolean_t *validate_inherited_mergeinfo,
+ svn_boolean_t validate_inherited_mergeinfo,
svn_boolean_t include_descendants,
apr_pool_t *pool)
{
@@ -1195,7 +1195,6 @@ static svn_error_t *ra_svn_get_mergeinfo
apr_array_header_t *mergeinfo_tuple;
svn_ra_svn_item_t *elt;
const char *path;
- apr_uint64_t validated_inherited_mergeinfo;
SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w((!", "get-mergeinfo"));
for (i = 0; i < paths->nelts; i++)
@@ -1206,14 +1205,10 @@ static svn_error_t *ra_svn_get_mergeinfo
SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)(?r)wbb)", revision,
svn_inheritance_to_word(inherit),
include_descendants,
- *validate_inherited_mergeinfo));
+ validate_inherited_mergeinfo));
SVN_ERR(handle_auth_request(sess_baton, pool));
- SVN_ERR(svn_ra_svn_read_cmd_response(conn, pool, "l?B", &mergeinfo_tuple,
- &validated_inherited_mergeinfo));
-
- *validate_inherited_mergeinfo =
- (optbool_to_tristate(validated_inherited_mergeinfo) == svn_tristate_true);
+ SVN_ERR(svn_ra_svn_read_cmd_response(conn, pool, "l", &mergeinfo_tuple));
*catalog = NULL;
if (mergeinfo_tuple->nelts > 0)
@@ -2471,6 +2466,10 @@ static svn_error_t *ra_svn_has_capabilit
*has = svn_ra_svn_has_capability(sess->conn, SVN_RA_SVN_CAP_DEPTH);
else if (strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
*has = svn_ra_svn_has_capability(sess->conn, SVN_RA_SVN_CAP_MERGEINFO);
+ else if (strcmp(capability,
+ SVN_RA_SVN_CAP_VALIDATE_INHERITED_MERGEINFO) == 0)
+ *has = svn_ra_svn_has_capability(
+ sess->conn, SVN_RA_SVN_CAP_VALIDATE_INHERITED_MERGEINFO);
else if (strcmp(capability, SVN_RA_CAPABILITY_LOG_REVPROPS) == 0)
*has = svn_ra_svn_has_capability(sess->conn, SVN_RA_SVN_CAP_LOG_REVPROPS);
else if (strcmp(capability, SVN_RA_CAPABILITY_PARTIAL_REPLAY) == 0)
Modified: subversion/branches/svn_mutex/subversion/libsvn_ra_svn/protocol
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_ra_svn/protocol?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_ra_svn/protocol (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_ra_svn/protocol Tue Oct 11 19:08:23 2011
@@ -202,6 +202,11 @@ capability and C indicates a client capa
[S] atomic-revprops If the server presents this capability, it
supports the change-rev-prop2 command.
See section 3.1.1.
+[S] validate-inherited-mergeinfo If the server presents this capability, it
+ understands the optional
+ validate-inherited-mergeinfo parameter in
+ the get-mergeinfo command. See section
+ 3.1.1.
3. Commands
-----------
@@ -325,7 +330,8 @@ second place for auth-request point as n
get-mergeinfo
params: ( ( path:string ... ) [ rev:number ] inherit:word
- descendents:bool)
+ descendents:bool
+ ? validate-inherited-mergeinfo:bool)
response: ( ( ( path:string merge-info:string ) ... ) )
New in svn 1.5. If no paths are specified, an empty response is
returned. If rev is not specified, the youngest revision is used.
Propchange: subversion/branches/svn_mutex/subversion/libsvn_subr/adler32.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 11 19:08:23 2011
@@ -1,3 +1,4 @@
/subversion/branches/diff-optimizations/subversion/libsvn_subr/adler32.c:1031270-1037352
/subversion/branches/diff-optimizations-bytes/subversion/libsvn_subr/adler32.c:1037353-1067789
/subversion/branches/performance/subversion/libsvn_subr/adler32.c:1067697-1078365
+/subversion/trunk/subversion/libsvn_subr/adler32.c:1141684-1142212
Propchange: subversion/branches/svn_mutex/subversion/libsvn_subr/svn_temp_serializer.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 11 19:08:23 2011
@@ -1 +1 @@
-/subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c:1067687-1072301
+/subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c:1067687-1072301,1141684-1142212
Modified: subversion/branches/svn_mutex/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_wc/adm_crawler.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_wc/adm_crawler.c Tue Oct 11 19:08:23 2011
@@ -131,7 +131,9 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
if (status != svn_wc__db_status_normal
&& status != svn_wc__db_status_copied
&& status != svn_wc__db_status_moved_here
- && !(status == svn_wc__db_status_added && kind == svn_wc__db_kind_dir))
+ && !(kind == svn_wc__db_kind_dir
+ && (status == svn_wc__db_status_added
+ || status == svn_wc__db_status_incomplete)))
{
return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
_("The node '%s' can not be restored."),
@@ -192,12 +194,11 @@ restore_node(svn_wc__db_t *db,
/* The recursive crawler that describes a mixed-revision working
copy to an RA layer. Used to initiate updates.
- This is a depth-first recursive walk of DIR_ABSPATH using DB. Look
- at each entry and check if its revision is different than DIR_REV.
- If so, report this fact to REPORTER. If an entry is. If a node has
- a different URL than expected, report that to REPORTER. If an
- entry has a different depth than its parent, report that to
- REPORTER.
+ This is a depth-first recursive walk of the children of DIR_ABSPATH
+ (not including DIR_ABSPATH itself) using DB. Look at each node and
+ check if its revision is different than DIR_REV. If so, report this
+ fact to REPORTER. If a node has a different URL than expected, or
+ a different depth than its parent, report that to REPORTER.
Report DIR_ABSPATH to the reporter as REPORT_RELPATH.
@@ -389,7 +390,10 @@ report_revisions_and_depths(svn_wc__db_t
if (wrk_status == svn_wc__db_status_normal
|| wrk_status == svn_wc__db_status_copied
- || wrk_status == svn_wc__db_status_moved_here)
+ || wrk_status == svn_wc__db_status_moved_here
+ || (wrk_kind == svn_wc__db_kind_dir
+ && (wrk_status == svn_wc__db_status_added
+ || wrk_status == svn_wc__db_status_incomplete)))
{
svn_node_kind_t dirent_kind;
@@ -646,9 +650,8 @@ svn_wc_crawl_revisions5(svn_wc_context_t
svn_depth_t report_depth;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
- /* The first thing we do is get the base_rev from the working copy's
- ROOT_DIRECTORY. This is the first revnum that entries will be
- compared to. */
+ /* Get the base rev, which is the first revnum that entries will be
+ compared to, and some other WC info about the target. */
err = svn_wc__db_base_get_info(&status, &target_kind, &target_rev,
&repos_relpath, &repos_root_url,
NULL, NULL, NULL, NULL, &target_depth,
@@ -738,7 +741,10 @@ svn_wc_crawl_revisions5(svn_wc_context_t
if (wrk_status == svn_wc__db_status_normal
|| wrk_status == svn_wc__db_status_copied
- || wrk_status == svn_wc__db_status_moved_here)
+ || wrk_status == svn_wc__db_status_moved_here
+ || (wrk_kind == svn_wc__db_kind_dir
+ && (wrk_status == svn_wc__db_status_added
+ || wrk_status == svn_wc__db_status_incomplete)))
{
SVN_ERR(restore_node(wc_ctx->db, local_abspath,
wrk_kind, use_commit_times,
Modified: subversion/branches/svn_mutex/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/libsvn_wc/update_editor.c?rev=1182027&r1=1182026&r2=1182027&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/svn_mutex/subversion/libsvn_wc/update_editor.c Tue Oct 11 19:08:23 2011
@@ -1144,6 +1144,7 @@ modcheck_callback(void *baton,
case svn_wc_status_ignored:
case svn_wc_status_none:
case svn_wc_status_unversioned:
+ case svn_wc_status_external:
break;
case svn_wc_status_deleted: