You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gb...@apache.org on 2013/10/20 12:11:05 UTC
svn commit: r1533871 [2/2] - in
/subversion/branches/invoke-diff-cmd-feature: ./ build/win32/
subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversion/javahl/
subversion/bindings/javahl/src/org/apache/subversion/javahl/ca...
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_fs_fs/tree.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_fs_fs/tree.c Sun Oct 20 10:11:04 2013
@@ -1241,15 +1241,14 @@ get_dag(dag_node_t **dag_node_p,
if (! node)
{
- /* Canonicalize the input PATH. */
- if (! svn_fs__is_canonical_abspath(path))
- {
- path = svn_fs__canonicalize_abspath(path, pool);
-
- /* Try again with the corrected path. */
- SVN_ERR(dag_node_cache_get(&node, root, path, needs_lock_cache,
- pool));
- }
+ /* Canonicalize the input PATH. As it turns out, >95% of all paths
+ * seen here during e.g. svnadmin verify are non-canonical, i.e.
+ * miss the leading '/'. Unconditional canonicalization has a net
+ * performance benefit over previously checking path for being
+ * canonical. */
+ path = svn_fs__canonicalize_abspath(path, pool);
+ SVN_ERR(dag_node_cache_get(&node, root, path, needs_lock_cache,
+ pool));
if (! node)
{
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_ra_svn/client.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_ra_svn/client.c Sun Oct 20 10:11:04 2013
@@ -564,8 +564,8 @@ static svn_error_t *parse_url(const char
/* This structure is used as a baton for the pool cleanup function to
store tunnel parameters used by the close-tunnel callback. */
struct tunnel_data_t {
+ void *tunnel_context;
void *tunnel_baton;
- void *open_baton;
const char *tunnel_name;
const char *user;
const char *hostname;
@@ -578,7 +578,7 @@ static apr_status_t close_tunnel_cleanup
{
const struct tunnel_data_t *const td = baton;
svn_error_t *const err =
- svn_error_root_cause(td->close_tunnel(td->tunnel_baton, td->open_baton,
+ svn_error_root_cause(td->close_tunnel(td->tunnel_context, td->tunnel_baton,
td->tunnel_name, td->user,
td->hostname, td->port));
const apr_status_t ret = (err ? err->apr_err : 0);
@@ -625,27 +625,28 @@ static svn_error_t *open_session(svn_ra_
if (tunnel_name)
{
- if (!callbacks->open_tunnel)
+ if (tunnel_argv)
SVN_ERR(make_tunnel(tunnel_argv, &conn, pool));
else
{
- void *tunnel_baton;
+ void *tunnel_context;
apr_file_t *request;
apr_file_t *response;
- SVN_ERR(callbacks->open_tunnel(&request, &response, &tunnel_baton,
- callbacks_baton, tunnel_name,
- uri->user, uri->hostname, uri->port,
- pool));
- if (callbacks->close_tunnel)
+ SVN_ERR(callbacks->open_tunnel_func(
+ &request, &response, &tunnel_context,
+ callbacks->tunnel_baton, tunnel_name,
+ uri->user, uri->hostname, uri->port,
+ pool));
+ if (callbacks->close_tunnel_func)
{
struct tunnel_data_t *const td = apr_palloc(pool, sizeof(*td));
- td->tunnel_baton = tunnel_baton;
- td->open_baton = callbacks_baton;
+ td->tunnel_context = tunnel_context;
+ td->tunnel_baton = callbacks->tunnel_baton;
td->tunnel_name = apr_pstrdup(pool, tunnel_name);
td->user = apr_pstrdup(pool, uri->user);
td->hostname = apr_pstrdup(pool, uri->hostname);
td->port = uri->port;
- td->close_tunnel = callbacks->close_tunnel;
+ td->close_tunnel = callbacks->close_tunnel_func;
apr_pool_cleanup_register(pool, td, close_tunnel_cleanup,
apr_pool_cleanup_null);
}
@@ -798,7 +799,14 @@ static svn_error_t *ra_svn_open(svn_ra_s
parse_tunnel(url, &tunnel, pool);
- if (tunnel && !callbacks->open_tunnel)
+ /* Use the default tunnel implementation if we got a tunnel name,
+ but either do not have tunnel handler callbacks installed, or
+ the handlers don't like the tunnel name. */
+ if (tunnel
+ && (!callbacks->open_tunnel_func
+ || (callbacks->check_tunnel_func && callbacks->open_tunnel_func
+ && !callbacks->check_tunnel_func(callbacks->tunnel_baton,
+ tunnel))))
SVN_ERR(find_tunnel_agent(tunnel, uri.hostinfo, &tunnel_argv, config,
pool));
else
@@ -1332,7 +1340,14 @@ static svn_error_t *ra_svn_get_dir(svn_r
SVN_ERR(svn_ra_svn__parse_tuple(elt->u.list, pool, "cwnbr(?c)(?c)",
&name, &kind, &size, &has_props,
&crev, &cdate, &cauthor));
- name = svn_relpath_canonicalize(name, pool);
+
+ /* Nothing to sanitize here. Any multi-segment path is simply
+ illegal in the hash returned by svn_ra_get_dir2. */
+ if (strchr(name, '/'))
+ return svn_error_createf(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
+ _("Invalid directory entry name '%s'"),
+ name);
+
dirent = svn_dirent_create(pool);
dirent->kind = svn_node_kind_from_word(kind);
dirent->size = size;/* FIXME: svn_filesize_t */
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_ra_svn/marshal.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_ra_svn/marshal.c Sun Oct 20 10:11:04 2013
@@ -119,6 +119,16 @@ svn_ra_svn_conn_t *svn_ra_svn_create_con
&& apr_sockaddr_ip_get(&conn->remote_ip, sa) == APR_SUCCESS))
conn->remote_ip = NULL;
svn_ra_svn__stream_timeout(conn->stream, get_timeout(conn));
+
+ /* We are using large r/w buffers already.
+ * So, once we decide to actually send data, we want it to go over
+ * the wire a.s.a.p.. So disable Nagle's algorithm.
+ *
+ * We ignore the result of this call since it safe to continue even
+ * if we keep delaying. The only negative effect is increased
+ * latency (can be additional 5 .. 10ms depending on circumstances).
+ */
+ apr_socket_opt_set(sock, APR_TCP_NODELAY, 1);
}
else
{
@@ -1017,7 +1027,7 @@ static svn_error_t *read_string(svn_ra_s
/* Given the first non-whitespace character FIRST_CHAR, read an item
* into the already allocated structure ITEM. LEVEL should be set
- * to 0 for the first call and is used to enforce a recurssion limit
+ * to 0 for the first call and is used to enforce a recursion limit
* on the parser. */
static svn_error_t *read_item(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
svn_ra_svn_item_t *item, char first_char,
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_repos/authz.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_repos/authz.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_repos/authz.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_repos/authz.c Sun Oct 20 10:11:04 2013
@@ -36,6 +36,7 @@
#include "svn_config.h"
#include "svn_ctype.h"
#include "private/svn_fspath.h"
+#include "private/svn_repos_private.h"
#include "repos.h"
@@ -854,23 +855,9 @@ authz_retrieve_config_repo(svn_config_t
return SVN_NO_ERROR;
}
-/* Given a PATH which might be a relative repo URL (^/), an absolute
- * local repo URL (file://), an absolute path outside of the repo
- * or a location in the Windows registry.
- *
- * Retrieve the configuration data that PATH points at and parse it into
- * CFG_P allocated in POOL.
- *
- * If PATH cannot be parsed as a config file then an error is returned. The
- * contents of CFG_P is then undefined. If MUST_EXIST is TRUE, a missing
- * authz file is also an error.
- *
- * REPOS_ROOT points at the root of the repos you are
- * going to apply the authz against, can be NULL if you are sure that you
- * don't have a repos relative URL in PATH. */
-static svn_error_t *
-authz_retrieve_config(svn_config_t **cfg_p, const char *path,
- svn_boolean_t must_exist, apr_pool_t *pool)
+svn_error_t *
+svn_repos__retrieve_config(svn_config_t **cfg_p, const char *path,
+ svn_boolean_t must_exist, apr_pool_t *pool)
{
if (svn_path_is_url(path))
{
@@ -943,7 +930,7 @@ svn_repos__authz_read(svn_authz_t **auth
/* Load the authz file */
if (accept_urls)
- SVN_ERR(authz_retrieve_config(&authz->cfg, path, must_exist, pool));
+ SVN_ERR(svn_repos__retrieve_config(&authz->cfg, path, must_exist, pool));
else
SVN_ERR(svn_config_read3(&authz->cfg, path, must_exist, TRUE, TRUE, pool));
@@ -954,8 +941,8 @@ svn_repos__authz_read(svn_authz_t **auth
/* Load the groups file */
if (accept_urls)
- SVN_ERR(authz_retrieve_config(&groups_cfg, groups_path, must_exist,
- pool));
+ SVN_ERR(svn_repos__retrieve_config(&groups_cfg, groups_path,
+ must_exist, pool));
else
SVN_ERR(svn_config_read3(&groups_cfg, groups_path, must_exist,
TRUE, TRUE, pool));
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_repos/dump.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_repos/dump.c Sun Oct 20 10:11:04 2013
@@ -1313,7 +1313,7 @@ verify_directory_entry(void *baton, cons
type defined in the DIRENT. */
if (db->edit_baton->verified_dirents_cache)
{
- svn_node_kind_t kind;
+ svn_node_kind_t *kind;
svn_boolean_t found;
unparsed_id = svn_fs_unparse_id(dirent->id, pool);
@@ -1323,7 +1323,7 @@ verify_directory_entry(void *baton, cons
if (found)
{
- if (kind == dirent->kind)
+ if (*kind == dirent->kind)
return SVN_NO_ERROR;
else
{
@@ -1333,7 +1333,7 @@ verify_directory_entry(void *baton, cons
svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
_("Unexpected node kind %d for '%s'. "
"Expected kind was %d."),
- dirent->kind, path, kind);
+ dirent->kind, path, *kind);
}
}
}
@@ -1494,7 +1494,7 @@ deserialize_node_kind(void **out,
apr_size_t data_len,
apr_pool_t *pool)
{
- *(svn_node_kind_t *)out = *(svn_node_kind_t *)data;
+ *out = data;
return SVN_NO_ERROR;
}
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/config.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/config.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/config.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/config.c Sun Oct 20 10:11:04 2013
@@ -23,6 +23,8 @@
+#include <assert.h>
+
#define APR_WANT_STRFUNC
#define APR_WANT_MEMFUNC
#include <apr_want.h>
@@ -93,6 +95,7 @@ svn_config_create2(svn_config_t **cfgp,
cfg->tmp_value = svn_stringbuf_create_empty(result_pool);
cfg->section_names_case_sensitive = section_names_case_sensitive;
cfg->option_names_case_sensitive = option_names_case_sensitive;
+ cfg->read_only = FALSE;
*cfgp = cfg;
return SVN_NO_ERROR;
@@ -484,7 +487,13 @@ make_string_from_option(const char **val
*/
if (opt->value && strchr(opt->value, '%'))
{
- apr_pool_t *tmp_pool = (x_pool ? x_pool : svn_pool_create(cfg->x_pool));
+ apr_pool_t *tmp_pool;
+
+ /* setting read-only mode should have expanded all values
+ * automatically. */
+ assert(!cfg->read_only);
+
+ tmp_pool = (x_pool ? x_pool : svn_pool_create(cfg->x_pool));
expand_option_value(cfg, section, opt->value, &opt->x_value, tmp_pool);
opt->expanded = TRUE;
@@ -687,6 +696,15 @@ svn_config_set(svn_config_t *cfg,
cfg_section_t *sec;
cfg_option_t *opt;
+ /* Ignore write attempts to r/o configurations.
+ *
+ * Since we should never try to modify r/o data, trigger an assertion
+ * in debug mode.
+ */
+ assert(!cfg->read_only);
+ if (cfg->read_only)
+ return;
+
remove_expansions(cfg);
opt = find_option(cfg, section, option, &sec);
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/config_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/config_file.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/config_file.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/config_file.c Sun Oct 20 10:11:04 2013
@@ -37,6 +37,7 @@
#include "svn_ctype.h"
#include "svn_private_config.h"
+#include "private/svn_subr_private.h"
#ifdef __HAIKU__
# include <FindDirectory.h>
@@ -418,9 +419,48 @@ svn_config__sys_config_path(const char *
return SVN_NO_ERROR;
}
+/* Callback for svn_config_enumerate2: Continue to next value. */
+static svn_boolean_t
+expand_value(const char *name,
+ const char *value,
+ void *baton,
+ apr_pool_t *pool)
+{
+ return TRUE;
+}
+
+/* Callback for svn_config_enumerate_sections2:
+ * Enumerate and implicitly expand all values in this section.
+ */
+static svn_boolean_t
+expand_values_in_section(const char *name,
+ void *baton,
+ apr_pool_t *pool)
+{
+ svn_config_t *cfg = baton;
+ svn_config_enumerate2(cfg, name, expand_value, NULL, pool);
+
+ return TRUE;
+}
+
/*** Exported interfaces. ***/
+void
+svn_config__set_read_only(svn_config_t *cfg,
+ apr_pool_t *scratch_pool)
+{
+ /* expand all items such that later calls to getters won't need to
+ * change internal state */
+ svn_config_enumerate_sections2(cfg, expand_values_in_section,
+ cfg, scratch_pool);
+
+ /* now, any modification attempt will be ignored / trigger an assertion
+ * in debug mode */
+ cfg->read_only = TRUE;
+}
+
+
svn_error_t *
svn_config__parse_file(svn_config_t *cfg, const char *file,
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/config_impl.h
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/config_impl.h?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/config_impl.h (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/config_impl.h Sun Oct 20 10:11:04 2013
@@ -70,8 +70,11 @@ struct svn_config_t
/* Specifies whether option names are populated case sensitively. */
svn_boolean_t option_names_case_sensitive;
-};
+ /* When set, all modification attempts will be ignored.
+ * In debug mode, we will trigger an assertion. */
+ svn_boolean_t read_only;
+};
/* Read sections and options from a file. */
svn_error_t *svn_config__parse_file(svn_config_t *cfg,
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/file.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/file.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/file.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/file.c Sun Oct 20 10:11:04 2013
@@ -184,7 +184,7 @@ reclaim_shared_handle(shared_handle_pool
shared_handle_t *) = NULL;
/* implicitly closes the file */
- apr_pool_clear(result->pool);
+ svn_pool_clear(result->pool);
return result;
}
@@ -331,7 +331,7 @@ close_handle(shared_handle_pool_t *handl
shared_handle_t *handle)
{
/* implicitly closes the file */
- apr_pool_clear(handle->pool);
+ svn_pool_clear(handle->pool);
handle_pool->last_open = handle->previous;
handle->next = handle_pool->first_unused;
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/prefix_string.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/prefix_string.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/prefix_string.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/prefix_string.c Sun Oct 20 10:11:04 2013
@@ -219,7 +219,7 @@ svn_prefix_string__create(svn_prefix_tre
new_node->sub_nodes = apr_palloc(tree->pool, sizeof(node_t *));
new_node->sub_nodes[0] = sub_node;
- memcpy(sub_node->key.data, sub_node->key.data + match, 8 - match);
+ memmove(sub_node->key.data, sub_node->key.data + match, 8 - match);
/* replace old sub-node with new one and continue lookup */
sub_node->key.prefix = new_node;
Propchange: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/root_pools.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/stream.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/stream.c Sun Oct 20 10:11:04 2013
@@ -1379,6 +1379,36 @@ svn_stream_checksummed(svn_stream_t *str
/* Miscellaneous stream functions. */
+
+svn_error_t *
+svn_stringbuf_from_stream(svn_stringbuf_t **str,
+ svn_stream_t *stream,
+ apr_size_t len_hint,
+ apr_pool_t *pool)
+{
+#define MIN_READ_SIZE 64
+
+ apr_size_t to_read = 0;
+ svn_stringbuf_t *text
+ = svn_stringbuf_create_ensure(len_hint ? len_hint : MIN_READ_SIZE, pool);
+
+ do
+ {
+ to_read = text->blocksize - 1 - text->len;
+ SVN_ERR(svn_stream_read(stream, text->data + text->len, &to_read));
+ text->len += to_read;
+
+ if (to_read && text->blocksize < text->len + MIN_READ_SIZE)
+ svn_stringbuf_ensure(text, text->blocksize * 2);
+ }
+ while (to_read);
+
+ text->data[text->len] = '\0';
+ *str = text;
+
+ return SVN_NO_ERROR;
+}
+
struct stringbuf_stream_baton
{
svn_stringbuf_t *str;
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/string.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/string.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/string.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/string.c Sun Oct 20 10:11:04 2013
@@ -53,9 +53,9 @@ membuf_create(void **data, apr_size_t *s
/* apr_palloc will allocate multiples of 8.
* Thus, we would waste some of that memory if we stuck to the
* smaller size. Note that this is safe even if apr_palloc would
- * use some other aligment or none at all. */
+ * use some other alignment or none at all. */
minimum_size = APR_ALIGN_DEFAULT(minimum_size);
- *data = (!minimum_size ? NULL : apr_palloc(pool, minimum_size));
+ *data = apr_palloc(pool, minimum_size);
*size = minimum_size;
}
@@ -121,7 +121,10 @@ svn_membuf__resize(svn_membuf_t *membuf,
const apr_size_t old_size = membuf->size;
membuf_ensure(&membuf->data, &membuf->size, size, membuf->pool);
- if (membuf->data && old_data && old_data != membuf->data)
+
+ /* If we re-allocated MEMBUF->DATA, it cannot be NULL.
+ * Statically initialized membuffers (OLD_DATA) may be NULL, though. */
+ if (old_data && old_data != membuf->data)
memcpy(membuf->data, old_data, old_size);
}
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/time.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/time.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/time.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/time.c Sun Oct 20 10:11:04 2013
@@ -34,6 +34,8 @@
#include "svn_error.h"
#include "svn_private_config.h"
+#include "private/svn_string_private.h"
+
/*** Code. ***/
@@ -82,7 +84,7 @@
/* Machine parseable part, generated by apr_snprintf. */
#define HUMAN_TIMESTAMP_FORMAT "%.4d-%.2d-%.2d %.2d:%.2d:%.2d %+.2d%.2d"
/* Human explanatory part, generated by apr_strftime as "Sat, 01 Jan 2000" */
-#define human_timestamp_format_suffix _(" (%a, %d %b %Y)")
+#define HUMAN_TIMESTAMP_FORMAT_SUFFIX _(" (%a, %d %b %Y)")
const char *
svn_time_to_cstring(apr_time_t when, apr_pool_t *pool)
@@ -135,24 +137,24 @@ svn_time_from_cstring(apr_time_t *when,
apr_time_exp_t exploded_time;
apr_status_t apr_err;
char wday[4], month[4];
- char *c;
+ const char *c;
/* Open-code parsing of the new timestamp format, as this
is a hot path for reading the entries file. This format looks
like: "2001-08-31T04:24:14.966996Z" */
- exploded_time.tm_year = (apr_int32_t) strtol(data, &c, 10);
+ exploded_time.tm_year = (apr_int32_t) svn__strtoul(data, &c);
if (*c++ != '-') goto fail;
- exploded_time.tm_mon = (apr_int32_t) strtol(c, &c, 10);
+ exploded_time.tm_mon = (apr_int32_t) svn__strtoul(c, &c);
if (*c++ != '-') goto fail;
- exploded_time.tm_mday = (apr_int32_t) strtol(c, &c, 10);
+ exploded_time.tm_mday = (apr_int32_t) svn__strtoul(c, &c);
if (*c++ != 'T') goto fail;
- exploded_time.tm_hour = (apr_int32_t) strtol(c, &c, 10);
+ exploded_time.tm_hour = (apr_int32_t) svn__strtoul(c, &c);
if (*c++ != ':') goto fail;
- exploded_time.tm_min = (apr_int32_t) strtol(c, &c, 10);
+ exploded_time.tm_min = (apr_int32_t) svn__strtoul(c, &c);
if (*c++ != ':') goto fail;
- exploded_time.tm_sec = (apr_int32_t) strtol(c, &c, 10);
+ exploded_time.tm_sec = (apr_int32_t) svn__strtoul(c, &c);
if (*c++ != '.') goto fail;
- exploded_time.tm_usec = (apr_int32_t) strtol(c, &c, 10);
+ exploded_time.tm_usec = (apr_int32_t) svn__strtoul(c, &c);
if (*c++ != 'Z') goto fail;
exploded_time.tm_year -= 1900;
@@ -245,7 +247,7 @@ svn_time_to_human_cstring(apr_time_t whe
ret = apr_strftime(human_datestr,
&retlen,
SVN_TIME__MAX_LENGTH - len,
- human_timestamp_format_suffix,
+ HUMAN_TIMESTAMP_FORMAT_SUFFIX,
&exploded_time);
/* If there was an error, ensure that the string is zero-terminated. */
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/win32_crashrpt.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/win32_crashrpt.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/win32_crashrpt.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/win32_crashrpt.c Sun Oct 20 10:11:04 2013
@@ -427,13 +427,15 @@ write_var_values(PSYMBOL_INFO sym_info,
format_value(value_str, sym_info->ModBase, sym_info->TypeIndex,
(void *)var_data);
- fprintf(log_file, "%s=%s", sym_info->Name, value_str);
+ fprintf(log_file, "%.*s=%s", (int)sym_info->NameLen, sym_info->Name,
+ value_str);
}
if (!log_params && sym_info->Flags & SYMFLAG_LOCAL)
{
format_value(value_str, sym_info->ModBase, sym_info->TypeIndex,
(void *)var_data);
- fprintf(log_file, " %s = %s\n", sym_info->Name, value_str);
+ fprintf(log_file, " %.*s = %s\n", (int)sym_info->NameLen,
+ sym_info->Name, value_str);
}
return TRUE;
@@ -466,8 +468,10 @@ write_function_detail(STACKFRAME64 stack
if (SymFromAddr_(proc, stack_frame.AddrPC.Offset, &func_disp, pIHS))
{
fprintf(log_file,
- "#%d 0x%08I64x in %.200s(",
- nr_of_frame, stack_frame.AddrPC.Offset, pIHS->Name);
+ "#%d 0x%08I64x in %.*s(",
+ nr_of_frame, stack_frame.AddrPC.Offset,
+ pIHS->NameLen > 200 ? 200 : (int)pIHS->NameLen,
+ pIHS->Name);
/* restrict symbol enumeration to this frame only */
ih_stack_frame.InstructionOffset = stack_frame.AddrPC.Offset;
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.c Sun Oct 20 10:11:04 2013
@@ -6560,12 +6560,12 @@ op_revert_recursive_txn(void *baton,
while (have_row)
{
const char *move_src_relpath = svn_sqlite__column_text(stmt, 0, NULL);
- int op_depth = svn_sqlite__column_int(stmt, 2);
+ int move_op_depth = svn_sqlite__column_int(stmt, 2);
svn_error_t *err;
err = svn_wc__db_resolve_break_moved_away_internal(wcroot,
move_src_relpath,
- op_depth,
+ move_op_depth,
scratch_pool);
if (err)
return svn_error_compose_create(err, svn_sqlite__reset(stmt));
Propchange: subversion/branches/invoke-diff-cmd-feature/subversion/svnserve/logger.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: subversion/branches/invoke-diff-cmd-feature/subversion/svnserve/logger.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_ra/ra-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_ra/ra-test.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_ra/ra-test.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_ra/ra-test.c Sun Oct 20 10:11:04 2013
@@ -94,11 +94,23 @@ commit_changes(svn_ra_session_t *session
return SVN_NO_ERROR;
}
+static svn_boolean_t last_tunnel_check;
static int tunnel_open_count;
+static void *check_tunnel_baton;
+static void *open_tunnel_context;
+
+static svn_boolean_t
+check_tunnel(void *tunnel_baton, const char *tunnel_name)
+{
+ if (tunnel_baton != check_tunnel_baton)
+ abort();
+ last_tunnel_check = (0 == strcmp(tunnel_name, "test"));
+ return last_tunnel_check;
+}
static svn_error_t *
open_tunnel(apr_file_t **request, apr_file_t **response,
- void **tunnel_baton, void *callbacks_baton,
+ void **tunnel_context, void *tunnel_baton,
const char *tunnel_name, const char *user,
const char *hostname, int port,
apr_pool_t *pool)
@@ -110,6 +122,8 @@ open_tunnel(apr_file_t **request, apr_fi
const char *args[] = { "svnserve", "-t", "-r", ".", NULL };
const char *svnserve;
+ SVN_TEST_ASSERT(tunnel_baton == check_tunnel_baton);
+
SVN_ERR(svn_dirent_get_absolute(&svnserve, "../../svnserve/svnserve", pool));
#ifdef WIN32
svnserve = apr_pstrcat(pool, svnserve, ".exe", NULL);
@@ -146,16 +160,18 @@ open_tunnel(apr_file_t **request, apr_fi
*request = proc->in;
*response = proc->out;
- *tunnel_baton = NULL;
+ open_tunnel_context = *tunnel_context = &kind;
++tunnel_open_count;
return SVN_NO_ERROR;
}
static svn_error_t *
-close_tunnel(void *tunnel_baton, void *callbacks_baton,
+close_tunnel(void *tunnel_context, void *tunnel_baton,
const char *tunnel_name, const char *user,
const char *hostname, int port)
{
+ SVN_TEST_ASSERT(tunnel_context == open_tunnel_context);
+ SVN_TEST_ASSERT(tunnel_baton == check_tunnel_baton);
--tunnel_open_count;
return SVN_NO_ERROR;
}
@@ -227,6 +243,38 @@ location_segments_test(const svn_test_op
/* Test ra_svn tunnel callbacks. */
+
+static svn_error_t *
+check_tunnel_callback_test(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ svn_ra_callbacks2_t *cbtable;
+ svn_ra_session_t *session;
+ svn_error_t *err;
+
+ SVN_ERR(svn_ra_create_callbacks(&cbtable, pool));
+ cbtable->check_tunnel_func = check_tunnel;
+ cbtable->open_tunnel_func = open_tunnel;
+ cbtable->close_tunnel_func = close_tunnel;
+ cbtable->tunnel_baton = check_tunnel_baton = &cbtable;
+ SVN_ERR(svn_cmdline_create_auth_baton(&cbtable->auth_baton,
+ TRUE /* non_interactive */,
+ "jrandom", "rayjandom",
+ NULL,
+ TRUE /* no_auth_cache */,
+ FALSE /* trust_server_cert */,
+ NULL, NULL, NULL, pool));
+
+ last_tunnel_check = TRUE;
+ open_tunnel_context = NULL;
+ err = svn_ra_open4(&session, NULL, "svn+foo://localhost/no-repo",
+ NULL, cbtable, NULL, NULL, pool);
+ svn_error_clear(err);
+ SVN_TEST_ASSERT(err);
+ SVN_TEST_ASSERT(!last_tunnel_check);
+ return SVN_NO_ERROR;
+}
+
static svn_error_t *
tunel_callback_test(const svn_test_opts_t *opts,
apr_pool_t *pool)
@@ -242,8 +290,10 @@ tunel_callback_test(const svn_test_opts_
url = apr_pstrcat(pool, "svn+test://localhost/", tunnel_repos_name, NULL);
SVN_ERR(svn_ra_create_callbacks(&cbtable, pool));
- cbtable->open_tunnel = open_tunnel;
- cbtable->close_tunnel = close_tunnel;
+ cbtable->check_tunnel_func = check_tunnel;
+ cbtable->open_tunnel_func = open_tunnel;
+ cbtable->close_tunnel_func = close_tunnel;
+ cbtable->tunnel_baton = check_tunnel_baton = &cbtable;
SVN_ERR(svn_cmdline_create_auth_baton(&cbtable->auth_baton,
TRUE /* non_interactive */,
"jrandom", "rayjandom",
@@ -252,6 +302,8 @@ tunel_callback_test(const svn_test_opts_
FALSE /* trust_server_cert */,
NULL, NULL, NULL, pool));
+ last_tunnel_check = FALSE;
+ open_tunnel_context = NULL;
tunnel_open_count = 0;
connection_pool = svn_pool_create(pool);
err = svn_ra_open4(&session, NULL, url, NULL, cbtable, NULL, NULL,
@@ -263,6 +315,7 @@ tunel_callback_test(const svn_test_opts_
return SVN_NO_ERROR;
}
SVN_ERR(err);
+ SVN_TEST_ASSERT(last_tunnel_check);
SVN_TEST_ASSERT(tunnel_open_count > 0);
svn_pool_destroy(connection_pool);
SVN_TEST_ASSERT(tunnel_open_count == 0);
@@ -277,6 +330,8 @@ struct svn_test_descriptor_t test_funcs[
SVN_TEST_NULL,
SVN_TEST_OPTS_PASS(location_segments_test,
"test svn_ra_get_location_segments"),
+ SVN_TEST_OPTS_PASS(check_tunnel_callback_test,
+ "test ra_svn tunnel callback check"),
SVN_TEST_OPTS_PASS(tunel_callback_test,
"test ra_svn tunnel creation callbacks"),
SVN_TEST_NULL
Propchange: subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_subr/root-pools-test.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_subr/stream-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_subr/stream-test.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_subr/stream-test.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_subr/stream-test.c Sun Oct 20 10:11:04 2013
@@ -727,6 +727,50 @@ test_stream_base64_2(apr_pool_t *pool)
return SVN_NO_ERROR;
}
+static svn_error_t *
+test_stringbuf_from_stream(apr_pool_t *pool)
+{
+ const char *test_cases[] =
+ {
+ "",
+ "x",
+ "this string is longer than the default 64 minimum block size used"
+ "by the function under test",
+ NULL
+ };
+
+ const char **test_case;
+ for (test_case = test_cases; *test_case; ++test_case)
+ {
+ svn_stringbuf_t *result1, *result2, *result3, *result4;
+ svn_stringbuf_t *original = svn_stringbuf_create(*test_case, pool);
+
+ svn_stream_t *stream1 = svn_stream_from_stringbuf(original, pool);
+ svn_stream_t *stream2 = svn_stream_from_stringbuf(original, pool);
+
+ SVN_ERR(svn_stringbuf_from_stream(&result1, stream1, 0, pool));
+ SVN_ERR(svn_stringbuf_from_stream(&result2, stream1, 0, pool));
+ SVN_ERR(svn_stringbuf_from_stream(&result3, stream2, original->len,
+ pool));
+ SVN_ERR(svn_stringbuf_from_stream(&result4, stream2, original->len,
+ pool));
+
+ /* C-string contents must match */
+ SVN_TEST_STRING_ASSERT(result1->data, original->data);
+ SVN_TEST_STRING_ASSERT(result2->data, "");
+ SVN_TEST_STRING_ASSERT(result3->data, original->data);
+ SVN_TEST_STRING_ASSERT(result4->data, "");
+
+ /* assumed length must match */
+ SVN_TEST_ASSERT(result1->len == original->len);
+ SVN_TEST_ASSERT(result2->len == 0);
+ SVN_TEST_ASSERT(result3->len == original->len);
+ SVN_TEST_ASSERT(result4->len == 0);
+ }
+
+ return SVN_NO_ERROR;
+}
+
/* The test table. */
struct svn_test_descriptor_t test_funcs[] =
@@ -752,5 +796,7 @@ struct svn_test_descriptor_t test_funcs[
"test base64 encoding/decoding streams"),
SVN_TEST_PASS2(test_stream_base64_2,
"base64 decoding allocation problem"),
+ SVN_TEST_PASS2(test_stringbuf_from_stream,
+ "test svn_stringbuf_from_stream"),
SVN_TEST_NULL
};
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_wc/op-depth-test.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/tests/libsvn_wc/op-depth-test.c Sun Oct 20 10:11:04 2013
@@ -8314,11 +8314,11 @@ move_child_to_parent_revert(const svn_te
}
static svn_error_t *
-move_abspath_more_than_once(const svn_test_opts_t *opts, apr_pool_t *pool)
+move_delete_intermediate(const svn_test_opts_t *opts, apr_pool_t *pool)
{
svn_test__sandbox_t b;
- SVN_ERR(svn_test__sandbox_create(&b, "move_child_to_parent_revert", opts,
+ SVN_ERR(svn_test__sandbox_create(&b, "move_delete_intermediate", opts,
pool));
SVN_ERR(sbox_wc_mkdir(&b, "A"));
@@ -8396,6 +8396,146 @@ move_abspath_more_than_once(const svn_te
{2, "C/A/A", "base-deleted", NO_COPY_FROM},
{2, "C/A/A/A", "base-deleted", NO_COPY_FROM},
+ {0},
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* Ok, now we are in the very ugly case where A/A/A is moved away 3 times */
+
+ /* Let's delete A */
+ SVN_ERR(sbox_wc_delete(&b, "A"));
+
+ /* AAA_1 should now be a copy, but AAA_2 and AAA_3 should still be moves,
+ but now from the original location instead of from "A/A/A" */
+ {
+ nodes_row_t nodes[] = {
+
+ {0, "", "normal", 0, ""},
+
+ {1, "AAA_1", "normal", 1, "A/A/A",},
+ {1, "AAA_1/A", "normal", 1, "A/A/A/A"},
+ {1, "AAA_2", "normal", 1, "B/A/A", MOVED_HERE},
+ {1, "AAA_2/A", "normal", 1, "B/A/A/A", MOVED_HERE},
+ {1, "AAA_3", "normal", 1, "C/A/A", MOVED_HERE},
+ {1, "AAA_3/A", "normal", 1, "C/A/A/A", MOVED_HERE},
+
+ {0, "A", "normal", 1, "A"},
+ {0, "A/A", "normal", 1, "A/A"},
+ {0, "A/A/A", "normal", 1, "A/A/A"},
+ {0, "A/A/A/A", "normal", 1, "A/A/A/A"},
+
+ {0, "B", "normal", 1, "B"},
+ {0, "B/A", "normal", 1, "B/A"},
+ {0, "B/A/A", "normal", 1, "B/A/A"},
+ {0, "B/A/A/A", "normal", 1, "B/A/A/A"},
+
+ {1, "B", "base-deleted", NO_COPY_FROM},
+ {1, "B/A", "base-deleted", NO_COPY_FROM},
+ {1, "B/A/A", "base-deleted", NO_COPY_FROM, "AAA_2"},
+ {1, "B/A/A/A", "base-deleted", NO_COPY_FROM},
+
+ {0, "C", "normal", 1, "C"},
+ {0, "C/A", "normal", 1, "C/A"},
+ {0, "C/A/A", "normal", 1, "C/A/A"},
+ {0, "C/A/A/A", "normal", 1, "C/A/A/A"},
+
+ {2, "C/A", "base-deleted", NO_COPY_FROM},
+ {2, "C/A/A", "base-deleted", NO_COPY_FROM, "AAA_3"},
+ {2, "C/A/A/A", "base-deleted", NO_COPY_FROM},
+
+ {0},
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_revert_intermediate(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "move_revert_intermediate", opts,
+ pool));
+
+ SVN_ERR(sbox_wc_mkdir(&b, "A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/A/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "B"));
+ SVN_ERR(sbox_wc_mkdir(&b, "B/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "B/A/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "B/A/A/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "C"));
+ SVN_ERR(sbox_wc_mkdir(&b, "C/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "C/A/A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "C/A/A/A"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+
+ SVN_ERR(sbox_wc_move(&b, "A/A/A", "AAA_1"));
+
+ SVN_ERR(sbox_wc_delete(&b, "A"));
+ SVN_ERR(sbox_wc_move(&b, "B", "A"));
+
+ SVN_ERR(sbox_wc_move(&b, "A/A/A", "AAA_2"));
+
+ SVN_ERR(sbox_wc_delete(&b, "A/A"));
+ SVN_ERR(sbox_wc_move(&b, "C/A", "A/A"));
+
+ SVN_ERR(sbox_wc_move(&b, "A/A/A", "AAA_3"));
+
+ /* Verify that the move is still recorded correctly */
+ {
+ nodes_row_t nodes[] = {
+
+ {0, "", "normal", 0, ""},
+
+ {1, "AAA_1", "normal", 1, "A/A/A", MOVED_HERE},
+ {1, "AAA_1/A", "normal", 1, "A/A/A/A", MOVED_HERE},
+ {1, "AAA_2", "normal", 1, "B/A/A", MOVED_HERE},
+ {1, "AAA_2/A", "normal", 1, "B/A/A/A", MOVED_HERE},
+ {1, "AAA_3", "normal", 1, "C/A/A", MOVED_HERE},
+ {1, "AAA_3/A", "normal", 1, "C/A/A/A", MOVED_HERE},
+
+ {0, "A", "normal", 1, "A"},
+ {0, "A/A", "normal", 1, "A/A"},
+ {0, "A/A/A", "normal", 1, "A/A/A"},
+ {0, "A/A/A/A", "normal", 1, "A/A/A/A"},
+
+ {1, "A", "normal", 1, "B", MOVED_HERE},
+ {1, "A/A", "normal", 1, "B/A", MOVED_HERE},
+ {1, "A/A/A", "normal", 1, "B/A/A", FALSE, "AAA_1", TRUE},
+ {1, "A/A/A/A", "normal", 1, "B/A/A/A", MOVED_HERE},
+
+ {2, "A/A", "normal", 1, "C/A", MOVED_HERE},
+ {2, "A/A/A", "normal", 1, "C/A/A", FALSE, "AAA_2", TRUE},
+ {2, "A/A/A/A", "normal", 1, "C/A/A/A", MOVED_HERE},
+
+ {3, "A/A/A", "base-deleted", NO_COPY_FROM, "AAA_3"},
+ {3, "A/A/A/A", "base-deleted", NO_COPY_FROM},
+
+ {0, "B", "normal", 1, "B"},
+ {0, "B/A", "normal", 1, "B/A"},
+ {0, "B/A/A", "normal", 1, "B/A/A"},
+ {0, "B/A/A/A", "normal", 1, "B/A/A/A"},
+
+ {1, "B", "base-deleted", NO_COPY_FROM, "A"},
+ {1, "B/A", "base-deleted", NO_COPY_FROM},
+ {1, "B/A/A", "base-deleted", NO_COPY_FROM},
+ {1, "B/A/A/A", "base-deleted", NO_COPY_FROM},
+
+ {0, "C", "normal", 1, "C"},
+ {0, "C/A", "normal", 1, "C/A"},
+ {0, "C/A/A", "normal", 1, "C/A/A"},
+ {0, "C/A/A/A", "normal", 1, "C/A/A/A"},
+
+ {2, "C/A", "base-deleted", NO_COPY_FROM, "A/A"},
+ {2, "C/A/A", "base-deleted", NO_COPY_FROM},
+ {2, "C/A/A/A", "base-deleted", NO_COPY_FROM},
+
+ {0},
};
SVN_ERR(check_db_rows(&b, "", nodes));
}
@@ -8443,6 +8583,7 @@ move_abspath_more_than_once(const svn_te
{2, "C/A/A", "base-deleted", NO_COPY_FROM, "AAA_3"},
{2, "C/A/A/A", "base-deleted", NO_COPY_FROM},
+ {0},
};
SVN_ERR(check_db_rows(&b, "", nodes));
}
@@ -8610,7 +8751,9 @@ struct svn_test_descriptor_t test_funcs[
"copy mixed-rev with mods"),
SVN_TEST_OPTS_PASS(move_child_to_parent_revert,
"move child to parent and revert (issue 4436)"),
- SVN_TEST_OPTS_XFAIL(move_abspath_more_than_once,
- "move one abspath more than once"),
+ SVN_TEST_OPTS_XFAIL(move_delete_intermediate,
+ "move more than once, delete intermediate"),
+ SVN_TEST_OPTS_XFAIL(move_revert_intermediate,
+ "move more than once, revert intermediate"),
SVN_TEST_NULL
};
Modified: subversion/branches/invoke-diff-cmd-feature/tools/client-side/svn-bench/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/tools/client-side/svn-bench/cl.h?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/tools/client-side/svn-bench/cl.h (original)
+++ subversion/branches/invoke-diff-cmd-feature/tools/client-side/svn-bench/cl.h Sun Oct 20 10:11:04 2013
@@ -90,6 +90,7 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t no_revprops; /* retrieve no revprops */
apr_hash_t *revprop_table; /* table of revision properties to get/set */
svn_boolean_t use_merge_history; /* use/display extra merge information */
+ svn_boolean_t auto_moves; /* interpret unique DEL/ADD pairs as moves */
svn_boolean_t trust_server_cert; /* trust server SSL certs that would
otherwise be rejected as "untrusted" */
} svn_cl__opt_state_t;
@@ -107,7 +108,8 @@ svn_opt_subcommand_t
svn_cl__help,
svn_cl__null_export,
svn_cl__null_list,
- svn_cl__null_log;
+ svn_cl__null_log,
+ svn_cl__null_info;
/* See definition in main.c for documentation. */
Modified: subversion/branches/invoke-diff-cmd-feature/tools/client-side/svn-bench/null-log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/tools/client-side/svn-bench/null-log-cmd.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/tools/client-side/svn-bench/null-log-cmd.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/tools/client-side/svn-bench/null-log-cmd.c Sun Oct 20 10:11:04 2013
@@ -140,6 +140,9 @@ svn_cl__null_log(apr_getopt_t *os,
apr_array_header_t *revprops;
svn_opt_revision_t target_peg_revision;
const char *target_path_or_url;
+ svn_move_behavior_t move_behavior = opt_state->auto_moves
+ ? svn_move_behavior_auto_moves
+ : svn_move_behavior_explicit_moves;
SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
opt_state->targets,
@@ -202,13 +205,14 @@ svn_cl__null_log(apr_getopt_t *os,
APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_DATE;
if (!opt_state->quiet)
APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_LOG;
- SVN_ERR(svn_client_log5(targets,
+ SVN_ERR(svn_client_log6(targets,
&target_peg_revision,
opt_state->revision_ranges,
opt_state->limit,
opt_state->verbose,
opt_state->stop_on_copy,
opt_state->use_merge_history,
+ move_behavior,
revprops,
log_entry_receiver,
&lb,
Modified: subversion/branches/invoke-diff-cmd-feature/tools/client-side/svn-bench/svn-bench.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/tools/client-side/svn-bench/svn-bench.c?rev=1533871&r1=1533870&r2=1533871&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/tools/client-side/svn-bench/svn-bench.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/tools/client-side/svn-bench/svn-bench.c Sun Oct 20 10:11:04 2013
@@ -66,7 +66,9 @@ typedef enum svn_cl__longopt_t {
opt_with_revprop,
opt_with_all_revprops,
opt_with_no_revprops,
- opt_trust_server_cert
+ opt_auto_moves,
+ opt_trust_server_cert,
+ opt_changelist
} svn_cl__longopt_t;
@@ -147,6 +149,10 @@ const apr_getopt_option_t svn_cl__option
N_("set revision property ARG in new revision\n"
" "
"using the name[=value] format")},
+ {"auto-moves", opt_auto_moves, 0,
+ N_("attempt to interpret matching unique DEL+ADD\n"
+ " "
+ "pairs as moves")},
{"use-merge-history", 'g', 0,
N_("use/display additional information from merge\n"
" "
@@ -255,10 +261,20 @@ const svn_opt_subcommand_desc2_t svn_cl_
" behavior, which can be useful for determining branchpoints.\n"),
{'r', 'q', 'v', 'g', 'c', opt_targets, opt_stop_on_copy,
'l', opt_with_all_revprops, opt_with_no_revprops, opt_with_revprop,
- 'x',},
+ opt_auto_moves, 'x',},
{{opt_with_revprop, N_("retrieve revision property ARG")},
{'c', N_("the change made in revision ARG")}} },
+ { "null-info", svn_cl__null_info, {0}, N_
+ ("Display information about a local or remote item.\n"
+ "usage: info [TARGET[@REV]...]\n"
+ "\n"
+ " Print information about each TARGET (default: '.').\n"
+ " TARGET may be either a working-copy path or URL. If specified, REV\n"
+ " determines in which revision the target is first looked up.\n"),
+ {'r', 'R', opt_depth, opt_targets, opt_changelist}
+ },
+
{ NULL, NULL, {0}, NULL, {0} }
};
@@ -534,6 +550,9 @@ sub_main(int argc, const char *argv[], a
TRUE, pool);
}
break;
+ case 'R':
+ opt_state.depth = svn_depth_infinity;
+ break;
case 'N':
descend = FALSE;
break;
@@ -618,6 +637,9 @@ sub_main(int argc, const char *argv[], a
case 'g':
opt_state.use_merge_history = TRUE;
break;
+ case opt_auto_moves:
+ opt_state.auto_moves = TRUE;
+ break;
default:
/* Hmmm. Perhaps this would be a good place to squirrel away
opts that commands like svn diff might need. Hmmm indeed. */