summaryrefslogtreecommitdiff
path: root/subversion
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2018-10-08 08:34:55 +0000
committerPeter Wemm <peter@FreeBSD.org>2018-10-08 08:34:55 +0000
commitf3520a04ffc9f2c22dc693226fd2a480a4192da1 (patch)
tree19339c70c87a08c32b01175500d4284f409925ee /subversion
parent3faf8d6bffc5d0fb2525ba37bb504c53366caf9d (diff)
Notes
Diffstat (limited to 'subversion')
-rw-r--r--subversion/include/svn_version.h6
-rw-r--r--subversion/libsvn_auth_gnome_keyring/gnome_keyring.c6
-rw-r--r--subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc.in4
-rw-r--r--subversion/libsvn_client/conflicts.c71
-rw-r--r--subversion/libsvn_client/update.c150
-rw-r--r--subversion/libsvn_fs_fs/cached_data.c26
-rw-r--r--subversion/libsvn_repos/authz_parse.c7
-rw-r--r--subversion/libsvn_subr/io.c7
-rw-r--r--subversion/libsvn_wc/wc-checks.h2
-rw-r--r--subversion/libsvn_wc/wc-metadata.h2
-rw-r--r--subversion/svn/help-cmd.c2
11 files changed, 190 insertions, 93 deletions
diff --git a/subversion/include/svn_version.h b/subversion/include/svn_version.h
index 9c88b5b2f71d5..7d95271dfa4fe 100644
--- a/subversion/include/svn_version.h
+++ b/subversion/include/svn_version.h
@@ -70,7 +70,7 @@ extern "C" {
*
* @since New in 1.1.
*/
-#define SVN_VER_PATCH 0
+#define SVN_VER_PATCH 2
/** @deprecated Provided for backward compatibility with the 1.0 API. */
@@ -93,7 +93,7 @@ extern "C" {
*
* Always change this at the same time as SVN_VER_NUMTAG.
*/
-#define SVN_VER_TAG " (r1827917)"
+#define SVN_VER_TAG " (r1835932)"
/** Number tag: a string describing the version.
@@ -117,7 +117,7 @@ extern "C" {
* file version. Its value remains 0 in the repository except in release
* tags where it is the revision from which the tag was created.
*/
-#define SVN_VER_REVISION 1827917
+#define SVN_VER_REVISION 1835932
/* Version strings composed from the above definitions. */
diff --git a/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c b/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
index 0e77586e051e9..7926960ca4466 100644
--- a/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
+++ b/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
@@ -118,6 +118,8 @@ password_get_gnome_keyring(svn_boolean_t *done,
{
GError *gerror = NULL;
gchar *gpassword;
+
+ *done = FALSE;
if (!available_collection(non_interactive, pool))
return SVN_NO_ERROR;
@@ -129,6 +131,7 @@ password_get_gnome_keyring(svn_boolean_t *done,
NULL);
if (gerror)
{
+ /* ### TODO: return or log the error? */
g_error_free(gerror);
}
else if (gpassword)
@@ -156,6 +159,8 @@ password_set_gnome_keyring(svn_boolean_t *done,
GError *gerror = NULL;
gboolean gstatus;
+ *done = FALSE;
+
if (!available_collection(non_interactive, pool))
return SVN_NO_ERROR;
@@ -170,6 +175,7 @@ password_set_gnome_keyring(svn_boolean_t *done,
NULL);
if (gerror)
{
+ /* ### TODO: return or log the error? */
g_error_free(gerror);
}
else if (gstatus)
diff --git a/subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc.in b/subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc.in
index a768b6d5bb2fd..a787178f4ea76 100644
--- a/subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc.in
+++ b/subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc.in
@@ -6,7 +6,7 @@ includedir=@includedir@
Name: libsvn_auth_gnome_keyring
Description: Subversion GNOME Keyring Library
Version: @PACKAGE_VERSION@
-Requires: apr-@SVN_APR_MAJOR_VERSION@ gnome-keyring-1
-Requires.private: libsvn_subr
+Requires: apr-@SVN_APR_MAJOR_VERSION@
+Requires.private: libsvn_subr @SVN_GNOME_KEYRING_PCLIBS@
Libs: -L${libdir} -lsvn_auth_gnome_keyring
Cflags: -I${includedir}
diff --git a/subversion/libsvn_client/conflicts.c b/subversion/libsvn_client/conflicts.c
index 0fd9a2bbec5e1..f571f3c35324b 100644
--- a/subversion/libsvn_client/conflicts.c
+++ b/subversion/libsvn_client/conflicts.c
@@ -2624,6 +2624,10 @@ conflict_tree_get_details_local_missing(svn_client_conflict_t *conflict,
svn_revnum_t related_peg_rev;
const char *repos_root_url;
const char *repos_uuid;
+ const char *url, *corrected_url;
+ svn_ra_session_t *ra_session;
+ svn_client__pathrev_t *yca_loc;
+ svn_revnum_t end_rev;
SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(
&old_repos_relpath, &old_rev, NULL, conflict,
@@ -2660,51 +2664,62 @@ conflict_tree_get_details_local_missing(svn_client_conflict_t *conflict,
(old_rev < new_rev ? old_repos_relpath : new_repos_relpath),
(old_rev < new_rev ? old_rev : new_rev),
conflict, ctx, scratch_pool, scratch_pool));
-
+
+ /* Set END_REV to our best guess of the nearest YCA revision. */
+ url = svn_path_url_add_component2(repos_root_url, related_repos_relpath,
+ scratch_pool);
+ SVN_ERR(svn_client__open_ra_session_internal(&ra_session,
+ &corrected_url,
+ url, NULL, NULL,
+ FALSE,
+ FALSE,
+ ctx,
+ scratch_pool,
+ scratch_pool));
+ SVN_ERR(find_nearest_yca(&yca_loc, related_repos_relpath, related_peg_rev,
+ parent_repos_relpath, parent_peg_rev,
+ repos_root_url, repos_uuid, ra_session, ctx,
+ scratch_pool, scratch_pool));
+ if (yca_loc)
+ {
+ end_rev = yca_loc->rev;
+
+ /* END_REV must be smaller than PARENT_PEG_REV, else the call to
+ * find_revision_for_suspected_deletion() below will abort. */
+ if (end_rev >= parent_peg_rev)
+ end_rev = parent_peg_rev > 0 ? parent_peg_rev - 1 : 0;
+ }
+ else
+ end_rev = 0; /* ### We might walk through all of history... */
+
SVN_ERR(find_revision_for_suspected_deletion(
&deleted_rev, &deleted_rev_author, &replacing_node_kind, &moves,
conflict, deleted_basename, parent_repos_relpath,
- parent_peg_rev, 0, related_repos_relpath, related_peg_rev,
+ parent_peg_rev, end_rev, related_repos_relpath, related_peg_rev,
ctx, conflict->pool, scratch_pool));
/* If the victim was not deleted then check if the related path was moved. */
if (deleted_rev == SVN_INVALID_REVNUM)
{
const char *victim_abspath;
- svn_ra_session_t *ra_session;
- const char *url, *corrected_url;
- svn_client__pathrev_t *yca_loc;
- svn_revnum_t end_rev;
svn_node_kind_t related_node_kind;
/* ### The following describes all moves in terms of forward-merges,
* should do we something else for reverse-merges? */
victim_abspath = svn_client_conflict_get_local_abspath(conflict);
- url = svn_path_url_add_component2(repos_root_url, related_repos_relpath,
- scratch_pool);
- SVN_ERR(svn_client__open_ra_session_internal(&ra_session,
- &corrected_url,
- url, NULL, NULL,
- FALSE,
- FALSE,
- ctx,
- scratch_pool,
- scratch_pool));
- /* Set END_REV to our best guess of the nearest YCA revision. */
- SVN_ERR(find_nearest_yca(&yca_loc, related_repos_relpath, related_peg_rev,
- parent_repos_relpath, parent_peg_rev,
- repos_root_url, repos_uuid, ra_session, ctx,
- scratch_pool, scratch_pool));
- if (yca_loc == NULL)
- return SVN_NO_ERROR;
- end_rev = yca_loc->rev;
+ if (yca_loc)
+ {
+ end_rev = yca_loc->rev;
- /* END_REV must be smaller than RELATED_PEG_REV, else the call
- to find_moves_in_natural_history() below will error out. */
- if (end_rev >= related_peg_rev)
- end_rev = related_peg_rev > 0 ? related_peg_rev - 1 : 0;
+ /* END_REV must be smaller than RELATED_PEG_REV, else the call
+ to find_moves_in_natural_history() below will error out. */
+ if (end_rev >= related_peg_rev)
+ end_rev = related_peg_rev > 0 ? related_peg_rev - 1 : 0;
+ }
+ else
+ end_rev = 0; /* ### We might walk through all of history... */
SVN_ERR(svn_ra_check_path(ra_session, "", related_peg_rev,
&related_node_kind, scratch_pool));
diff --git a/subversion/libsvn_client/update.c b/subversion/libsvn_client/update.c
index 3895aa29d6580..602f7e317b57d 100644
--- a/subversion/libsvn_client/update.c
+++ b/subversion/libsvn_client/update.c
@@ -182,6 +182,88 @@ record_conflict(svn_wc_conflict_result_t **result,
return SVN_NO_ERROR;
}
+/* Perform post-update processing of externals defined below LOCAL_ABSPATH. */
+static svn_error_t *
+handle_externals(svn_boolean_t *timestamp_sleep,
+ const char *local_abspath,
+ svn_depth_t depth,
+ const char *repos_root_url,
+ svn_ra_session_t *ra_session,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool)
+{
+ apr_hash_t *new_externals;
+ apr_hash_t *new_depths;
+
+ SVN_ERR(svn_wc__externals_gather_definitions(&new_externals,
+ &new_depths,
+ ctx->wc_ctx, local_abspath,
+ depth,
+ scratch_pool, scratch_pool));
+
+ SVN_ERR(svn_client__handle_externals(new_externals,
+ new_depths,
+ repos_root_url, local_abspath,
+ depth, timestamp_sleep, ra_session,
+ ctx, scratch_pool));
+ return SVN_NO_ERROR;
+}
+
+/* Try to reuse the RA session by reparenting it to the anchor_url.
+ * This code is probably overly cautious since we only use this
+ * currently when parents are missing and so all the anchor_urls
+ * have to be in the same repo.
+ * Note that ra_session_p is an (optional) input parameter as well
+ * as an output parameter. */
+static svn_error_t *
+reuse_ra_session(svn_ra_session_t **ra_session_p,
+ const char **corrected_url,
+ const char *anchor_url,
+ const char *anchor_abspath,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_ra_session_t *ra_session = *ra_session_p;
+
+ if (ra_session)
+ {
+ svn_error_t *err = svn_ra_reparent(ra_session, anchor_url, scratch_pool);
+ if (err)
+ {
+ if (err->apr_err == SVN_ERR_RA_ILLEGAL_URL)
+ {
+ /* session changed repos, can't reuse it */
+ svn_error_clear(err);
+ ra_session = NULL;
+ }
+ else
+ {
+ return svn_error_trace(err);
+ }
+ }
+ else
+ {
+ *corrected_url = NULL;
+ }
+ }
+
+ /* Open an RA session for the URL if one isn't already available */
+ if (!ra_session)
+ {
+ SVN_ERR(svn_client__open_ra_session_internal(&ra_session, corrected_url,
+ anchor_url,
+ anchor_abspath, NULL,
+ TRUE /* write_dav_props */,
+ TRUE /* read_dav_props */,
+ ctx,
+ result_pool, scratch_pool));
+ *ra_session_p = ra_session;
+ }
+
+ return SVN_NO_ERROR;
+}
+
/* This is a helper for svn_client__update_internal(), which see for
an explanation of most of these parameters. Some stuff that's
unique is as follows:
@@ -320,6 +402,18 @@ update_internal(svn_revnum_t *result_rev,
ctx->notify_func2, ctx->notify_baton2,
scratch_pool));
+ if (!ignore_externals)
+ {
+ /* We may now be able to remove externals below LOCAL_ABSPATH. */
+ SVN_ERR(reuse_ra_session(ra_session_p, &corrected_url,
+ anchor_url, anchor_abspath,
+ ctx, result_pool, scratch_pool));
+ ra_session = *ra_session_p;
+ SVN_ERR(handle_externals(timestamp_sleep, local_abspath, depth,
+ repos_root_url, ra_session, ctx,
+ scratch_pool));
+ }
+
/* Target excluded, we are done now */
return SVN_NO_ERROR;
}
@@ -373,44 +467,9 @@ update_internal(svn_revnum_t *result_rev,
ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool);
}
- /* Try to reuse the RA session by reparenting it to the anchor_url.
- * This code is probably overly cautious since we only use this
- * currently when parents are missing and so all the anchor_urls
- * have to be in the same repo. */
- if (ra_session)
- {
- svn_error_t *err = svn_ra_reparent(ra_session, anchor_url, scratch_pool);
- if (err)
- {
- if (err->apr_err == SVN_ERR_RA_ILLEGAL_URL)
- {
- /* session changed repos, can't reuse it */
- svn_error_clear(err);
- ra_session = NULL;
- }
- else
- {
- return svn_error_trace(err);
- }
- }
- else
- {
- corrected_url = NULL;
- }
- }
-
- /* Open an RA session for the URL if one isn't already available */
- if (!ra_session)
- {
- SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url,
- anchor_url,
- anchor_abspath, NULL,
- TRUE /* write_dav_props */,
- TRUE /* read_dav_props */,
- ctx,
- result_pool, scratch_pool));
- *ra_session_p = ra_session;
- }
+ SVN_ERR(reuse_ra_session(ra_session_p, &corrected_url, anchor_url,
+ anchor_abspath, ctx, result_pool, scratch_pool));
+ ra_session = *ra_session_p;
/* If we got a corrected URL from the RA subsystem, we'll need to
relocate our working copy first. */
@@ -513,19 +572,8 @@ update_internal(svn_revnum_t *result_rev,
if ((SVN_DEPTH_IS_RECURSIVE(depth) || cropping_target)
&& (! ignore_externals))
{
- apr_hash_t *new_externals;
- apr_hash_t *new_depths;
- SVN_ERR(svn_wc__externals_gather_definitions(&new_externals,
- &new_depths,
- ctx->wc_ctx, local_abspath,
- depth,
- scratch_pool, scratch_pool));
-
- SVN_ERR(svn_client__handle_externals(new_externals,
- new_depths,
- repos_root_url, local_abspath,
- depth, timestamp_sleep, ra_session,
- ctx, scratch_pool));
+ SVN_ERR(handle_externals(timestamp_sleep, local_abspath, depth,
+ repos_root_url, ra_session, ctx, scratch_pool));
}
/* Let everyone know we're finished here (unless we're asked not to). */
diff --git a/subversion/libsvn_fs_fs/cached_data.c b/subversion/libsvn_fs_fs/cached_data.c
index f8fa2d05bfd68..1bd82481daa62 100644
--- a/subversion/libsvn_fs_fs/cached_data.c
+++ b/subversion/libsvn_fs_fs/cached_data.c
@@ -2103,13 +2103,14 @@ skip_contents(struct rep_read_baton *baton,
/* BATON is of type `rep_read_baton'; read the next *LEN bytes of the
representation and store them in *BUF. Sum as we read and verify
- the MD5 sum at the end. */
+ the MD5 sum at the end. This is a READ_FULL_FN for svn_stream_t. */
static svn_error_t *
rep_read_contents(void *baton,
char *buf,
apr_size_t *len)
{
struct rep_read_baton *rb = baton;
+ apr_size_t len_requested = *len;
/* Get data from the fulltext cache for as long as we can. */
if (rb->fulltext_cache)
@@ -2150,6 +2151,28 @@ rep_read_contents(void *baton,
if (rb->current_fulltext)
svn_stringbuf_appendbytes(rb->current_fulltext, buf, *len);
+ /* This is a FULL_READ_FN so a short read implies EOF and we can
+ verify the length. */
+ rb->off += *len;
+ if (*len < len_requested && rb->off != rb->len)
+ {
+ /* A warning rather than an error to allow the data to be
+ retrieved when the length is wrong but the data is
+ present, i.e. if repository corruption has stored the wrong
+ expanded length. */
+ svn_error_t *err = svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
+ _("Length mismatch while reading representation:"
+ " expected %s,"
+ " got %s"),
+ apr_psprintf(rb->pool, "%" SVN_FILESIZE_T_FMT,
+ rb->len),
+ apr_psprintf(rb->pool, "%" SVN_FILESIZE_T_FMT,
+ rb->off));
+
+ rb->fs->warning(rb->fs->warning_baton, err);
+ svn_error_clear(err);
+ }
+
/* Perform checksumming. We want to check the checksum as soon as
the last byte of data is read, in case the caller never performs
a short read, but we don't want to finalize the MD5 context
@@ -2157,7 +2180,6 @@ rep_read_contents(void *baton,
if (!rb->checksum_finalized)
{
SVN_ERR(svn_checksum_update(rb->md5_checksum_ctx, buf, *len));
- rb->off += *len;
if (rb->off == rb->len)
{
svn_checksum_t *md5_checksum;
diff --git a/subversion/libsvn_repos/authz_parse.c b/subversion/libsvn_repos/authz_parse.c
index 23612dedd4903..8b5893ea576a7 100644
--- a/subversion/libsvn_repos/authz_parse.c
+++ b/subversion/libsvn_repos/authz_parse.c
@@ -1058,14 +1058,15 @@ expand_group_callback(void *baton,
else
{
/* Recursively expand the group membership */
- members = svn_hash_gets(cb->parsed_groups, member);
- if (!members)
+ apr_array_header_t *member_members
+ = svn_hash_gets(cb->parsed_groups, member);
+ if (!member_members)
return svn_error_createf(
SVN_ERR_AUTHZ_INVALID_CONFIG, NULL,
_("Undefined group '%s'"),
member);
SVN_ERR(expand_group_callback(cb, key, klen,
- members, scratch_pool));
+ member_members, scratch_pool));
}
}
return SVN_NO_ERROR;
diff --git a/subversion/libsvn_subr/io.c b/subversion/libsvn_subr/io.c
index 8c4f26760507e..a1bc29c09b7f2 100644
--- a/subversion/libsvn_subr/io.c
+++ b/subversion/libsvn_subr/io.c
@@ -342,8 +342,13 @@ io_check_path(const char *path,
/* Not using svn_io_stat() here because we want to check the
apr_err return explicitly. */
SVN_ERR(cstring_from_utf8(&path_apr, path, pool));
-
+#ifdef WIN32
+ /* on Windows, svn does not handle reparse points or hard links.
+ So ignore the 'resolve_symlinks' flag. */
+ flags = APR_FINFO_MIN;
+#else
flags = resolve_symlinks ? APR_FINFO_MIN : (APR_FINFO_MIN | APR_FINFO_LINK);
+#endif
apr_err = apr_stat(&finfo, path_apr, flags, pool);
if (APR_STATUS_IS_ENOENT(apr_err))
diff --git a/subversion/libsvn_wc/wc-checks.h b/subversion/libsvn_wc/wc-checks.h
index c1d356ced965d..bb9e5493a3679 100644
--- a/subversion/libsvn_wc/wc-checks.h
+++ b/subversion/libsvn_wc/wc-checks.h
@@ -1,4 +1,4 @@
-/* This file is automatically generated from wc-checks.sql and /opt/svnrm/tempdir/subversion-1.10.0/subversion/libsvn_wc/token-map.h.
+/* This file is automatically generated from wc-checks.sql and /opt/svnrm/tempdir/subversion-1.10.2/subversion/libsvn_wc/token-map.h.
* Do not edit this file -- edit the source and rerun gen-make.py */
#define STMT_VERIFICATION_TRIGGERS 0
diff --git a/subversion/libsvn_wc/wc-metadata.h b/subversion/libsvn_wc/wc-metadata.h
index 98064242d706b..7c7c78b45a457 100644
--- a/subversion/libsvn_wc/wc-metadata.h
+++ b/subversion/libsvn_wc/wc-metadata.h
@@ -1,4 +1,4 @@
-/* This file is automatically generated from wc-metadata.sql and /opt/svnrm/tempdir/subversion-1.10.0/subversion/libsvn_wc/token-map.h.
+/* This file is automatically generated from wc-metadata.sql and /opt/svnrm/tempdir/subversion-1.10.2/subversion/libsvn_wc/token-map.h.
* Do not edit this file -- edit the source and rerun gen-make.py */
#define STMT_CREATE_SCHEMA 0
diff --git a/subversion/svn/help-cmd.c b/subversion/svn/help-cmd.c
index fc3558683033f..3d5375c65a3e8 100644
--- a/subversion/svn/help-cmd.c
+++ b/subversion/svn/help-cmd.c
@@ -166,7 +166,7 @@ svn_cl__help(apr_getopt_t *os,
pool);
#endif
}
-#ifdef SVN_HAVE_GNOME_KEYRING
+#if (defined(SVN_HAVE_GNOME_KEYRING) || defined(SVN_HAVE_LIBSECRET))
svn_stringbuf_appendcstr(version_footer, "* Gnome Keyring\n");
#endif
#ifdef SVN_HAVE_GPG_AGENT