You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by as...@apache.org on 2012/11/24 21:29:48 UTC
svn commit: r1413258 [25/33] - in /subversion/branches/compressed-pristines:
./ build/ build/ac-macros/ build/generator/ build/generator/templates/
contrib/client-side/emacs/ contrib/server-side/fsfsfixer/ notes/
notes/directory-index/ subversion/ subv...
Modified: subversion/branches/compressed-pristines/subversion/svn/update-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/svn/update-cmd.c?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/svn/update-cmd.c (original)
+++ subversion/branches/compressed-pristines/subversion/svn/update-cmd.c Sat Nov 24 20:29:11 2012
@@ -110,8 +110,6 @@ svn_cl__update(apr_getopt_t *os,
svn_boolean_t depth_is_sticky;
struct svn_cl__check_externals_failed_notify_baton nwb;
apr_array_header_t *result_revs;
- svn_wc_conflict_resolver_func2_t conflict_func2 = ctx->conflict_func2;
- void *conflict_baton2 = ctx->conflict_baton2;
svn_error_t *err = SVN_NO_ERROR;
svn_error_t *externals_err = SVN_NO_ERROR;
@@ -189,18 +187,11 @@ svn_cl__update(apr_getopt_t *os,
return svn_error_compose_create(externals_err, err);
}
- if (opt_state->conflict_func
- && svn_cl__notifier_check_conflicts(nwb.wrapped_baton))
- {
- ctx->conflict_func2 = conflict_func2;
- ctx->conflict_baton2 = conflict_baton2;
- err = svn_cl__resolve_conflicts(
- svn_cl__notifier_get_conflicted_paths(nwb.wrapped_baton,
- scratch_pool),
- depth, opt_state, ctx, scratch_pool);
- if (err)
- return svn_error_compose_create(externals_err, err);
- }
+ err = svn_cl__resolve_postponed_conflicts(ctx->conflict_baton2,
+ opt_state->depth,
+ opt_state->accept_which,
+ opt_state->editor_cmd,
+ ctx, scratch_pool);
return svn_error_compose_create(externals_err, err);
}
Modified: subversion/branches/compressed-pristines/subversion/svn_private_config.hw
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/svn_private_config.hw?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/svn_private_config.hw (original)
+++ subversion/branches/compressed-pristines/subversion/svn_private_config.hw Sat Nov 24 20:29:11 2012
@@ -83,6 +83,7 @@
#include <libintl.h>
#define _(x) dgettext(PACKAGE_NAME, x)
#define Q_(x1, x2, n) dngettext(PACKAGE_NAME, x1, x2, n)
+#define HAVE_BIND_TEXTDOMAIN_CODESET
#else
#define _(x) (x)
#define Q_(x1, x2, n) (((n) == 1) ? x1 : x2)
Modified: subversion/branches/compressed-pristines/subversion/svnadmin/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/svnadmin/main.c?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/svnadmin/main.c (original)
+++ subversion/branches/compressed-pristines/subversion/svnadmin/main.c Sat Nov 24 20:29:11 2012
@@ -43,6 +43,7 @@
#include "svn_xml.h"
#include "private/svn_opt_private.h"
+#include "private/svn_named_atomic.h"
#include "svn_private_config.h"
@@ -115,7 +116,8 @@ open_repos(svn_repos_t **repos,
apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
APR_HASH_KEY_STRING, "1");
apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS,
- APR_HASH_KEY_STRING, "1");
+ APR_HASH_KEY_STRING,
+ svn_named_atomic__is_efficient() ? "1" : "0");
/* now, open the requested repository */
SVN_ERR(svn_repos_open2(repos, path, fs_config, pool));
@@ -150,6 +152,7 @@ static svn_opt_subcommand_t
subcommand_create,
subcommand_deltify,
subcommand_dump,
+ subcommand_freeze,
subcommand_help,
subcommand_hotcopy,
subcommand_load,
@@ -336,6 +339,11 @@ static const svn_opt_subcommand_desc2_t
"changed in those revisions.)\n"),
{'r', svnadmin__incremental, svnadmin__deltas, 'q', 'M'} },
+ {"freeze", subcommand_freeze, {0}, N_
+ ("usage: svnadmin freeze REPOS_PATH PROGRAM [ARG...]\n\n"
+ "Run PROGRAM passing ARGS while holding a write-lock on REPOS_PATH.\n"),
+ {0} },
+
{"help", subcommand_help, {"?", "h"}, N_
("usage: svnadmin help [SUBCOMMAND...]\n\n"
"Describe the usage of this program or its subcommands.\n"),
@@ -969,6 +977,66 @@ subcommand_dump(apr_getopt_t *os, void *
return SVN_NO_ERROR;
}
+struct freeze_baton_t {
+ const char *command;
+ const char **args;
+ int status;
+};
+
+static svn_error_t *
+freeze_body(void *baton,
+ apr_pool_t *pool)
+{
+ struct freeze_baton_t *b = baton;
+ apr_status_t apr_err;
+ apr_file_t *infile, *outfile, *errfile;
+
+ apr_err = apr_file_open_stdin(&infile, pool);
+ if (apr_err)
+ return svn_error_wrap_apr(apr_err, "Can't open stdin");
+ apr_err = apr_file_open_stdout(&outfile, pool);
+ if (apr_err)
+ return svn_error_wrap_apr(apr_err, "Can't open stdout");
+ apr_err = apr_file_open_stderr(&errfile, pool);
+ if (apr_err)
+ return svn_error_wrap_apr(apr_err, "Can't open stderr");
+
+ SVN_ERR(svn_io_run_cmd(NULL, b->command, b->args, &b->status,
+ NULL, TRUE,
+ infile, outfile, errfile, pool));
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+subcommand_freeze(apr_getopt_t *os, void *baton, apr_pool_t *pool)
+{
+ struct svnadmin_opt_state *opt_state = baton;
+ apr_array_header_t *args;
+ int i;
+ struct freeze_baton_t b;
+
+ SVN_ERR(svn_opt_parse_all_args(&args, os, pool));
+
+ if (!args->nelts)
+ return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, 0,
+ _("No program provided"));
+
+ b.command = APR_ARRAY_IDX(args, 0, const char *);
+ b.args = apr_palloc(pool, sizeof(char *) * args->nelts + 1);
+ for (i = 0; i < args->nelts; ++i)
+ b.args[i] = APR_ARRAY_IDX(args, i, const char *);
+ b.args[args->nelts] = NULL;
+
+ SVN_ERR(svn_repos_freeze(opt_state->repository_path, freeze_body, &b, pool));
+
+ /* Make any non-zero status visible to the user. */
+ if (b.status)
+ exit(b.status);
+
+ return SVN_NO_ERROR;
+}
+
/* This implements `svn_opt_subcommand_t'. */
static svn_error_t *
Modified: subversion/branches/compressed-pristines/subversion/svndumpfilter/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/svndumpfilter/main.c?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/svndumpfilter/main.c (original)
+++ subversion/branches/compressed-pristines/subversion/svndumpfilter/main.c Sat Nov 24 20:29:11 2012
@@ -1526,6 +1526,8 @@ main(int argc, const char *argv[])
{
svn_stringbuf_t *buffer, *buffer_utf8;
const char *utf8_targets_file;
+ apr_array_header_t *targets = apr_array_make(pool, 0,
+ sizeof(const char *));
/* We need to convert to UTF-8 now, even before we divide
the targets into an array, because otherwise we wouldn't
@@ -1538,10 +1540,18 @@ main(int argc, const char *argv[])
pool));
SVN_INT_ERR(svn_utf_stringbuf_to_utf8(&buffer_utf8, buffer, pool));
- opt_state.prefixes = apr_array_append(pool,
- svn_cstring_split(buffer_utf8->data, "\n\r",
- TRUE, pool),
- opt_state.prefixes);
+ targets = apr_array_append(pool,
+ svn_cstring_split(buffer_utf8->data, "\n\r",
+ TRUE, pool),
+ targets);
+
+ for (i = 0; i < targets->nelts; i++)
+ {
+ const char *prefix = APR_ARRAY_IDX(targets, i, const char *);
+ if (prefix[0] != '/')
+ prefix = apr_pstrcat(pool, "/", prefix, (char *)NULL);
+ APR_ARRAY_PUSH(opt_state.prefixes, const char *) = prefix;
+ }
}
if (apr_is_empty_array(opt_state.prefixes))
Modified: subversion/branches/compressed-pristines/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/svnlook/main.c?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/svnlook/main.c (original)
+++ subversion/branches/compressed-pristines/subversion/svnlook/main.c Sat Nov 24 20:29:11 2012
@@ -1792,7 +1792,7 @@ do_plist(svnlook_ctxt_t *c,
if (verbose)
{
if (xml)
- svn_cmdline__print_xml_prop(&sb, pname, propval, pool);
+ svn_cmdline__print_xml_prop(&sb, pname, propval, FALSE, pool);
else
{
const char *pname_stdout;
Modified: subversion/branches/compressed-pristines/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/svnrdump/load_editor.c?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/svnrdump/load_editor.c (original)
+++ subversion/branches/compressed-pristines/subversion/svnrdump/load_editor.c Sat Nov 24 20:29:11 2012
@@ -704,6 +704,7 @@ new_node_record(void **node_baton,
apr_size_t residual_close_count;
apr_array_header_t *residual_open_path;
int i;
+ apr_size_t n;
/* Before attempting to handle the action, call open_directory
for all the path components and set the directory baton
@@ -720,7 +721,7 @@ new_node_record(void **node_baton,
/* First close all as many directories as there are after
skip_ancestor, and then open fresh directories */
- for (i = 0; i < residual_close_count; i ++)
+ for (n = 0; n < residual_close_count; n ++)
{
/* Don't worry about destroying the actual rb->db object,
since the pool we're using has the lifetime of one
Modified: subversion/branches/compressed-pristines/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/svnrdump/svnrdump.c?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/svnrdump/svnrdump.c (original)
+++ subversion/branches/compressed-pristines/subversion/svnrdump/svnrdump.c Sat Nov 24 20:29:11 2012
@@ -270,7 +270,7 @@ init_client_context(svn_client_ctx_t **c
SVN_ERR(svn_ra_initialize(pool));
SVN_ERR(svn_config_ensure(config_dir, pool));
- SVN_ERR(svn_client_create_context(&ctx, pool));
+ SVN_ERR(svn_client_create_context2(&ctx, NULL, pool));
SVN_ERR(svn_config_get_config(&(ctx->config), config_dir, pool));
Modified: subversion/branches/compressed-pristines/subversion/svnserve/cyrus_auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/svnserve/cyrus_auth.c?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/svnserve/cyrus_auth.c (original)
+++ subversion/branches/compressed-pristines/subversion/svnserve/cyrus_auth.c Sat Nov 24 20:29:11 2012
@@ -98,7 +98,7 @@ static int canonicalize_username(sasl_co
static sasl_callback_t callbacks[] =
{
- { SASL_CB_CANON_USER, canonicalize_username, NULL },
+ { SASL_CB_CANON_USER, (void*)canonicalize_username, NULL },
{ SASL_CB_LIST_END, NULL, NULL }
};
Modified: subversion/branches/compressed-pristines/subversion/svnserve/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/svnserve/main.c?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/svnserve/main.c (original)
+++ subversion/branches/compressed-pristines/subversion/svnserve/main.c Sat Nov 24 20:29:11 2012
@@ -149,6 +149,8 @@ void winservice_notify_stop(void)
#define SVNSERVE_OPT_CACHE_FULLTEXTS 266
#define SVNSERVE_OPT_CACHE_REVPROPS 267
#define SVNSERVE_OPT_SINGLE_CONN 268
+#define SVNSERVE_OPT_CLIENT_SPEED 269
+#define SVNSERVE_OPT_VIRTUAL_HOST 270
static const apr_getopt_option_t svnserve__options[] =
{
@@ -235,6 +237,16 @@ static const apr_getopt_option_t svnserv
"Default is no.\n"
" "
"[used for FSFS repositories only]")},
+ {"client-speed", SVNSERVE_OPT_CLIENT_SPEED, 1,
+ N_("Optimize throughput based on the assumption that\n"
+ " "
+ "clients can receive data with a bitrate of at\n"
+ " "
+ "least ARG Gbit/s. For clients receiving data at\n"
+ " "
+ "less than 1 Gbit/s, zero should be used.\n"
+ " "
+ "Default is 0 (optimizations disabled).")},
#ifdef CONNECTION_HAVE_THREAD_OPTION
/* ### Making the assumption here that WIN32 never has fork and so
* ### this option never exists when --service exists. */
@@ -266,6 +278,10 @@ static const apr_getopt_option_t svnserv
" "
"[mode: tunnel]")},
{"help", 'h', 0, N_("display this help")},
+ {"virtual-host", SVNSERVE_OPT_VIRTUAL_HOST, 0,
+ N_("virtual host mode (look for repo in directory\n"
+ " "
+ "of provided hostname)")},
{"version", SVNSERVE_OPT_VERSION, 0,
N_("show program version information")},
{"quiet", 'q', 0,
@@ -492,11 +508,14 @@ int main(int argc, const char *argv[])
params.authzdb = NULL;
params.compression_level = SVN_DELTA_COMPRESSION_LEVEL_DEFAULT;
params.log_file = NULL;
+ params.vhost = FALSE;
params.username_case = CASE_ASIS;
params.memory_cache_size = (apr_uint64_t)-1;
params.cache_fulltexts = TRUE;
params.cache_txdeltas = FALSE;
params.cache_revprops = FALSE;
+ params.zero_copy_limit = 0;
+ params.error_check_interval = 4096;
while (1)
{
@@ -645,6 +664,18 @@ int main(int argc, const char *argv[])
= svn_tristate__from_word(arg) == svn_tristate_true;
break;
+ case SVNSERVE_OPT_CLIENT_SPEED:
+ {
+ apr_size_t bandwidth = (apr_size_t)apr_strtoi64(arg, NULL, 0);
+
+ /* block other clients for at most 1 ms (at full bandwidth) */
+ params.zero_copy_limit = bandwidth * 120000;
+
+ /* check for aborted connections at the same rate */
+ params.error_check_interval = bandwidth * 120000;
+ }
+ break;
+
#ifdef WIN32
case SVNSERVE_OPT_SERVICE:
if (run_mode != run_mode_service)
@@ -669,7 +700,11 @@ int main(int argc, const char *argv[])
pool));
break;
- case SVNSERVE_OPT_LOG_FILE:
+ case SVNSERVE_OPT_VIRTUAL_HOST:
+ params.vhost = TRUE;
+ break;
+
+ case SVNSERVE_OPT_LOG_FILE:
SVN_INT_ERR(svn_utf_cstring_to_utf8(&log_filename, arg, pool));
log_filename = svn_dirent_internal_style(log_filename, pool);
SVN_INT_ERR(svn_dirent_get_absolute(&log_filename, log_filename,
@@ -755,8 +790,10 @@ int main(int argc, const char *argv[])
* the pool cleanup handlers that call sasl_dispose() (connection_pool)
* and sasl_done() (pool) are run in the right order. See issue #3664. */
connection_pool = svn_pool_create(pool);
- conn = svn_ra_svn_create_conn2(NULL, in_file, out_file,
+ conn = svn_ra_svn_create_conn3(NULL, in_file, out_file,
params.compression_level,
+ params.zero_copy_limit,
+ params.error_check_interval,
connection_pool);
svn_error_clear(serve(conn, ¶ms, connection_pool));
exit(0);
@@ -925,7 +962,7 @@ int main(int argc, const char *argv[])
settings.single_threaded = TRUE;
if (handling_mode == connection_mode_thread)
{
-#ifdef APR_HAS_THREADS
+#if APR_HAS_THREADS
settings.single_threaded = FALSE;
#else
/* No requests will be processed at all
@@ -988,8 +1025,10 @@ int main(int argc, const char *argv[])
/* It's not a fatal error if we cannot enable keep-alives. */
}
- conn = svn_ra_svn_create_conn2(usock, NULL, NULL,
+ conn = svn_ra_svn_create_conn3(usock, NULL, NULL,
params.compression_level,
+ params.zero_copy_limit,
+ params.error_check_interval,
connection_pool);
if (run_mode == run_mode_listen_once)
Modified: subversion/branches/compressed-pristines/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/svnserve/serve.c?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/svnserve/serve.c (original)
+++ subversion/branches/compressed-pristines/subversion/svnserve/serve.c Sat Nov 24 20:29:11 2012
@@ -886,13 +886,14 @@ static svn_error_t *accept_report(svn_bo
/* Make an svn_repos report baton. Tell it to drive the network editor
* when the report is complete. */
svn_ra_svn_get_editor(&editor, &edit_baton, conn, pool, NULL, NULL);
- SVN_CMD_ERR(svn_repos_begin_report2(&report_baton, rev, b->repos,
+ SVN_CMD_ERR(svn_repos_begin_report3(&report_baton, rev, b->repos,
b->fs_path->data, target, tgt_path,
text_deltas, depth, ignore_ancestry,
send_copyfrom_args,
editor, edit_baton,
authz_check_access_cb_func(b),
- b, pool));
+ b, svn_ra_svn_zero_copy_limit(conn),
+ pool));
rb.sb = b;
rb.repos_url = svn_path_uri_decode(b->repos_url, pool);
@@ -962,33 +963,52 @@ static svn_error_t *write_lock(svn_ra_sv
}
/* ### This really belongs in libsvn_repos. */
-/* Get the properties for a path, with hardcoded committed-info values. */
-static svn_error_t *get_props(apr_hash_t **props, svn_fs_root_t *root,
- const char *path, apr_pool_t *pool)
-{
- svn_string_t *str;
- svn_revnum_t crev;
- const char *cdate, *cauthor, *uuid;
-
- /* Get the properties. */
- SVN_ERR(svn_fs_node_proplist(props, root, path, pool));
-
- /* Hardcode the values for the committed revision, date, and author. */
- SVN_ERR(svn_repos_get_committed_info(&crev, &cdate, &cauthor, root,
- path, pool));
- str = svn_string_create(apr_psprintf(pool, "%ld", crev),
- pool);
- apr_hash_set(*props, SVN_PROP_ENTRY_COMMITTED_REV, APR_HASH_KEY_STRING, str);
- str = (cdate) ? svn_string_create(cdate, pool) : NULL;
- apr_hash_set(*props, SVN_PROP_ENTRY_COMMITTED_DATE, APR_HASH_KEY_STRING,
- str);
- str = (cauthor) ? svn_string_create(cauthor, pool) : NULL;
- apr_hash_set(*props, SVN_PROP_ENTRY_LAST_AUTHOR, APR_HASH_KEY_STRING, str);
-
- /* Hardcode the values for the UUID. */
- SVN_ERR(svn_fs_get_uuid(svn_fs_root_fs(root), &uuid, pool));
- str = (uuid) ? svn_string_create(uuid, pool) : NULL;
- apr_hash_set(*props, SVN_PROP_ENTRY_UUID, APR_HASH_KEY_STRING, str);
+/* Get the explicit properties and/or inherited properties for a PATH in
+ ROOT, with hardcoded committed-info values. */
+static svn_error_t *
+get_props(apr_hash_t **props,
+ apr_array_header_t **iprops,
+ server_baton_t *b,
+ svn_fs_root_t *root,
+ const char *path,
+ apr_pool_t *pool)
+{
+ /* Get the explicit properties. */
+ if (props)
+ {
+ svn_string_t *str;
+ svn_revnum_t crev;
+ const char *cdate, *cauthor, *uuid;
+
+ SVN_ERR(svn_fs_node_proplist(props, root, path, pool));
+
+ /* Hardcode the values for the committed revision, date, and author. */
+ SVN_ERR(svn_repos_get_committed_info(&crev, &cdate, &cauthor, root,
+ path, pool));
+ str = svn_string_create(apr_psprintf(pool, "%ld", crev),
+ pool);
+ apr_hash_set(*props, SVN_PROP_ENTRY_COMMITTED_REV, APR_HASH_KEY_STRING,
+ str);
+ str = (cdate) ? svn_string_create(cdate, pool) : NULL;
+ apr_hash_set(*props, SVN_PROP_ENTRY_COMMITTED_DATE, APR_HASH_KEY_STRING,
+ str);
+ str = (cauthor) ? svn_string_create(cauthor, pool) : NULL;
+ apr_hash_set(*props, SVN_PROP_ENTRY_LAST_AUTHOR, APR_HASH_KEY_STRING,
+ str);
+
+ /* Hardcode the values for the UUID. */
+ SVN_ERR(svn_fs_get_uuid(svn_fs_root_fs(root), &uuid, pool));
+ str = (uuid) ? svn_string_create(uuid, pool) : NULL;
+ apr_hash_set(*props, SVN_PROP_ENTRY_UUID, APR_HASH_KEY_STRING, str);
+ }
+
+ /* Get any inherited properties the user is authorized to. */
+ if (iprops)
+ {
+ SVN_ERR(svn_repos_fs_get_inherited_props(iprops, root, path,
+ authz_check_access_cb_func(b),
+ b, pool, pool));
+ }
return SVN_NO_ERROR;
}
@@ -1390,16 +1410,20 @@ static svn_error_t *get_file(svn_ra_svn_
svn_fs_root_t *root;
svn_stream_t *contents;
apr_hash_t *props = NULL;
+ apr_array_header_t *inherited_props;
svn_string_t write_str;
char buf[4096];
apr_size_t len;
svn_boolean_t want_props, want_contents;
+ apr_uint64_t wants_inherited_props;
svn_checksum_t *checksum;
svn_error_t *err, *write_err;
+ int i;
/* Parse arguments. */
- SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)bb", &path, &rev,
- &want_props, &want_contents));
+ SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)bb?B", &path, &rev,
+ &want_props, &want_contents,
+ &wants_inherited_props));
full_path = svn_fspath__join(b->fs_path->data,
svn_relpath_canonicalize(path, pool), pool);
@@ -1420,8 +1444,9 @@ static svn_error_t *get_file(svn_ra_svn_
SVN_CMD_ERR(svn_fs_file_checksum(&checksum, svn_checksum_md5, root,
full_path, TRUE, pool));
hex_digest = svn_checksum_to_cstring_display(checksum, pool);
- if (want_props)
- SVN_CMD_ERR(get_props(&props, root, full_path, pool));
+ if (want_props || wants_inherited_props)
+ SVN_CMD_ERR(get_props(&props, &inherited_props, b, root, full_path,
+ pool));
if (want_contents)
SVN_CMD_ERR(svn_fs_file_contents(&contents, root, full_path, pool));
@@ -1429,6 +1454,27 @@ static svn_error_t *get_file(svn_ra_svn_
SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w((?c)r(!", "success",
hex_digest, rev));
SVN_ERR(svn_ra_svn_write_proplist(conn, pool, props));
+
+ if (wants_inherited_props)
+ {
+ apr_pool_t *iterpool = svn_pool_create(pool);
+
+ SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)(?!"));
+ for (i = 0; i < inherited_props->nelts; i++)
+ {
+ svn_prop_inherited_item_t *iprop =
+ APR_ARRAY_IDX(inherited_props, i, svn_prop_inherited_item_t *);
+
+ svn_pool_clear(iterpool);
+ SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!(c(!",
+ iprop->path_or_url));
+ SVN_ERR(svn_ra_svn_write_proplist(conn, iterpool, iprop->prop_hash));
+ SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!))!",
+ iprop->path_or_url));
+ }
+ svn_pool_destroy(iterpool);
+ }
+
SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));
/* Now send the file's contents. */
@@ -1473,17 +1519,21 @@ static svn_error_t *get_dir(svn_ra_svn_c
const char *path, *full_path;
svn_revnum_t rev;
apr_hash_t *entries, *props = NULL;
+ apr_array_header_t *inherited_props;
apr_hash_index_t *hi;
svn_fs_root_t *root;
apr_pool_t *subpool;
svn_boolean_t want_props, want_contents;
+ apr_uint64_t wants_inherited_props;
apr_uint64_t dirent_fields;
apr_array_header_t *dirent_fields_list = NULL;
svn_ra_svn_item_t *elt;
+ int i;
- SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)bb?l", &path, &rev,
+ SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)bb?l?B", &path, &rev,
&want_props, &want_contents,
- &dirent_fields_list));
+ &dirent_fields_list,
+ &wants_inherited_props));
if (! dirent_fields_list)
{
@@ -1491,8 +1541,6 @@ static svn_error_t *get_dir(svn_ra_svn_c
}
else
{
- int i;
-
dirent_fields = 0;
for (i = 0; i < dirent_fields_list->nelts; ++i)
@@ -1536,9 +1584,11 @@ static svn_error_t *get_dir(svn_ra_svn_c
/* Fetch the root of the appropriate revision. */
SVN_CMD_ERR(svn_fs_revision_root(&root, b->fs, rev, pool));
- /* Fetch the directory properties if requested. */
- if (want_props)
- SVN_CMD_ERR(get_props(&props, root, full_path, pool));
+ /* Fetch the directory's explicit and/or inherited properties
+ if requested. */
+ if (want_props || wants_inherited_props)
+ SVN_CMD_ERR(get_props(&props, &inherited_props, b, root, full_path,
+ pool));
/* Begin response ... */
SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w(r(!", "success", rev));
@@ -1630,6 +1680,26 @@ static svn_error_t *get_dir(svn_ra_svn_c
svn_pool_destroy(subpool);
}
+ if (wants_inherited_props)
+ {
+ apr_pool_t *iterpool = svn_pool_create(pool);
+
+ SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)(?!"));
+ for (i = 0; i < inherited_props->nelts; i++)
+ {
+ svn_prop_inherited_item_t *iprop =
+ APR_ARRAY_IDX(inherited_props, i, svn_prop_inherited_item_t *);
+
+ svn_pool_clear(iterpool);
+ SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!(c(!",
+ iprop->path_or_url));
+ SVN_ERR(svn_ra_svn_write_proplist(conn, iterpool, iprop->prop_hash));
+ SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!))!",
+ iprop->path_or_url));
+ }
+ svn_pool_destroy(iterpool);
+ }
+
/* Finish response. */
return svn_ra_svn_write_tuple(conn, pool, "!))");
}
@@ -2771,7 +2841,8 @@ static svn_error_t *replay_one_revision(
svn_error_clear(editor->abort_edit(edit_baton, pool));
SVN_CMD_ERR(err);
- return svn_ra_svn_write_cmd(conn, pool, "finish-replay", "");
+ return svn_ra_svn_write_templated_cmd(conn, pool,
+ svn_ra_svn_cmd_finish_replay);
}
static svn_error_t *replay(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
@@ -2858,6 +2929,65 @@ get_deleted_rev(svn_ra_svn_conn_t *conn,
return SVN_NO_ERROR;
}
+static svn_error_t *
+get_inherited_props(svn_ra_svn_conn_t *conn,
+ apr_pool_t *pool,
+ apr_array_header_t *params,
+ void *baton)
+{
+ server_baton_t *b = baton;
+ const char *path, *full_path;
+ svn_revnum_t rev;
+ svn_fs_root_t *root;
+ apr_array_header_t *inherited_props;
+ int i;
+ apr_pool_t *iterpool = svn_pool_create(pool);
+
+ /* Parse arguments. */
+ SVN_ERR(svn_ra_svn_parse_tuple(params, iterpool, "c(?r)", &path, &rev));
+
+ full_path = svn_fspath__join(b->fs_path->data,
+ svn_relpath_canonicalize(path, iterpool),
+ pool);
+
+ /* Check authorizations */
+ SVN_ERR(must_have_access(conn, iterpool, b, svn_authz_read,
+ full_path, FALSE));
+
+ if (!SVN_IS_VALID_REVNUM(rev))
+ SVN_CMD_ERR(svn_fs_youngest_rev(&rev, b->fs, pool));
+
+ SVN_ERR(log_command(b, conn, pool, "%s",
+ svn_log__get_inherited_props(full_path, rev,
+ iterpool)));
+
+ /* Fetch the properties and a stream for the contents. */
+ SVN_CMD_ERR(svn_fs_revision_root(&root, b->fs, rev, iterpool));
+ SVN_CMD_ERR(get_props(NULL, &inherited_props, b, root, full_path, pool));
+
+ /* Send successful command response with revision and props. */
+ SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "w(!", "success"));
+
+ SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!(?!"));
+
+ for (i = 0; i < inherited_props->nelts; i++)
+ {
+ svn_prop_inherited_item_t *iprop =
+ APR_ARRAY_IDX(inherited_props, i, svn_prop_inherited_item_t *);
+
+ svn_pool_clear(iterpool);
+ SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!(c(!",
+ iprop->path_or_url));
+ SVN_ERR(svn_ra_svn_write_proplist(conn, iterpool, iprop->prop_hash));
+ SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!))!",
+ iprop->path_or_url));
+ }
+
+ SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!))"));
+ svn_pool_destroy(iterpool);
+ return SVN_NO_ERROR;
+}
+
static const svn_ra_svn_cmd_entry_t main_commands[] = {
{ "reparent", reparent },
{ "get-latest-rev", get_latest_rev },
@@ -2889,6 +3019,7 @@ static const svn_ra_svn_cmd_entry_t main
{ "replay", replay },
{ "replay-range", replay_range },
{ "get-deleted-rev", get_deleted_rev },
+ { "get-iprops", get_inherited_props },
{ NULL }
};
@@ -2944,24 +3075,6 @@ repos_path_valid(const char *path)
return TRUE;
}
-/* Callback which receives hook environment variables from the hook
- * environment configuration section,
- * An implementation of svn_config_enumerator2_t. */
-static svn_boolean_t
-hooks_env_conf_cb(const char *name,
- const char *value,
- void *baton,
- apr_pool_t *pool)
-{
- apr_hash_t *hooks_env = baton;
- apr_pool_t *hash_pool = apr_hash_pool_get(hooks_env);
-
- apr_hash_set(hooks_env, apr_pstrdup(hash_pool, name),
- APR_HASH_KEY_STRING, apr_pstrdup(hash_pool, value));
-
- return TRUE;
-}
-
/* Look for the repository given by URL, using ROOT as the virtual
* repository root. If we find one, fill in the repos, fs, cfg,
* repos_url, and fs_path fields of B. Set B->repos's client
@@ -2974,7 +3087,7 @@ static svn_error_t *find_repos(const cha
const apr_array_header_t *capabilities,
apr_pool_t *pool)
{
- const char *path, *full_path, *repos_root, *fs_path;
+ const char *path, *full_path, *repos_root, *fs_path, *hooks_env;
svn_stringbuf_t *url_buf;
/* Skip past the scheme and authority part. */
@@ -2983,9 +3096,13 @@ static svn_error_t *find_repos(const cha
return svn_error_createf(SVN_ERR_BAD_URL, NULL,
"Non-svn URL passed to svn server: '%s'", url);
-
- path = strchr(path, '/');
- path = (path == NULL) ? "" : svn_relpath_canonicalize(path, pool);
+ if (! b->vhost)
+ {
+ path = strchr(path, '/');
+ if (path == NULL)
+ path = "";
+ }
+ path = svn_relpath_canonicalize(path, pool);
path = svn_path_uri_decode(path, pool);
/* Ensure that it isn't possible to escape the root by disallowing
@@ -3032,8 +3149,8 @@ static svn_error_t *find_repos(const cha
#ifdef SVN_HAVE_SASL
/* Should we use Cyrus SASL? */
- svn_config_get_bool(b->cfg, &b->use_sasl, SVN_CONFIG_SECTION_SASL,
- SVN_CONFIG_OPTION_USE_SASL, FALSE);
+ SVN_ERR(svn_config_get_bool(b->cfg, &b->use_sasl, SVN_CONFIG_SECTION_SASL,
+ SVN_CONFIG_OPTION_USE_SASL, FALSE));
#endif
/* Use the repository UUID as the default realm. */
@@ -3052,16 +3169,12 @@ static svn_error_t *find_repos(const cha
"No access allowed to this repository",
b, conn, pool);
- /* If a hook environment has been configured, set it up. */
- if (svn_config_has_section(b->cfg, SVN_CONFIG_SECTION_HOOKS_ENV))
- {
- apr_hash_t *hooks_env = apr_hash_make(pool);
-
- svn_config_enumerate2(b->cfg, SVN_CONFIG_SECTION_HOOKS_ENV,
- hooks_env_conf_cb, hooks_env, pool);
-
- svn_repos_hooks_setenv(b->repos, hooks_env);
- }
+ /* Configure hook script environment variables. */
+ svn_config_get(b->cfg, &hooks_env, SVN_CONFIG_SECTION_GENERAL,
+ SVN_CONFIG_OPTION_HOOKS_ENV, NULL);
+ if (hooks_env)
+ hooks_env = svn_dirent_internal_style(hooks_env, pool);
+ SVN_ERR(svn_repos_hooks_setenv(b->repos, hooks_env, pool, pool));
return SVN_NO_ERROR;
}
@@ -3089,37 +3202,67 @@ fs_warning_func(void *baton, svn_error_t
svn_pool_clear(b->pool);
}
-
-static svn_error_t *
-fetch_props_func(apr_hash_t **props,
- void *baton,
- const char *path,
- svn_revnum_t base_revision,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
+/* Return the normalized repository-relative path for the given PATH
+ * (may be a URL, full path or relative path) and fs contained in the
+ * server baton BATON. Allocate the result in POOL.
+ */
+static const char *
+get_normalized_repo_rel_path(void *baton,
+ const char *path,
+ apr_pool_t *pool)
{
server_baton_t *sb = baton;
- svn_fs_root_t *fs_root;
- svn_error_t *err;
-
- if (!SVN_IS_VALID_REVNUM(base_revision))
- SVN_ERR(svn_fs_youngest_rev(&base_revision, sb->fs, scratch_pool));
if (svn_path_is_url(path))
{
/* This is a copyfrom URL. */
- path = svn_uri_skip_ancestor(sb->repos_url, path, scratch_pool);
- path = svn_fspath__canonicalize(path, scratch_pool);
+ path = svn_uri_skip_ancestor(sb->repos_url, path, pool);
+ path = svn_fspath__canonicalize(path, pool);
}
else
{
/* This is a base-relative path. */
- if (path[0] != '/')
+ if ((path)[0] != '/')
/* Get an absolute path for use in the FS. */
- path = svn_fspath__join(sb->fs_path->data, path, scratch_pool);
+ path = svn_fspath__join(sb->fs_path->data, path, pool);
}
- SVN_ERR(svn_fs_revision_root(&fs_root, sb->fs, base_revision, scratch_pool));
+ return path;
+}
+
+/* Get the revision root for REVISION in fs given by server baton BATON
+ * and return it in *FS_ROOT. Use HEAD if REVISION is SVN_INVALID_REVNUM.
+ * Use POOL for allocations.
+ */
+static svn_error_t *
+get_revision_root(svn_fs_root_t **fs_root,
+ void *baton,
+ svn_revnum_t revision,
+ apr_pool_t *pool)
+{
+ server_baton_t *sb = baton;
+
+ if (!SVN_IS_VALID_REVNUM(revision))
+ SVN_ERR(svn_fs_youngest_rev(&revision, sb->fs, pool));
+
+ SVN_ERR(svn_fs_revision_root(fs_root, sb->fs, revision, pool));
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+fetch_props_func(apr_hash_t **props,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_fs_root_t *fs_root;
+ svn_error_t *err;
+
+ path = get_normalized_repo_rel_path(baton, path, scratch_pool);
+ SVN_ERR(get_revision_root(&fs_root, baton, base_revision, scratch_pool));
err = svn_fs_node_proplist(props, fs_root, path, result_pool);
if (err && err->apr_err == SVN_ERR_FS_NOT_FOUND)
@@ -3141,28 +3284,11 @@ fetch_kind_func(svn_kind_t *kind,
svn_revnum_t base_revision,
apr_pool_t *scratch_pool)
{
- server_baton_t *sb = baton;
svn_node_kind_t node_kind;
svn_fs_root_t *fs_root;
- if (!SVN_IS_VALID_REVNUM(base_revision))
- SVN_ERR(svn_fs_youngest_rev(&base_revision, sb->fs, scratch_pool));
-
- if (svn_path_is_url(path))
- {
- /* This is a copyfrom URL. */
- path = svn_uri_skip_ancestor(sb->repos_url, path, scratch_pool);
- path = svn_fspath__canonicalize(path, scratch_pool);
- }
- else
- {
- /* This is a base-relative path. */
- if (path[0] != '/')
- /* Get an absolute path for use in the FS. */
- path = svn_fspath__join(sb->fs_path->data, path, scratch_pool);
- }
-
- SVN_ERR(svn_fs_revision_root(&fs_root, sb->fs, base_revision, scratch_pool));
+ path = get_normalized_repo_rel_path(baton, path, scratch_pool);
+ SVN_ERR(get_revision_root(&fs_root, baton, base_revision, scratch_pool));
SVN_ERR(svn_fs_check_path(&node_kind, fs_root, path, scratch_pool));
*kind = svn__kind_from_node_kind(node_kind, FALSE);
@@ -3178,31 +3304,14 @@ fetch_base_func(const char **filename,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- server_baton_t *sb = baton;
svn_stream_t *contents;
svn_stream_t *file_stream;
const char *tmp_filename;
svn_fs_root_t *fs_root;
svn_error_t *err;
- if (!SVN_IS_VALID_REVNUM(base_revision))
- SVN_ERR(svn_fs_youngest_rev(&base_revision, sb->fs, scratch_pool));
-
- if (svn_path_is_url(path))
- {
- /* This is a copyfrom URL. */
- path = svn_uri_skip_ancestor(sb->repos_url, path, scratch_pool);
- path = svn_fspath__canonicalize(path, scratch_pool);
- }
- else
- {
- /* This is a base-relative path. */
- if (path[0] != '/')
- /* Get an absolute path for use in the FS. */
- path = svn_fspath__join(sb->fs_path->data, path, scratch_pool);
- }
-
- SVN_ERR(svn_fs_revision_root(&fs_root, sb->fs, base_revision, scratch_pool));
+ path = get_normalized_repo_rel_path(baton, path, scratch_pool);
+ SVN_ERR(get_revision_root(&fs_root, baton, base_revision, scratch_pool));
err = svn_fs_file_contents(&contents, fs_root, path, scratch_pool);
if (err && err->apr_err == SVN_ERR_FS_NOT_FOUND)
@@ -3247,6 +3356,7 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
b.log_file = params->log_file;
b.pool = pool;
b.use_sasl = FALSE;
+ b.vhost = params->vhost;
/* construct FS configuration parameters */
b.fs_config = apr_hash_make(pool);
@@ -3260,7 +3370,7 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
/* Send greeting. We don't support version 1 any more, so we can
* send an empty mechlist. */
if (params->compression_level > 0)
- SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "nn()(wwwwwwww)",
+ SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "nn()(wwwwwwwwww)",
(apr_uint64_t) 2, (apr_uint64_t) 2,
SVN_RA_SVN_CAP_EDIT_PIPELINE,
SVN_RA_SVN_CAP_SVNDIFF1,
@@ -3269,9 +3379,11 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
SVN_RA_SVN_CAP_DEPTH,
SVN_RA_SVN_CAP_LOG_REVPROPS,
SVN_RA_SVN_CAP_ATOMIC_REVPROPS,
- SVN_RA_SVN_CAP_PARTIAL_REPLAY));
+ SVN_RA_SVN_CAP_PARTIAL_REPLAY,
+ SVN_RA_SVN_CAP_INHERITED_PROPS,
+ SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS));
else
- SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "nn()(wwwwwww)",
+ SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "nn()(wwwwwwwww)",
(apr_uint64_t) 2, (apr_uint64_t) 2,
SVN_RA_SVN_CAP_EDIT_PIPELINE,
SVN_RA_SVN_CAP_ABSENT_ENTRIES,
@@ -3279,7 +3391,9 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
SVN_RA_SVN_CAP_DEPTH,
SVN_RA_SVN_CAP_LOG_REVPROPS,
SVN_RA_SVN_CAP_ATOMIC_REVPROPS,
- SVN_RA_SVN_CAP_PARTIAL_REPLAY));
+ SVN_RA_SVN_CAP_PARTIAL_REPLAY,
+ SVN_RA_SVN_CAP_INHERITED_PROPS,
+ SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS));
/* Read client response, which we assume to be in version 2 format:
* version, capability list, and client URL; then we do an auth
Modified: subversion/branches/compressed-pristines/subversion/svnserve/server.h
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/svnserve/server.h?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/svnserve/server.h (original)
+++ subversion/branches/compressed-pristines/subversion/svnserve/server.h Sat Nov 24 20:29:11 2012
@@ -59,6 +59,7 @@ typedef struct server_baton_t {
svn_boolean_t use_sasl; /* Use Cyrus SASL for authentication;
always false if SVN_HAVE_SASL not defined */
apr_file_t *log_file; /* Log filehandle. */
+ svn_boolean_t vhost; /* Use virtual-host-based path to repo. */
apr_pool_t *pool;
} server_baton_t;
@@ -128,6 +129,16 @@ typedef struct serve_params_t {
Defaults to SVN_DELTA_COMPRESSION_LEVEL_DEFAULT. */
int compression_level;
+ /* Item size up to which we use the zero-copy code path to transmit
+ them over the network. 0 disables that code path. */
+ apr_size_t zero_copy_limit;
+
+ /* Amount of data to send between checks for cancellation requests
+ coming in from the client. */
+ apr_size_t error_check_interval;
+
+ /* Use virtual-host-based path to repo. */
+ svn_boolean_t vhost;
} serve_params_t;
/* Serve the connection CONN according to the parameters PARAMS. */
Modified: subversion/branches/compressed-pristines/subversion/svnversion/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/svnversion/main.c?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/svnversion/main.c (original)
+++ subversion/branches/compressed-pristines/subversion/svnversion/main.c Sat Nov 24 20:29:11 2012
@@ -57,19 +57,19 @@ help(const apr_getopt_option_t *options,
(svn_cmdline_fprintf
(stdout, pool,
_("usage: svnversion [OPTIONS] [WC_PATH [TRAIL_URL]]\n\n"
- " Produce a compact 'version number' for the working copy path\n"
+ " Produce a compact version identifier for the working copy path\n"
" WC_PATH. TRAIL_URL is the trailing portion of the URL used to\n"
" determine if WC_PATH itself is switched (detection of switches\n"
- " within WC_PATH does not rely on TRAIL_URL). The version number\n"
+ " within WC_PATH does not rely on TRAIL_URL). The version identifier\n"
" is written to standard output. For example:\n"
"\n"
" $ svnversion . /repos/svn/trunk\n"
" 4168\n"
"\n"
- " The version number will be a single number if the working\n"
+ " The version identifier will be a single number if the working\n"
" copy is single revision, unmodified, not switched and with\n"
" a URL that matches the TRAIL_URL argument. If the working\n"
- " copy is unusual the version number will be more complex:\n"
+ " copy is unusual the version identifier will be more complex:\n"
"\n"
" 4123:4168 mixed revision working copy\n"
" 4168M modified working copy\n"
Modified: subversion/branches/compressed-pristines/subversion/svnversion/svnversion.1
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/svnversion/svnversion.1?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/svnversion/svnversion.1 (original)
+++ subversion/branches/compressed-pristines/subversion/svnversion/svnversion.1 Sat Nov 24 20:29:11 2012
@@ -23,10 +23,10 @@
.\"
.TH svnversion 1
.SH NAME
-svnversion \- Produce a compact version number for a working copy.
+svnversion \- Produce a compact version identifier for a working copy.
.SH SYNOPSIS
.TP
-\fBsvnversion\fP [\fIwc_path\fP [\fItrail_url\fP]]
+\fBsvnversion\fP [\fIoptions\fP] [\fIwc_path\fP [\fItrail_url\fP]]
.SH OVERVIEW
Subversion is a version control system, which allows you to keep old
versions of files and directories (usually source code), keep a log of
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/autoprop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/autoprop_tests.py?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/autoprop_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/autoprop_tests.py Sat Nov 24 20:29:11 2012
@@ -42,6 +42,7 @@ Issue = svntest.testcase.Issue_deco
Wimp = svntest.testcase.Wimp_deco
Item = svntest.wc.StateItem
+from svntest.main import SVN_PROP_INHERITABLE_AUTOPROPS
# Helper function
def check_proplist(path, exp_out):
@@ -324,6 +325,348 @@ def fail_add_mixed_eol_style(sbox):
{filename : Item(status='? ')})
run_and_verify_unquiet_status(filepath, expected_status)
+#----------------------------------------------------------------------
+
+def create_inherited_autoprops_config(config_dir, enable_flag):
+ "create config stuffs for inherited autoprops tests"
+
+ # contents of the file 'config'
+ config_contents = '''\
+[auth]
+password-stores =
+
+[miscellany]
+enable-auto-props = %s
+
+[auto-props]
+*.c = svn:keywords=Author Date Id Rev URL;svn:eol-style=native;
+''' % (enable_flag and 'yes' or 'no')
+
+ svntest.main.create_config_dir(config_dir, config_contents)
+
+#----------------------------------------------------------------------
+def check_inheritable_autoprops(sbox, auto_props_enabled):
+ """Check that the autoprops added or imported by inheritable_autoprops_test
+ are as expected based on whether traditional auto props are active or
+ not, as indicated by AUTO_PROPS_ENABLED."""
+
+ foo_path = sbox.ospath('foo.c')
+ bar_path = sbox.ospath('B/bar.c')
+ baf_path = sbox.ospath('C/baf.c')
+ qux_path = sbox.ospath('D/qux.c')
+ rip_path = sbox.ospath('D/rip.bat')
+ snk_path = sbox.ospath('D/H/snk.py')
+ sir_path = sbox.ospath('D/H/sir.c')
+
+ if auto_props_enabled:
+ check_proplist(foo_path, {'svn:eol-style':'CRLF',
+ 'svn:keywords':'Author Date Id Rev URL'})
+ check_proplist(bar_path, {'svn:eol-style':'CR',
+ 'svn:keywords':'Date'})
+ check_proplist(baf_path, {'svn:eol-style':'LF',
+ 'svn:keywords':'Rev'})
+ check_proplist(qux_path, {'svn:eol-style':'CRLF',
+ 'svn:keywords':'Author Date Id Rev URL'})
+ check_proplist(rip_path, {'svn:executable':'*'})
+ check_proplist(snk_path, {'svn:mime-type':'text/x-python'})
+ check_proplist(sir_path, {'svn:eol-style':'CRLF',
+ 'svn:keywords':'Author Date Id Rev URL'})
+ else:
+ check_proplist(foo_path, {'svn:eol-style':'CRLF'})
+ check_proplist(bar_path, {'svn:eol-style':'CR',
+ 'svn:keywords':'Date'})
+ check_proplist(baf_path, {'svn:eol-style':'LF',
+ 'svn:keywords':'Rev'})
+ check_proplist(qux_path, {'svn:eol-style':'CRLF'})
+ check_proplist(rip_path, {'svn:executable':'*'})
+ check_proplist(snk_path, {'svn:mime-type':'text/x-python'})
+ check_proplist(sir_path, {'svn:eol-style':'CRLF'})
+
+#----------------------------------------------------------------------
+def inheritable_autoprops_test(sbox, cmd, cfgenable, clienable, subdir,
+ do_import_or_add=True):
+ """configurable autoprops and svn:inheritable-auto-props test.
+
+ CMD is the subcommand to test: 'import' or 'add'
+ if CFGENABLE is true, enable autoprops in the config file, else disable
+ if CLIENABLE == 1: --auto-props is added to the command line
+ 0: nothing is added
+ -1: --no-auto-props is added to command line
+ if string SUBDIR is not empty files are created in that subdir and the
+ directory is added/imported
+ if DO_IMPORT_OR_ADD is false, setup the test, but don't perform
+ the actual import or add.
+
+ Return the directory where the config dir (if any) is located."""
+
+ # Bootstrap
+ sbox.build()
+
+ # some directories
+ wc_dir = sbox.wc_dir
+ tmp_dir = os.path.abspath(svntest.main.temp_dir)
+ config_dir = os.path.join(tmp_dir, 'autoprops_config_' + sbox.name)
+ repos_url = sbox.repo_url
+
+ # initialize parameters
+ if cmd == 'import':
+ parameters = ['import', '-m', 'importing']
+ files_dir = tmp_dir
+ else:
+ parameters = ['add']
+ files_dir = wc_dir
+
+ parameters = parameters + ['--config-dir', config_dir]
+
+ create_inherited_autoprops_config(config_dir, cfgenable)
+
+ # add comandline flags
+ if clienable == 1:
+ parameters = parameters + ['--auto-props']
+ enable_flag = 1
+ elif clienable == -1:
+ parameters = parameters + ['--no-auto-props']
+ enable_flag = 0
+ else:
+ enable_flag = cfgenable
+
+ # setup subdirectory if needed
+ if len(subdir) > 0:
+ files_dir = os.path.join(files_dir, subdir)
+ files_wc_dir = os.path.join(wc_dir, subdir)
+ os.makedirs(files_dir)
+ else:
+ files_wc_dir = wc_dir
+
+ # Set differing svn:inheritable-auto-props properties on various
+ # directories.
+ sbox.simple_propset(SVN_PROP_INHERITABLE_AUTOPROPS,
+ '*.c = svn:eol-style=CRLF\n'
+ '*.bat = svn:executable',
+ '.')
+ sbox.simple_propset(SVN_PROP_INHERITABLE_AUTOPROPS,
+ '*.c = svn:eol-style=CR;svn:keywords=Date',
+ 'A/B')
+ sbox.simple_propset(SVN_PROP_INHERITABLE_AUTOPROPS,
+ '*.c = svn:eol-style=LF;svn:keywords=Rev',
+ 'A/C')
+ sbox.simple_propset(SVN_PROP_INHERITABLE_AUTOPROPS,
+ '*.py = svn:mime-type=text/x-python',
+ 'A/D')
+ svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
+ 'Add some ' + SVN_PROP_INHERITABLE_AUTOPROPS +
+ ' properties', wc_dir)
+
+ # Switch the root of the WC to ^/A.
+ svntest.main.run_svn(None, 'switch', '--ignore-ancestry',
+ sbox.repo_url + '/A', wc_dir)
+
+ # Array of file names to add or import, their WC locations (relative to the
+ # WC root) if being added, and their repository locations if being imported.
+ filenames = [['foo.c', 'foo.c', 'A/foo.c'],
+ ['bar.c', os.path.join('B', 'bar.c'), 'A/B/bar.c'],
+ ['baf.c', os.path.join('C', 'baf.c'), 'A/C/baf.c'],
+ ['qux.c', os.path.join('D', 'qux.c'), 'A/D/qux.c'],
+ ['rip.bat', os.path.join('D', 'rip.bat'), 'A/D/rip.bat'],
+ ['snk.py', os.path.join('D', 'H', 'snk.py'), 'A/D/H/snk.py'],
+ ['ric.c', os.path.join('D', 'H', 'sir.c'), 'A/D/H/sir.c']]
+
+ for filename in filenames:
+ if cmd == 'import':
+ svntest.main.file_write(os.path.join(files_dir, filename[0]),
+ 'foo\nbar\nbaz\n')
+ else:
+ svntest.main.file_write(os.path.join(files_dir, filename[1]),
+ 'foo\nbar\nbaz\n')
+
+ if do_import_or_add:
+ if len(subdir) == 0:
+ # add/import the files
+ for filename in filenames:
+ if cmd == 'import':
+ path = os.path.join(files_dir, filename[0])
+ tmp_params = parameters + [path, repos_url + '/' + filename[2]]
+ else:
+ path = os.path.join(files_dir, filename[1])
+ tmp_params = parameters + [path]
+ svntest.main.run_svn(None, *tmp_params)
+ else:
+ # add/import subdirectory
+ if cmd == 'import':
+ parameters = parameters + [files_dir, repos_url]
+ else:
+ parameters = parameters + [files_wc_dir]
+ svntest.main.run_svn(None, *parameters)
+
+ # do an svn co if needed
+ if cmd == 'import':
+ svntest.main.run_svn(None, 'checkout', repos_url + '/A', files_wc_dir,
+ '--config-dir', config_dir)
+
+ check_inheritable_autoprops(sbox, enable_flag)
+
+ return config_dir
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_add_no_none(sbox):
+ "inherit add: config=no, commandline=none"
+ inheritable_autoprops_test(sbox, 'add', False, 0, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_add_yes_none(sbox):
+ "inherit add: config=yes, commandline=none"
+ inheritable_autoprops_test(sbox, 'add', True, 0, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_add_no_yes(sbox):
+ "inherit add: config=no, commandline=yes"
+
+ inheritable_autoprops_test(sbox, 'add', 0, 1, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_add_yes_yes(sbox):
+ "inherit add: config=yes, commandline=yes"
+
+ inheritable_autoprops_test(sbox, 'add', 1, 1, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_add_no_no(sbox):
+ "inherit add: config=no, commandline=no"
+
+ inheritable_autoprops_test(sbox, 'add', 0, -1, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_add_yes_no(sbox):
+ "inherit add: config=yes, commandline=no"
+
+ inheritable_autoprops_test(sbox, 'add', 1, -1, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_import_no_none(sbox):
+ "inherit import: config=no, commandline=none"
+
+ inheritable_autoprops_test(sbox, 'import', False, 0, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_imp_yes_none(sbox):
+ "inherit import: config=yes, commandline=none"
+
+ inheritable_autoprops_test(sbox, 'import', 1, 0, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_imp_no_yes(sbox):
+ "inherit import: config=no, commandline=yes"
+
+ inheritable_autoprops_test(sbox, 'import', 0, 1, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_imp_yes_yes(sbox):
+ "inherit import: config=yes, commandline=yes"
+
+ inheritable_autoprops_test(sbox, 'import', 1, 1, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_imp_no_no(sbox):
+ "inherit import: config=no, commandline=no"
+
+ inheritable_autoprops_test(sbox, 'import', 0, -1, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_imp_yes_no(sbox):
+ "inherit import: config=yes, commandline=no"
+
+ inheritable_autoprops_test(sbox, 'import', 1, -1, '')
+
+#----------------------------------------------------------------------
+# Test svn:inheritable-auto-props when 'svn add' targets an already versioned
+# target.
+def svn_prop_inheritable_autoprops_add_versioned_target(sbox):
+ "svn:inheritable-auto-props and versioned target"
+
+ config_dir = inheritable_autoprops_test(sbox, 'add', 1, 0, '', False)
+
+ # Perform the add with the --force flag, and check the status.
+ ### Note: You have to be inside the working copy or else Subversion
+ ### will think you're trying to add the working copy to its parent
+ ### directory, and will (possibly, if the parent directory isn't
+ ### versioned) fail -- see also schedule_tests.py 11 "'svn add'
+ ### should traverse already-versioned dirs"
+ saved_wd = os.getcwd()
+ os.chdir(sbox.wc_dir)
+ svntest.main.run_svn(None, 'add', '.', '--force', '--config-dir',
+ config_dir)
+ os.chdir(saved_wd)
+
+ check_inheritable_autoprops(sbox, True)
+
+#----------------------------------------------------------------------
+# Can't set svn:inheritable-auto-props on files.
+def svn_prop_inheritable_autoprops_propset_file_target(sbox):
+ "svn:inheritable-auto-props can't be set on files"
+
+ sbox.build()
+ svntest.actions.run_and_verify_svn(
+ None, None,
+ ".*Cannot set '" + SVN_PROP_INHERITABLE_AUTOPROPS + "' on a file.*",
+ 'ps', SVN_PROP_INHERITABLE_AUTOPROPS, '*.c=svn:eol-style=native',
+ sbox.ospath('iota'))
+
+#----------------------------------------------------------------------
+# Multiple unversioned subtrees under a versioned target shouldn't segfault.
+def svn_prop_inheritable_autoprops_unversioned_subtrees_versioned_target(sbox):
+ "versioned target and unversioned subtrees"
+
+ sbox.build()
+ Z_path = sbox.ospath('A/D/Z')
+ Y_path = sbox.ospath('A/B/Y')
+ foo_path = sbox.ospath('A/D/Z/foo.c')
+ bar_path = sbox.ospath('A/B/Y/bar.c')
+
+ # Set svn:inheritable-auto-props properties on two directories.
+ svntest.main.run_svn(None, 'ps', SVN_PROP_INHERITABLE_AUTOPROPS,
+ '*.c=svn:eol-style=CR', sbox.ospath('A/B'))
+ svntest.main.run_svn(None, 'ps', SVN_PROP_INHERITABLE_AUTOPROPS,
+ '*.c=svn:eol-style=native', sbox.ospath('A/D'))
+ svntest.main.run_svn(None, 'ci', '-m', 'Add inheritable autoprops',
+ sbox.wc_dir)
+
+ # Create two subtrees, each with one new file.
+ os.mkdir(Z_path)
+ os.mkdir(Y_path)
+ svntest.main.file_write(foo_path,
+ '/* Someday there will be code here. */\n')
+ svntest.main.file_write(bar_path,
+ '/* Someday there will be code here. */\n')
+
+ # Perform the add with the --force flag, targeting the root of the WC.
+ ### Note: You have to be inside the working copy or else Subversion
+ ### will think you're trying to add the working copy to its parent
+ ### directory, and will (possibly, if the parent directory isn't
+ ### versioned) fail -- see also schedule_tests.py 11 "'svn add'
+ ### should traverse already-versioned dirs"
+ saved_wd = os.getcwd()
+ os.chdir(sbox.wc_dir)
+ # This was causing a segfault at one point.
+ svntest.main.run_svn(None, 'add', '.', '--force')
+ os.chdir(saved_wd)
+
+ # Check the resulting autoprops.
+ svntest.actions.run_and_verify_svn(None, 'native\n', [],
+ 'pg', 'svn:eol-style', foo_path)
+ svntest.actions.run_and_verify_svn(None, 'CR\n', [],
+ 'pg', 'svn:eol-style', bar_path)
########################################################################
# Run the tests
@@ -346,6 +689,21 @@ test_list = [ None,
autoprops_add_dir,
autoprops_imp_dir,
fail_add_mixed_eol_style,
+ svn_prop_inheritable_autoprops_add_no_none,
+ svn_prop_inheritable_autoprops_add_yes_none,
+ svn_prop_inheritable_autoprops_add_no_yes,
+ svn_prop_inheritable_autoprops_add_yes_yes,
+ svn_prop_inheritable_autoprops_add_no_no,
+ svn_prop_inheritable_autoprops_add_yes_no,
+ svn_prop_inheritable_autoprops_import_no_none,
+ svn_prop_inheritable_autoprops_imp_yes_none,
+ svn_prop_inheritable_autoprops_imp_no_yes,
+ svn_prop_inheritable_autoprops_imp_yes_yes,
+ svn_prop_inheritable_autoprops_imp_no_no,
+ svn_prop_inheritable_autoprops_imp_yes_no,
+ svn_prop_inheritable_autoprops_add_versioned_target,
+ svn_prop_inheritable_autoprops_propset_file_target,
+ svn_prop_inheritable_autoprops_unversioned_subtrees_versioned_target,
]
if __name__ == '__main__':
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/copy_tests.py?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/copy_tests.py Sat Nov 24 20:29:11 2012
@@ -1878,12 +1878,14 @@ def mv_unversioned_file(sbox):
# Try to move an unversioned file.
svntest.actions.run_and_verify_svn(None, None,
- ".*unversioned1.* is not under version control.*",
+ ".*unversioned1' " +
+ "(does not exist|is not under version control)",
'mv', unver_path_1, dest_path_1)
# Try to forcibly move an unversioned file.
svntest.actions.run_and_verify_svn(None, None,
- ".*unversioned2.* is not under version control.*",
+ ".*unversioned2.* " +
+ "(does not exist|is not under version control)",
'mv',
unver_path_2, dest_path_2)
@@ -5457,11 +5459,13 @@ def copy_deleted_dir(sbox):
sbox.simple_rm('A')
svntest.actions.run_and_verify_svn(None, None,
- 'svn: E145000: Path.* does not exist',
+ '(svn: E145000: Path.* does not exist)|' +
+ "(svn: E155035: Deleted node .* copied)",
'cp', sbox.ospath('iota'),
sbox.ospath('new_iota'))
svntest.actions.run_and_verify_svn(None, None,
- 'svn: E145000: Path.* does not exist',
+ '(svn: E145000: Path.* does not exist)|' +
+ "(svn: E155035: Deleted node .* copied)",
'cp', sbox.ospath('A/D'),
sbox.ospath('new_D'))
@@ -5742,6 +5746,30 @@ def copy_text_conflict(sbox):
})
svntest.actions.run_and_verify_unquiet_status(wc_dir, expected_status)
+@Issue(2843)
+def copy_over_excluded(sbox):
+ "copy on top of excluded should give error"
+
+ sbox.build(read_only = True)
+ wc_dir = sbox.wc_dir
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'update', '--set-depth', 'exclude',
+ sbox.ospath('A/D'))
+
+ expected_error = "svn: E155000: Path '.*D' exists.*excluded.*"
+
+ svntest.actions.run_and_verify_svn(None, None, expected_error,
+ 'cp',
+ sbox.repo_url + '/A/C',
+ sbox.ospath('A/D'))
+
+ expected_error = "svn: E155000: Path '.*D' exists.*excluded.*"
+ svntest.actions.run_and_verify_svn(None, None, expected_error,
+ 'cp',
+ sbox.ospath('A/C'),
+ sbox.ospath('A/D'))
+
########################################################################
# Run the tests
@@ -5858,6 +5886,7 @@ test_list = [ None,
three_nested_moves,
copy_to_unversioned_parent,
copy_text_conflict,
+ copy_over_excluded,
]
if __name__ == '__main__':
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/export_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/export_tests.py?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/export_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/export_tests.py Sat Nov 24 20:29:11 2012
@@ -356,6 +356,7 @@ def export_working_copy_with_property_mo
expected_disk)
@XFail()
+@Issue(3798)
def export_working_copy_at_base_revision(sbox):
"export working copy at base revision"
sbox.build(read_only = True)
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/externals_tests.py?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/externals_tests.py Sat Nov 24 20:29:11 2012
@@ -2554,10 +2554,12 @@ def include_externals(sbox):
actions.run_and_verify_unquiet_status(wc_dir, expected_status)
+@Issue(4252)
@XFail()
def include_immediate_dir_externals(sbox):
"commit --include-externals --depth=immediates"
- # See also comment inside svn_client_commit6().
+ # See also comment in append_externals_as_explicit_targets() in
+ # libsvn_client/commit.c, from r1198765.
# svntest.factory.make(sbox,"""
# svn mkdir X
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests.py?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests.py Sat Nov 24 20:29:11 2012
@@ -95,13 +95,41 @@ rep_lines_res = [
'Subversion command-line client, version X.Y.Z.'),
]
+# This is a trigger pattern that selects the secondary set of
+# delete/replace patterns
+switch_res_line = 'System information:'
+
+# This is a list of lines to delete after having seen switch_res_line.
+switched_del_lines_res = [
+ # In svn --version --verbose, dependent libs loaded
+ # shared libs are optional.
+ re.compile(r'^\* (loaded|linked)'),
+ # In svn --version --verbose, remove everything from
+ # the extended lists
+ re.compile(r'^ - '),
+ ]
+
+# This is a list of lines to search and replace text on after having
+# seen switch_res_line.
+switched_rep_lines_res = [
+ # We don't care about the actual canonical host
+ (re.compile('^\* running on.*$'), '* running on'),
+ ]
+
def process_lines(lines):
"delete lines that should not be compared and search and replace the rest"
output = [ ]
+ del_res = del_lines_res
+ rep_res = rep_lines_res
+
for line in lines:
+ if line.startswith(switch_res_line):
+ del_res = switched_del_lines_res
+ rep_res = switched_rep_lines_res
+
# Skip these lines from the output list.
delete_line = 0
- for delete_re in del_lines_res:
+ for delete_re in del_res:
if delete_re.match(line):
delete_line = 1
break
@@ -109,7 +137,7 @@ def process_lines(lines):
continue
# Search and replace text on the rest.
- for replace_re, replace_str in rep_lines_res:
+ for replace_re, replace_str in rep_res:
line = replace_re.sub(replace_str, line)
output.append(line)
@@ -179,6 +207,10 @@ def getopt__version__quiet(sbox):
"run svn --version --quiet"
run_one_test(sbox, 'svn--version--quiet', '--version', '--quiet')
+def getopt__version__verbose(sbox):
+ "run svn --version --verbose"
+ run_one_test(sbox, 'svn--version--verbose', '--version', '--verbose')
+
def getopt__help(sbox):
"run svn --help"
run_one_test(sbox, 'svn--help', '--help')
@@ -204,6 +236,7 @@ test_list = [ None,
getopt_no_args,
getopt__version,
getopt__version__quiet,
+ getopt__version__verbose,
getopt__help,
getopt_help,
getopt_help_bogus_cmd,
Added: subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn--version--verbose_stderr
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn--version--verbose_stderr?rev=1413258&view=auto
==============================================================================
(empty)
Added: subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn--version--verbose_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn--version--verbose_stdout?rev=1413258&view=auto
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn--version--verbose_stdout (added)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn--version--verbose_stdout Sat Nov 24 20:29:11 2012
@@ -0,0 +1,90 @@
+svn, version 1.8.0-dev (under development)
+ compiled Sep 10 2012, 14:00:24 on i386-apple-darwin11.4.0
+
+Copyright (C) 2012 The Apache Software Foundation.
+This software consists of contributions made by many people;
+see the NOTICE file for more information.
+Subversion is open source software, see http://subversion.apache.org/
+
+The following repository access (RA) modules are available:
+
+* ra_svn : Module for accessing a repository using the svn network protocol.
+ - with Cyrus SASL authentication
+ - handles 'svn' scheme
+* ra_local : Module for accessing a repository on local disk.
+ - handles 'file' scheme
+* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
+ - handles 'http' scheme
+ - handles 'https' scheme
+
+System information:
+
+* running on i386-apple-darwin11.4.0
+ - Mac OS X 10.7.4 Lion, build 11E53
+* linked dependencies:
+ - APR 1.4.2 (compiled with 1.4.2)
+ - APR-Util 1.3.10 (compiled with 1.3.10)
+ - SQLite 3.7.13 (compiled with 3.7.13)
+* loaded shared libraries:
+ - /opt/subversion/bin/svn (Intel 64-bit)
+ - /opt/subversion/lib/libsvn_client-1.0.dylib (Intel 64-bit)
+ - /opt/subversion/lib/libsvn_wc-1.0.dylib (Intel 64-bit)
+ - /opt/subversion/lib/libsvn_ra-1.0.dylib (Intel 64-bit)
+ - /opt/subversion/lib/libsvn_diff-1.0.dylib (Intel 64-bit)
+ - /opt/subversion/lib/libsvn_ra_local-1.0.dylib (Intel 64-bit)
+ - /opt/subversion/lib/libsvn_repos-1.0.dylib (Intel 64-bit)
+ - /opt/subversion/lib/libsvn_fs-1.0.dylib (Intel 64-bit)
+ - /opt/subversion/lib/libsvn_fs_fs-1.0.dylib (Intel 64-bit)
+ - /opt/subversion/lib/libsvn_fs_base-1.0.dylib (Intel 64-bit)
+ - /usr/local/lib/libdb-5.3.dylib (Intel 64-bit)
+ - /opt/subversion/lib/libsvn_fs_util-1.0.dylib (Intel 64-bit)
+ - /opt/subversion/lib/libsvn_ra_svn-1.0.dylib (Intel 64-bit)
+ - /usr/lib/libsasl2.2.dylib (Intel 64-bit)
+ - /opt/subversion/lib/libsvn_ra_serf-1.0.dylib (Intel 64-bit)
+ - /usr/local/lib/libserf-1.0.dylib (Intel 64-bit)
+ - /opt/subversion/lib/libsvn_delta-1.0.dylib (Intel 64-bit)
+ - /opt/subversion/lib/libsvn_subr-1.0.dylib (Intel 64-bit)
+ - /usr/lib/libexpat.1.dylib (Intel 64-bit)
+ - /usr/lib/libz.1.dylib (Intel 64-bit)
+ - /usr/local/lib/libsqlite3.0.8.6.dylib (Intel 64-bit)
+ - /usr/local/lib/libmagic.1.dylib (Intel 64-bit)
+ - /usr/lib/libaprutil-1.0.dylib (Intel 64-bit)
+ - /usr/lib/libapr-1.0.dylib (Intel 64-bit)
+ - /usr/lib/libSystem.B.dylib (Intel 64-bit)
+ - /usr/lib/libiconv.2.dylib (Intel 64-bit)
+ - /usr/lib/libpq.5.dylib (Intel 64-bit)
+ - /usr/lib/libsqlite3.dylib (Intel 64-bit)
+ - /usr/lib/libresolv.9.dylib (Intel 64-bit)
+ - /usr/lib/libssl.0.9.8.dylib (Intel 64-bit)
+ - /usr/lib/libcrypto.0.9.8.dylib (Intel 64-bit)
+ - /usr/lib/libicucore.A.dylib (Intel 64-bit)
+ - /usr/lib/libauto.dylib (Intel 64-bit)
+ - /usr/lib/libobjc.A.dylib (Intel 64-bit)
+ - /usr/lib/libstdc++.6.dylib (Intel 64-bit)
+ - /usr/lib/libpam.2.dylib (Intel 64-bit)
+ - /usr/lib/libbsm.0.dylib (Intel 64-bit)
+ - /usr/lib/libxar-nossl.dylib (Intel 64-bit)
+ - /usr/lib/libc++.1.dylib (Intel 64-bit)
+ - /usr/lib/libc++abi.dylib (Intel 64-bit)
+ - /usr/lib/libDiagnosticMessagesClient.dylib (Intel 64-bit)
+ - /usr/lib/libbz2.1.0.dylib (Intel 64-bit)
+ - /usr/lib/libxml2.2.dylib (Intel 64-bit)
+ - /usr/lib/liblangid.dylib (Intel 64-bit)
+ - /usr/lib/libCRFSuite.dylib (Intel 64-bit)
+ - /usr/lib/libxslt.1.dylib (Intel 64-bit)
+ - /usr/lib/sasl2/apop.so (Intel 64-bit)
+ - /usr/lib/sasl2/dhx.so (Intel 64-bit)
+ - /usr/lib/sasl2/digestmd5WebDAV.so (Intel 64-bit)
+ - /usr/lib/sasl2/libanonymous.2.so (Intel 64-bit)
+ - /usr/lib/sasl2/libcrammd5.2.so (Intel 64-bit)
+ - /usr/lib/sasl2/libdigestmd5.2.so (Intel 64-bit)
+ - /usr/lib/sasl2/libgssapiv2.2.so (Intel 64-bit)
+ - /usr/lib/sasl2/login.so (Intel 64-bit)
+ - /usr/lib/sasl2/libntlm.so (Intel 64-bit)
+ - /usr/lib/sasl2/libotp.2.so (Intel 64-bit)
+ - /usr/lib/sasl2/libplain.2.so (Intel 64-bit)
+ - /usr/lib/sasl2/libpps.so (Intel 64-bit)
+ - /usr/lib/sasl2/mschapv2.so (Intel 64-bit)
+ - /usr/lib/sasl2/shadow_auxprop.so (Intel 64-bit)
+ - /usr/lib/sasl2/smb_nt.so (Intel 64-bit)
+ - /usr/lib/sasl2/smb_ntlmv2.so (Intel 64-bit)
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout Sat Nov 24 20:29:11 2012
@@ -2,8 +2,8 @@ svn, version 0.16.0 (r3987)
compiled Dec 5 2002, 00:02:51
Copyright (C) 2010 The Apache Software Foundation.
-This software consists of contributions made by many people; see the NOTICE
-file for more information.
+This software consists of contributions made by many people;
+see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/
The following repository access (RA) modules are available:
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1413258&r1=1413257&r2=1413258&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Sat Nov 24 20:29:11 2012
@@ -31,12 +31,18 @@ usage: 1. log [PATH][@REV]
and limits the scope of the displayed diff to the specified depth.
If the --search option is used, log messages are displayed only if the
- provided search pattern matches the author, date, log message text,
- or, if the --verbose option is also provided, a changed path.
- The search pattern may include glob syntax wildcards:
+ provided search pattern matches any of the author, date, log message
+ text (unless --quiet is used), or, if the --verbose option is also
+ provided, a changed path.
+ The search pattern may include "glob syntax" wildcards:
? matches any single character
* matches a sequence of arbitrary characters
- [...] matches any of the characters listed inside the brackets
+ [abc] matches any of the characters listed inside the brackets
+ If multiple --search options are provided, a log message is shown if
+ it matches any of the provided search patterns. If the --search-and
+ option is used, that option's argument is combined with the pattern
+ from the previous --search or --search-and option, and a log message
+ is shown only if it matches the combined search pattern.
If --limit is used in combination with --search, --limit restricts the
number of log messages searched, rather than restricting the output
to a particular number of matching log messages.
@@ -94,24 +100,17 @@ Valid options:
--diff : produce diff output
--diff-cmd ARG : use ARG as diff command
--internal-diff : override diff-cmd specified in config file
- -x [--extensions] ARG : Default: '-u'. When Subversion is invoking an
- external diff program, ARG is simply passed along
- to the program. But when Subversion is using its
- default internal diff implementation, or when
- Subversion is displaying blame annotations, ARG
- could be any of the following:
- -u (--unified):
- Output 3 lines of unified context.
- -b (--ignore-space-change):
- Ignore changes in the amount of white space.
- -w (--ignore-all-space):
- Ignore all white space.
- --ignore-eol-style:
- Ignore changes in EOL style.
- -p (--show-c-function):
- Show C function name in diff output.
+ -x [--extensions] ARG : Specify differencing options for external diff or
+ internal diff or blame. Default: '-u'. Options are
+ separated by spaces. Internal diff and blame take:
+ -u, --unified: Show 3 lines of unified context
+ -b, --ignore-space-change: Ignore changes in
+ amount of white space
+ -w, --ignore-all-space: Ignore all white space
+ --ignore-eol-style: Ignore changes in EOL style
+ -p, --show-c-function: Show C function name
--search ARG : use ARG as search pattern (glob syntax)
- --isearch ARG : like --search, but case-insensitive
+ --search-and ARG : combine ARG with the previous search pattern
Global options:
--username ARG : specify a username ARG