aboutsummaryrefslogtreecommitdiffstats
path: root/subversion/svnsync/svnsync.c
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/svnsync/svnsync.c')
-rw-r--r--subversion/svnsync/svnsync.c89
1 files changed, 47 insertions, 42 deletions
diff --git a/subversion/svnsync/svnsync.c b/subversion/svnsync/svnsync.c
index 9f50897273a4..7c1c0efbf7cf 100644
--- a/subversion/svnsync/svnsync.c
+++ b/subversion/svnsync/svnsync.c
@@ -89,17 +89,17 @@ enum svnsync__opt {
svnsync_opt_config_dir, \
svnsync_opt_config_options
-static const svn_opt_subcommand_desc2_t svnsync_cmd_table[] =
+static const svn_opt_subcommand_desc3_t svnsync_cmd_table[] =
{
- { "initialize", initialize_cmd, { "init" },
- N_("usage: svnsync initialize DEST_URL SOURCE_URL\n"
- "\n"
+ { "initialize", initialize_cmd, { "init" }, {N_(
+ "usage: svnsync initialize DEST_URL SOURCE_URL\n"
+ "\n"), N_(
"Initialize a destination repository for synchronization from\n"
"another repository.\n"
- "\n"
+ "\n"), N_(
"If the source URL is not the root of a repository, only the\n"
"specified part of the repository will be synchronized.\n"
- "\n"
+ "\n"), N_(
"The destination URL must point to the root of a repository which\n"
"has been configured to allow revision property changes. In\n"
"the general case, the destination repository must contain no\n"
@@ -109,65 +109,70 @@ static const svn_opt_subcommand_desc2_t svnsync_cmd_table[] =
"their counterparts in the source repository. (This is useful\n"
"when initializing a copy of a repository as a mirror of that same\n"
"repository, for example.)\n"
- "\n"
+ "\n"), N_(
"You should not commit to, or make revision property changes in,\n"
"the destination repository by any method other than 'svnsync'.\n"
"In other words, the destination repository should be a read-only\n"
- "mirror of the source repository.\n"),
+ "mirror of the source repository.\n"
+ )},
{ SVNSYNC_OPTS_DEFAULT, svnsync_opt_source_prop_encoding, 'q',
svnsync_opt_allow_non_empty, svnsync_opt_disable_locking,
svnsync_opt_steal_lock, 'M' } },
- { "synchronize", synchronize_cmd, { "sync" },
- N_("usage: svnsync synchronize DEST_URL [SOURCE_URL]\n"
- "\n"
+ { "synchronize", synchronize_cmd, { "sync" }, {N_(
+ "usage: svnsync synchronize DEST_URL [SOURCE_URL]\n"
+ "\n"), N_(
"Transfer all pending revisions to the destination from the source\n"
"with which it was initialized.\n"
- "\n"
+ "\n"), N_(
"If SOURCE_URL is provided, use that as the source repository URL,\n"
"ignoring what is recorded in the destination repository as the\n"
"source URL. Specifying SOURCE_URL is recommended in particular\n"
"if untrusted users/administrators may have write access to the\n"
- "DEST_URL repository.\n"),
+ "DEST_URL repository.\n"
+ )},
{ SVNSYNC_OPTS_DEFAULT, svnsync_opt_source_prop_encoding, 'q',
svnsync_opt_disable_locking, svnsync_opt_steal_lock, 'M' } },
- { "copy-revprops", copy_revprops_cmd, { 0 },
- N_("usage:\n"
- "\n"
+ { "copy-revprops", copy_revprops_cmd, { 0 }, {N_(
+ "usage:\n"
+ "\n"), N_(
" 1. svnsync copy-revprops DEST_URL [SOURCE_URL]\n"
" 2. svnsync copy-revprops DEST_URL REV[:REV2]\n"
- "\n"
+ "\n"), N_(
"Copy the revision properties in a given range of revisions to the\n"
"destination from the source with which it was initialized. If the\n"
"revision range is not specified, it defaults to all revisions in\n"
"the DEST_URL repository. Note also that the 'HEAD' revision is the\n"
"latest in DEST_URL, not necessarily the latest in SOURCE_URL.\n"
- "\n"
+ "\n"), N_(
"If SOURCE_URL is provided, use that as the source repository URL,\n"
"ignoring what is recorded in the destination repository as the\n"
"source URL. Specifying SOURCE_URL is recommended in particular\n"
"if untrusted users/administrators may have write access to the\n"
"DEST_URL repository.\n"
- "\n"
+ "\n"), N_(
"Unless you need to trigger the destination repositoy's revprop\n"
"change hooks for all revision properties, it is recommended to use\n"
"the --skip-unchanged option for best performance.\n"
- "\n"
- "Form 2 is deprecated syntax, equivalent to specifying \"-rREV[:REV2]\".\n"),
+ "\n"), N_(
+ "Form 2 is deprecated syntax, equivalent to specifying \"-rREV[:REV2]\".\n"
+ )},
{ SVNSYNC_OPTS_DEFAULT, svnsync_opt_source_prop_encoding, 'q', 'r',
svnsync_opt_disable_locking, svnsync_opt_steal_lock,
svnsync_opt_skip_unchanged, 'M' } },
- { "info", info_cmd, { 0 },
- N_("usage: svnsync info DEST_URL\n"
- "\n"
+ { "info", info_cmd, { 0 }, {N_(
+ "usage: svnsync info DEST_URL\n"
+ "\n"), N_(
"Print information about the synchronization destination repository\n"
- "located at DEST_URL.\n"),
+ "located at DEST_URL.\n"
+ )},
{ SVNSYNC_OPTS_DEFAULT } },
- { "help", help_cmd, { "?", "h" },
- N_("usage: svnsync help [SUBCOMMAND...]\n"
- "\n"
- "Describe the usage of this program or its subcommands.\n"),
+ { "help", help_cmd, { "?", "h" }, {N_(
+ "usage: svnsync help [SUBCOMMAND...]\n"
+ "\n"), N_(
+ "Describe the usage of this program or its subcommands.\n"
+ )},
{ 0 } },
- { NULL, NULL, { 0 }, NULL, { 0 } }
+ { NULL, NULL, { 0 }, {NULL}, { 0 } }
};
static const apr_getopt_option_t svnsync_options[] =
@@ -289,7 +294,7 @@ static const apr_getopt_option_t svnsync_options[] =
typedef struct opt_baton_t {
svn_boolean_t non_interactive;
- struct {
+ struct {
svn_boolean_t trust_server_cert_unknown_ca;
svn_boolean_t trust_server_cert_cn_mismatch;
svn_boolean_t trust_server_cert_expired;
@@ -816,7 +821,7 @@ do_initialize(svn_ra_session_t *to_session,
/* Now fill in our bookkeeping info in the dest repository. */
- SVN_ERR(svn_ra_open4(&from_session, NULL, baton->from_url, NULL,
+ SVN_ERR(svn_ra_open5(&from_session, NULL, NULL, baton->from_url, NULL,
&(baton->source_callbacks), baton,
baton->config, pool));
SVN_ERR(svn_ra_get_repos_root2(from_session, &root_url, pool));
@@ -993,7 +998,7 @@ open_source_session(svn_ra_session_t **from_session,
pool));
/* Open the session to copy the revision data. */
- SVN_ERR(svn_ra_open4(from_session, NULL, from_url, from_uuid_str->data,
+ SVN_ERR(svn_ra_open5(from_session, NULL, NULL, from_url, from_uuid_str->data,
callbacks, baton, config, pool));
return SVN_NO_ERROR;
@@ -1008,7 +1013,7 @@ open_target_session(svn_ra_session_t **target_session_p,
apr_pool_t *pool)
{
svn_ra_session_t *target_session;
- SVN_ERR(svn_ra_open4(&target_session, NULL, baton->to_url, NULL,
+ SVN_ERR(svn_ra_open5(&target_session, NULL, NULL, baton->to_url, NULL,
&(baton->sync_callbacks), baton, baton->config, pool));
SVN_ERR(check_if_session_is_at_repos_root(target_session, baton->to_url, pool));
@@ -1937,7 +1942,7 @@ help_cmd(apr_getopt_t *os, void *baton, apr_pool_t *pool)
SVN_ERR(svn_ra_print_modules(version_footer, pool));
- SVN_ERR(svn_opt_print_help4(os, "svnsync",
+ SVN_ERR(svn_opt_print_help5(os, "svnsync",
opt_baton ? opt_baton->version : FALSE,
opt_baton ? opt_baton->quiet : FALSE,
/*###opt_state ? opt_state->verbose :*/ FALSE,
@@ -1960,7 +1965,7 @@ help_cmd(apr_getopt_t *os, void *baton, apr_pool_t *pool)
static svn_error_t *
sub_main(int *exit_code, int argc, const char *argv[], apr_pool_t *pool)
{
- const svn_opt_subcommand_desc2_t *subcommand = NULL;
+ const svn_opt_subcommand_desc3_t *subcommand = NULL;
apr_array_header_t *received_opts;
opt_baton_t opt_baton;
svn_config_t *config;
@@ -2189,7 +2194,7 @@ sub_main(int *exit_code, int argc, const char *argv[], apr_pool_t *pool)
}
if (opt_baton.help)
- subcommand = svn_opt_get_canonical_subcommand2(svnsync_cmd_table, "help");
+ subcommand = svn_opt_get_canonical_subcommand3(svnsync_cmd_table, "help");
/* The --non-interactive and --force-interactive options are mutually
* exclusive. */
@@ -2269,8 +2274,8 @@ sub_main(int *exit_code, int argc, const char *argv[], apr_pool_t *pool)
if (opt_baton.version)
{
/* Use the "help" subcommand to handle "--version". */
- static const svn_opt_subcommand_desc2_t pseudo_cmd =
- { "--version", help_cmd, {0}, "",
+ static const svn_opt_subcommand_desc3_t pseudo_cmd =
+ { "--version", help_cmd, {0}, {""},
{svnsync_opt_version, /* must accept its own option */
'q', /* --quiet */
} };
@@ -2290,7 +2295,7 @@ sub_main(int *exit_code, int argc, const char *argv[], apr_pool_t *pool)
SVN_ERR(svn_utf_cstring_to_utf8(&first_arg, os->argv[os->ind++],
pool));
- subcommand = svn_opt_get_canonical_subcommand2(svnsync_cmd_table,
+ subcommand = svn_opt_get_canonical_subcommand3(svnsync_cmd_table,
first_arg);
if (subcommand == NULL)
{
@@ -2308,11 +2313,11 @@ sub_main(int *exit_code, int argc, const char *argv[], apr_pool_t *pool)
if (opt_id == 'h' || opt_id == '?')
continue;
- if (! svn_opt_subcommand_takes_option3(subcommand, opt_id, NULL))
+ if (! svn_opt_subcommand_takes_option4(subcommand, opt_id, NULL))
{
const char *optstr;
const apr_getopt_option_t *badopt =
- svn_opt_get_option_from_code2(opt_id, svnsync_options, subcommand,
+ svn_opt_get_option_from_code3(opt_id, svnsync_options, subcommand,
pool);
svn_opt_format_option(&optstr, badopt, FALSE, pool);
if (subcommand->name[0] == '-')