|
Subversion
|
Go to the documentation of this file.
33 #include <apr_pools.h>
34 #include <apr_getopt.h>
35 #include <apr_tables.h>
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 #define APR_WANT_STDIO
65 apr_getopt_t *os,
void *baton, apr_pool_t *pool);
69 #define SVN_OPT_MAX_ALIASES 3
72 #define SVN_OPT_MAX_OPTIONS 50
76 #define SVN_OPT_MAX_PARAGRAPHS 100
81 #define SVN_OPT_FIRST_LONGOPT_ID 256
184 const char *cmd_name);
197 const char *cmd_name);
212 const char *cmd_name);
226 const apr_getopt_option_t *
228 const apr_getopt_option_t *option_table,
240 const apr_getopt_option_t *
242 const apr_getopt_option_t *option_table,
255 const apr_getopt_option_t *
257 const apr_getopt_option_t *option_table);
271 const int *global_options);
284 const int *global_options);
330 const apr_getopt_option_t *opt_table,
346 const apr_getopt_option_t *opt_table,
362 const apr_getopt_option_t *opt_table,
375 const apr_getopt_option_t *opt,
399 const apr_getopt_option_t *options_table,
400 const int *global_options,
414 const apr_getopt_option_t *options_table,
415 const int *global_options,
428 const apr_getopt_option_t *options_table,
442 const apr_getopt_option_t *options_table,
598 const apr_array_header_t *known_targets,
614 const apr_array_header_t *known_targets,
636 const apr_array_header_t *known_targets,
739 const char **truepath,
780 const char *pgm_name,
784 const char *version_footer,
787 const apr_getopt_option_t *option_table,
788 const int *global_options,
802 const char *pgm_name,
806 const char *version_footer,
809 const apr_getopt_option_t *option_table,
810 const int *global_options,
823 const char *pgm_name,
826 const char *version_footer,
829 const apr_getopt_option_t *option_table,
830 const int *global_options,
844 const char *pgm_name,
847 const char *version_footer,
850 const apr_getopt_option_t *option_table,
863 const char *pgm_name,
866 const char *version_footer,
869 const apr_getopt_option_t *option_table,
svn_error_t * svn_opt_print_help2(apr_getopt_t *os, const char *pgm_name, svn_boolean_t print_version, svn_boolean_t quiet, const char *version_footer, const char *header, const svn_opt_subcommand_desc2_t *cmd_table, const apr_getopt_option_t *option_table, const char *footer, apr_pool_t *pool)
Same as svn_opt_print_help3(), but with global_options always NULL.
svn_error_t * svn_opt_print_help3(apr_getopt_t *os, const char *pgm_name, svn_boolean_t print_version, svn_boolean_t quiet, const char *version_footer, const char *header, const svn_opt_subcommand_desc2_t *cmd_table, const apr_getopt_option_t *option_table, const int *global_options, const char *footer, apr_pool_t *pool)
Same as svn_opt_print_help4(), but with verbose always FALSE.
const char * aliases[3]
A list of alias names for this command (e.g., 'up' for 'update').
svn_boolean_t svn_opt_subcommand_takes_option3(const svn_opt_subcommand_desc2_t *command, int option_code, const int *global_options)
Same as svn_opt_subcommand_takes_option4(), but with a different version of the subcommand descriptio...
svn_opt_revision_kind
Various ways of specifying revisions.
svn_error_t * svn_opt_args_to_target_array(apr_array_header_t **targets_p, apr_getopt_t *os, const apr_array_header_t *known_targets, svn_opt_revision_t *start_revision, svn_opt_revision_t *end_revision, svn_boolean_t extract_revisions, apr_pool_t *pool)
The same as svn_opt_args_to_target_array2() except that, in addition, if extract_revisions is set,...
void svn_opt_print_generic_help(const char *header, const svn_opt_subcommand_desc_t *cmd_table, const apr_getopt_option_t *opt_table, const char *footer, apr_pool_t *pool, FILE *stream)
Same as svn_opt_print_generic_help2(), but acts on svn_opt_subcommand_desc_t.
struct svn_opt_subcommand_desc_t svn_opt_subcommand_desc_t
One element of a subcommand dispatch table.
svn_error_t * svn_opt_args_to_target_array2(apr_array_header_t **targets_p, apr_getopt_t *os, const apr_array_header_t *known_targets, apr_pool_t *pool)
This is the same as svn_opt_args_to_target_array3() except that it silently ignores paths that have t...
Option and argument parsing for Subversion command lines (common implementation)
const svn_opt_subcommand_desc_t * svn_opt_get_canonical_subcommand(const svn_opt_subcommand_desc_t *table, const char *cmd_name)
Return the entry in table whose name matches cmd_name, or NULL if none.
One element of a subcommand dispatch table.
void svn_opt_subcommand_help4(const char *subcommand, const svn_opt_subcommand_desc3_t *table, const apr_getopt_option_t *options_table, const int *global_options, apr_pool_t *pool)
Get subcommand's usage from table, and print it to stdout.
svn_boolean_t svn_opt_subcommand_takes_option4(const svn_opt_subcommand_desc3_t *command, int option_code, const int *global_options)
Return TRUE iff subcommand command supports option option_code, else return FALSE.
const svn_opt_subcommand_desc3_t * svn_opt_get_canonical_subcommand3(const svn_opt_subcommand_desc3_t *table, const char *cmd_name)
Return the entry in table whose name matches cmd_name, or NULL if none.
const apr_getopt_option_t * svn_opt_get_option_from_code2(int code, const apr_getopt_option_t *option_table, const svn_opt_subcommand_desc2_t *command, apr_pool_t *pool)
Same as svn_opt_get_option_from_code3(), but with a different version of the subcommand description t...
int svn_opt_parse_revision(svn_opt_revision_t *start_revision, svn_opt_revision_t *end_revision, const char *arg, apr_pool_t *pool)
Set *start_revision and/or *end_revision according to arg, where arg is "N" or "N:M",...
union svn_opt_revision_value_t svn_opt_revision_value_t
A revision value, which can be specified as a number or a date.
void svn_opt_subcommand_help2(const char *subcommand, const svn_opt_subcommand_desc2_t *table, const apr_getopt_option_t *options_table, apr_pool_t *pool)
Same as svn_opt_subcommand_help3(), but with global_options always NULL.
const char * name
The full name of this command.
A revision, specified in one of svn_opt_revision_kind ways.
svn_error_t * svn_opt_args_to_target_array3(apr_array_header_t **targets_p, apr_getopt_t *os, const apr_array_header_t *known_targets, apr_pool_t *pool)
Pull remaining target arguments from os into *targets_p, converting them to UTF-8,...
const char * aliases[3]
A list of alias names for this command (e.g., 'up' for 'update').
void svn_opt_format_option(const char **string, const apr_getopt_option_t *opt, svn_boolean_t doc, apr_pool_t *pool)
Print an option opt nicely into a string allocated in pool.
int valid_options[50]
A list of options accepted by this command.
void svn_opt_print_generic_help2(const char *header, const svn_opt_subcommand_desc2_t *cmd_table, const apr_getopt_option_t *opt_table, const char *footer, apr_pool_t *pool, FILE *stream)
Same as svn_opt_print_generic_help3(), but with a different version of the subcommand description tab...
svn_error_t * svn_opt_parse_path(svn_opt_revision_t *rev, const char **truepath, const char *path, apr_pool_t *pool)
Parse a working-copy path or URL in path, extracting any trailing revision specifier of the form "@re...
struct svn_opt_subcommand_desc3_t::@0 desc_overrides[50]
A list of option help descriptions, keyed by the option unique enum (the 2nd field in apr_getopt_opti...
One element of a subcommand dispatch table.
A revision value, which can be specified as a number or a date.
svn_revnum_t number
The revision number.
const apr_getopt_option_t * svn_opt_get_option_from_code3(int code, const apr_getopt_option_t *option_table, const svn_opt_subcommand_desc3_t *command, apr_pool_t *pool)
Return pointer to an apr_getopt_option_t for the option whose option code is code,...
void svn_opt_subcommand_help3(const char *subcommand, const svn_opt_subcommand_desc2_t *table, const apr_getopt_option_t *options_table, const int *global_options, apr_pool_t *pool)
Same as svn_opt_subcommand_help4(), but with a different version of the subcommand description table.
apr_time_t date
the date of the revision
const char * help
A brief string describing this command, for usage messages.
svn_error_t * svn_opt_print_help4(apr_getopt_t *os, const char *pgm_name, svn_boolean_t print_version, svn_boolean_t quiet, svn_boolean_t verbose, const char *version_footer, const char *header, const svn_opt_subcommand_desc2_t *cmd_table, const apr_getopt_option_t *option_table, const int *global_options, const char *footer, apr_pool_t *pool)
Same as svn_opt_print_help5(), but with a different version of the subcommand description table.
svn_opt_revision_value_t value
Extra data qualifying the kind.
svn_error_t * svn_opt_parse_num_args(apr_array_header_t **args_p, apr_getopt_t *os, int num_args, apr_pool_t *pool)
Parse num_args non-target arguments from the list of arguments in os->argv, return them as const char...
struct svn_opt_revision_t svn_opt_revision_t
A revision, specified in one of svn_opt_revision_kind ways.
svn_error_t * svn_opt_parse_revprop(apr_hash_t **revprops, const char *revprop_spec, apr_pool_t *pool)
Parse revprop key/value pair from revprop_spec (name[=value]) into revprops, making copies of both wi...
int valid_options[50]
A list of options accepted by this command.
enum svn_opt_revision_kind kind
See svn_opt_revision_kind.
#define SVN_OPT_MAX_ALIASES
The maximum number of aliases a subcommand can have.
void svn_opt_print_generic_help3(const char *header, const svn_opt_subcommand_desc3_t *cmd_table, const apr_getopt_option_t *opt_table, const char *footer, apr_pool_t *pool, FILE *stream)
Print a generic (not command-specific) usage message to stream.
svn_opt_subcommand_t * cmd_func
The function this command invokes.
svn_opt_revision_t end
The last revision in the range.
void svn_opt_subcommand_help(const char *subcommand, const svn_opt_subcommand_desc_t *table, const apr_getopt_option_t *options_table, apr_pool_t *pool)
Same as svn_opt_subcommand_help2(), but acts on svn_opt_subcommand_desc_t.
struct svn_opt_subcommand_desc2_t svn_opt_subcommand_desc2_t
One element of a subcommand dispatch table.
svn_error_t * svn_opt_parse_all_args(apr_array_header_t **args_p, apr_getopt_t *os, apr_pool_t *pool)
Parse all remaining arguments from os->argv, return them as const char * in *args_p,...
const svn_opt_subcommand_desc2_t * svn_opt_get_canonical_subcommand2(const svn_opt_subcommand_desc2_t *table, const char *cmd_name)
Same as svn_opt_get_canonical_subcommand3(), but with a different version of the subcommand descripti...
svn_error_t * svn_opt_print_help5(apr_getopt_t *os, const char *pgm_name, svn_boolean_t print_version, svn_boolean_t quiet, svn_boolean_t verbose, const char *version_footer, const char *header, const svn_opt_subcommand_desc3_t *cmd_table, const apr_getopt_option_t *option_table, const int *global_options, const char *footer, apr_pool_t *pool)
Central dispatcher function for various kinds of help message.
struct svn_opt_subcommand_desc3_t svn_opt_subcommand_desc3_t
One element of a subcommand dispatch table.
svn_boolean_t svn_opt_subcommand_takes_option(const svn_opt_subcommand_desc_t *command, int option_code)
Return TRUE iff subcommand command supports option option_code, else return FALSE.
const char * aliases[3]
A list of alias names for this command (e.g., 'up' for 'update').
struct svn_opt_subcommand_desc2_t::@1 desc_overrides[50]
A list of option help descriptions, keyed by the option unique enum (the 2nd field in apr_getopt_opti...
svn_error_t * svn_opt_resolve_revisions(svn_opt_revision_t *peg_rev, svn_opt_revision_t *op_rev, svn_boolean_t is_url, svn_boolean_t notice_local_mods, apr_pool_t *pool)
Resolve peg revisions and operational revisions in the following way:
#define SVN_OPT_MAX_OPTIONS
The maximum number of options that can be accepted by a subcommand.
#define SVN_OPT_MAX_PARAGRAPHS
The maximum number of paragraphs of help text a subcommand can have.
One element of a subcommand dispatch table.
svn_opt_revision_t start
The first revision in the range.
const apr_getopt_option_t * svn_opt_get_option_from_code(int code, const apr_getopt_option_t *option_table)
Return the first entry from option_table whose option code is code, or NULL if no match.
void svn_opt_push_implicit_dot_target(apr_array_header_t *targets, apr_pool_t *pool)
If no targets exist in *targets, add ‘.
struct svn_opt_revision_range_t svn_opt_revision_range_t
A revision range, specified in one of svn_opt_revision_kind ways.
int svn_boolean_t
YABT: Yet Another Boolean Type.
#define SVN_DEPRECATED
Macro used to mark deprecated functions.
long int svn_revnum_t
A revision number.
svn_error_t *() svn_opt_subcommand_t(apr_getopt_t *os, void *baton, apr_pool_t *pool)
All subcommand procedures in Subversion conform to this prototype.
int svn_opt_parse_revision_to_range(apr_array_header_t *opt_ranges, const char *arg, apr_pool_t *pool)
Parse arg, where arg is "N" or "N:M", into a svn_opt_revision_range_t and push that onto opt_ranges.
svn_error_t * svn_opt_print_help(apr_getopt_t *os, const char *pgm_name, svn_boolean_t print_version, svn_boolean_t quiet, const char *version_footer, const char *header, const svn_opt_subcommand_desc_t *cmd_table, const apr_getopt_option_t *option_table, const char *footer, apr_pool_t *pool)
Same as svn_opt_print_help2(), but acts on svn_opt_subcommand_desc_t.
int valid_options[50]
A list of options accepted by this command.
svn_opt_subcommand_t * cmd_func
The function this command invokes.
const char * help
A brief string describing this command, for usage messages.
const char * name
The full name of this command.
const char * name
The full name of this command.
const char * help[100]
A multi-paragraph string describing this command.
svn_opt_subcommand_t * cmd_func
The function this command invokes.
svn_boolean_t svn_opt_subcommand_takes_option2(const svn_opt_subcommand_desc2_t *command, int option_code)
Same as svn_opt_subcommand_takes_option3(), but with NULL for global_options.
A revision range, specified in one of svn_opt_revision_kind ways.