2 * help-cmd.c -- Provide help
4 * ====================================================================
5 * Copyright (c) 2000-2004 CollabNet. All rights reserved.
7 * This software is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at http://subversion.tigris.org/license-1.html.
10 * If newer versions of this license are posted there, you may use a
11 * newer version instead, at your option.
13 * This software consists of voluntary contributions made by many
14 * individuals. For exact contribution history, see the revision
15 * history and logs, available at http://subversion.tigris.org/.
16 * ====================================================================
19 /* ==================================================================== */
25 #include "svn_string.h"
26 #include "svn_error.h"
27 #include "svn_version.h"
30 #include "svn_private_config.h"
35 /* This implements the `svn_opt_subcommand_t' interface. */
37 svn_cl__help(apr_getopt_t
*os
,
41 svn_cl__opt_state_t
*opt_state
;
43 /* xgettext: the %s is for SVN_VER_NUMBER. */
44 char help_header_template
[] =
45 N_("usage: svn <subcommand> [options] [args]\n"
46 "Subversion command-line client, version %s.\n"
47 "Type 'svn help <subcommand>' for help on a specific subcommand.\n"
48 "Type 'svn --version' to see the program version and RA modules\n"
49 " or 'svn --version --quiet' to see just the version number.\n"
51 "Most subcommands take file and/or directory arguments, recursing\n"
52 "on the directories. If no arguments are supplied to such a\n"
53 "command, it recurses on the current directory (inclusive) by default.\n"
55 "Available subcommands:\n");
58 N_("Subversion is a tool for version control.\n"
59 "For additional information, see http://subversion.tigris.org/\n");
62 apr_psprintf(pool
, _(help_header_template
), SVN_VER_NUMBER
);
64 const char *ra_desc_start
65 = _("The following repository access (RA) modules are available:\n\n");
67 svn_stringbuf_t
*version_footer
;
70 opt_state
= ((svn_cl__cmd_baton_t
*) baton
)->opt_state
;
74 version_footer
= svn_stringbuf_create(ra_desc_start
, pool
);
75 SVN_ERR(svn_ra_print_modules(version_footer
, pool
));
77 return svn_opt_print_help3(os
,
78 "svn", /* ### erm, derive somehow? */
79 opt_state
? opt_state
->version
: FALSE
,
80 opt_state
? opt_state
->quiet
: FALSE
,
82 help_header
, /* already gettext()'d */
85 svn_cl__global_options
,