summaryrefslogtreecommitdiff
path: root/subversion/svnlook/svnlook.c
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/svnlook/svnlook.c')
-rw-r--r--subversion/svnlook/svnlook.c160
1 files changed, 97 insertions, 63 deletions
diff --git a/subversion/svnlook/svnlook.c b/subversion/svnlook/svnlook.c
index 261909c00607..d6f9506ba56d 100644
--- a/subversion/svnlook/svnlook.c
+++ b/subversion/svnlook/svnlook.c
@@ -212,110 +212,144 @@ static const apr_getopt_option_t options_table[] =
/* Array of available subcommands.
* The entire list must be terminated with an entry of nulls.
*/
-static const svn_opt_subcommand_desc2_t cmd_table[] =
+static const svn_opt_subcommand_desc3_t cmd_table[] =
{
- {"author", subcommand_author, {0},
- N_("usage: svnlook author REPOS_PATH\n\n"
- "Print the author.\n"),
+ {"author", subcommand_author, {0}, {N_(
+ "usage: svnlook author REPOS_PATH\n"
+ "\n"), N_(
+ "Print the author.\n"
+ )},
{'r', 't'} },
- {"cat", subcommand_cat, {0},
- N_("usage: svnlook cat REPOS_PATH FILE_PATH\n\n"
- "Print the contents of a file. Leading '/' on FILE_PATH is optional.\n"),
+ {"cat", subcommand_cat, {0}, {N_(
+ "usage: svnlook cat REPOS_PATH FILE_PATH\n"
+ "\n"), N_(
+ "Print the contents of a file. Leading '/' on FILE_PATH is optional.\n"
+ )},
{'r', 't'} },
- {"changed", subcommand_changed, {0},
- N_("usage: svnlook changed REPOS_PATH\n\n"
- "Print the paths that were changed.\n"),
+ {"changed", subcommand_changed, {0}, {N_(
+ "usage: svnlook changed REPOS_PATH\n"
+ "\n"), N_(
+ "Print the paths that were changed.\n"
+ )},
{'r', 't', svnlook__copy_info} },
- {"date", subcommand_date, {0},
- N_("usage: svnlook date REPOS_PATH\n\n"
- "Print the datestamp.\n"),
+ {"date", subcommand_date, {0}, {N_(
+ "usage: svnlook date REPOS_PATH\n"
+ "\n"), N_(
+ "Print the datestamp.\n"
+ )},
{'r', 't'} },
- {"diff", subcommand_diff, {0},
- N_("usage: svnlook diff REPOS_PATH\n\n"
- "Print GNU-style diffs of changed files and properties.\n"),
+ {"diff", subcommand_diff, {0}, {N_(
+ "usage: svnlook diff REPOS_PATH\n"
+ "\n"), N_(
+ "Print GNU-style diffs of changed files and properties.\n"
+ )},
{'r', 't', svnlook__no_diff_deleted, svnlook__no_diff_added,
svnlook__diff_copy_from, svnlook__diff_cmd, 'x',
svnlook__ignore_properties, svnlook__properties_only} },
- {"dirs-changed", subcommand_dirschanged, {0},
- N_("usage: svnlook dirs-changed REPOS_PATH\n\n"
+ {"dirs-changed", subcommand_dirschanged, {0}, {N_(
+ "usage: svnlook dirs-changed REPOS_PATH\n"
+ "\n"), N_(
"Print the directories that were themselves changed (property edits)\n"
- "or whose file children were changed.\n"),
+ "or whose file children were changed.\n"
+ )},
{'r', 't'} },
- {"filesize", subcommand_filesize, {0},
- N_("usage: svnlook filesize REPOS_PATH PATH_IN_REPOS\n\n"
+ {"filesize", subcommand_filesize, {0}, {N_(
+ "usage: svnlook filesize REPOS_PATH PATH_IN_REPOS\n"
+ "\n"), N_(
"Print the size (in bytes) of the file located at PATH_IN_REPOS as\n"
- "it is represented in the repository.\n"),
+ "it is represented in the repository.\n"
+ )},
{'r', 't'} },
- {"help", subcommand_help, {"?", "h"},
- N_("usage: svnlook help [SUBCOMMAND...]\n\n"
- "Describe the usage of this program or its subcommands.\n"),
+ {"help", subcommand_help, {"?", "h"}, {N_(
+ "usage: svnlook help [SUBCOMMAND...]\n"
+ "\n"), N_(
+ "Describe the usage of this program or its subcommands.\n"
+ )},
{0} },
- {"history", subcommand_history, {0},
- N_("usage: svnlook history REPOS_PATH [PATH_IN_REPOS]\n\n"
+ {"history", subcommand_history, {0}, {N_(
+ "usage: svnlook history REPOS_PATH [PATH_IN_REPOS]\n"
+ "\n"), N_(
"Print information about the history of a path in the repository (or\n"
- "the root directory if no path is supplied).\n"),
+ "the root directory if no path is supplied).\n"
+ )},
{'r', svnlook__show_ids, 'l'} },
- {"info", subcommand_info, {0},
- N_("usage: svnlook info REPOS_PATH\n\n"
- "Print the author, datestamp, log message size, and log message.\n"),
+ {"info", subcommand_info, {0}, {N_(
+ "usage: svnlook info REPOS_PATH\n"
+ "\n"), N_(
+ "Print the author, datestamp, log message size, and log message.\n"
+ )},
{'r', 't'} },
- {"lock", subcommand_lock, {0},
- N_("usage: svnlook lock REPOS_PATH PATH_IN_REPOS\n\n"
- "If a lock exists on a path in the repository, describe it.\n"),
+ {"lock", subcommand_lock, {0}, {N_(
+ "usage: svnlook lock REPOS_PATH PATH_IN_REPOS\n"
+ "\n"), N_(
+ "If a lock exists on a path in the repository, describe it.\n"
+ )},
{0} },
- {"log", subcommand_log, {0},
- N_("usage: svnlook log REPOS_PATH\n\n"
- "Print the log message.\n"),
+ {"log", subcommand_log, {0}, {N_(
+ "usage: svnlook log REPOS_PATH\n"
+ "\n"), N_(
+ "Print the log message.\n"
+ )},
{'r', 't'} },
- {"propget", subcommand_pget, {"pget", "pg"},
- N_("usage: 1. svnlook propget REPOS_PATH PROPNAME PATH_IN_REPOS\n"
+ {"propget", subcommand_pget, {"pget", "pg"}, {N_(
+ "usage: 1. svnlook propget REPOS_PATH PROPNAME PATH_IN_REPOS\n"
" "
/* The line above is actually needed, so do NOT delete it! */
- " 2. svnlook propget --revprop REPOS_PATH PROPNAME\n\n"
+ " 2. svnlook propget --revprop REPOS_PATH PROPNAME\n"
+ "\n"), N_(
"Print the raw value of a property on a path in the repository.\n"
- "With --revprop, print the raw value of a revision property.\n"),
+ "With --revprop, print the raw value of a revision property.\n"
+ )},
{'r', 't', 'v', svnlook__revprop_opt, svnlook__show_inherited_props} },
- {"proplist", subcommand_plist, {"plist", "pl"},
- N_("usage: 1. svnlook proplist REPOS_PATH PATH_IN_REPOS\n"
+ {"proplist", subcommand_plist, {"plist", "pl"}, {N_(
+ "usage: 1. svnlook proplist REPOS_PATH PATH_IN_REPOS\n"
" "
/* The line above is actually needed, so do NOT delete it! */
- " 2. svnlook proplist --revprop REPOS_PATH\n\n"
+ " 2. svnlook proplist --revprop REPOS_PATH\n"
+ "\n"), N_(
"List the properties of a path in the repository, or\n"
"with the --revprop option, revision properties.\n"
- "With -v, show the property values too.\n"),
+ "With -v, show the property values too.\n"
+ )},
{'r', 't', 'v', svnlook__revprop_opt, svnlook__xml_opt,
svnlook__show_inherited_props} },
- {"tree", subcommand_tree, {0},
- N_("usage: svnlook tree REPOS_PATH [PATH_IN_REPOS]\n\n"
+ {"tree", subcommand_tree, {0}, {N_(
+ "usage: svnlook tree REPOS_PATH [PATH_IN_REPOS]\n"
+ "\n"), N_(
"Print the tree, starting at PATH_IN_REPOS (if supplied, at the root\n"
- "of the tree otherwise), optionally showing node revision ids.\n"),
+ "of the tree otherwise), optionally showing node revision ids.\n"
+ )},
{'r', 't', 'N', svnlook__show_ids, svnlook__full_paths, 'M'} },
- {"uuid", subcommand_uuid, {0},
- N_("usage: svnlook uuid REPOS_PATH\n\n"
- "Print the repository's UUID.\n"),
+ {"uuid", subcommand_uuid, {0}, {N_(
+ "usage: svnlook uuid REPOS_PATH\n"
+ "\n"), N_(
+ "Print the repository's UUID.\n"
+ )},
{0} },
- {"youngest", subcommand_youngest, {0},
- N_("usage: svnlook youngest REPOS_PATH\n\n"
- "Print the youngest revision number.\n"),
+ {"youngest", subcommand_youngest, {0}, {N_(
+ "usage: svnlook youngest REPOS_PATH\n"
+ "\n"), N_(
+ "Print the youngest revision number.\n"
+ )},
{svnlook__no_newline} },
- { NULL, NULL, {0}, NULL, {0} }
+ { NULL, NULL, {0}, {NULL}, {0} }
};
@@ -2222,7 +2256,7 @@ subcommand_help(apr_getopt_t *os, void *baton, apr_pool_t *pool)
version_footer = svn_stringbuf_create(fs_desc_start, pool);
SVN_ERR(svn_fs_print_modules(version_footer, pool));
- SVN_ERR(svn_opt_print_help4(os, "svnlook",
+ SVN_ERR(svn_opt_print_help5(os, "svnlook",
opt_state ? opt_state->version : FALSE,
opt_state ? opt_state->quiet : FALSE,
opt_state ? opt_state->verbose : FALSE,
@@ -2437,7 +2471,7 @@ sub_main(int *exit_code, int argc, const char *argv[], apr_pool_t *pool)
svn_error_t *err;
apr_status_t apr_err;
- const svn_opt_subcommand_desc2_t *subcommand = NULL;
+ const svn_opt_subcommand_desc3_t *subcommand = NULL;
struct svnlook_opt_state opt_state;
apr_getopt_t *os;
int opt_id;
@@ -2634,7 +2668,7 @@ sub_main(int *exit_code, int argc, const char *argv[], apr_pool_t *pool)
just typos/mistakes. Whatever the case, the subcommand to
actually run is subcommand_help(). */
if (opt_state.help)
- subcommand = svn_opt_get_canonical_subcommand2(cmd_table, "help");
+ subcommand = svn_opt_get_canonical_subcommand3(cmd_table, "help");
/* If we're not running the `help' subcommand, then look for a
subcommand in the first argument. */
@@ -2645,8 +2679,8 @@ sub_main(int *exit_code, int argc, const char *argv[], apr_pool_t *pool)
if (opt_state.version)
{
/* Use the "help" subcommand to handle the "--version" option. */
- static const svn_opt_subcommand_desc2_t pseudo_cmd =
- { "--version", subcommand_help, {0}, "",
+ static const svn_opt_subcommand_desc3_t pseudo_cmd =
+ { "--version", subcommand_help, {0}, {""},
{svnlook__version, /* must accept its own option */
'q', 'v',
} };
@@ -2669,7 +2703,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(cmd_table, first_arg);
+ subcommand = svn_opt_get_canonical_subcommand3(cmd_table, first_arg);
if (subcommand == NULL)
{
svn_error_clear(
@@ -2762,11 +2796,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, options_table, subcommand,
+ svn_opt_get_option_from_code3(opt_id, options_table, subcommand,
pool);
svn_opt_format_option(&optstr, badopt, FALSE, pool);
if (subcommand->name[0] == '-')