subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1522518 - in /subversion/trunk/subversion: svn/ svnadmin/ svnauth/ svndumpfilter/ svnlook/ svnmucc/ svnrdump/ svnserve/ svnsync/ svnversion/ tests/cmdline/ tests/cmdline/getopt_tests_data/
Date Thu, 12 Sep 2013 10:43:22 GMT
Author: stsp
Date: Thu Sep 12 10:43:21 2013
New Revision: 1522518

URL: http://svn.apache.org/r1522518
Log:
Make all commands provide a brief description of themselves in help output,
and consistently tell users where to find the program version.

Undo a change made back in 2004 (r851470) to make 'svn' show its version
number in help output. That behaviour was not carried over to other commands
and hence inconsistent. Since r860375 the --version option is prominently
documented in the main help text of many commands, and as of this commit
that is done consistently across all commands.

* subversion/svn/help-cmd.c
  (svn_cl__help): Don't show the version number in help output, instructing
    people to use the --version option is enough.

* subversion/svnadmin/svnadmin.c,
  subversion/svnauth/svnauth.c,
  subversion/svndumpfilter/svndumpfilter.c,
  (subcommand_help): Describe program's purpose in help output.

* subversion/svnlook/svnlook.c:
  (subcommand_help): Describe program's purpose in help output and mention
   the --version option in the main help text.

* subversion/svnmucc/svnmucc.c
  (usage): Describe program's purpose in help output and mention the
    --version option in the main help text.

* subversion/svnrdump/svnrdump.c,
  subversion/svnsync/svnsync.c:
  (help_cmd): Describe program's purpose in help output.

* subversion/svnserve/svnserve.c,
  subversion/svnversion/svnversion.c:
  (help): Describe program's purpose in help output and mention the
    --version option in the main help text.

* subversion/tests/cmdline/getopt_tests.py
  (rep_lines_res): No more need to substititute version number in 'svn help'.

* subversion/tests/cmdline/getopt_tests_data/svn--help_stdout,
  subversion/tests/cmdline/getopt_tests_data/svn_help_stdout:
   Adjust expected output.

Modified:
    subversion/trunk/subversion/svn/help-cmd.c
    subversion/trunk/subversion/svnadmin/svnadmin.c
    subversion/trunk/subversion/svnauth/svnauth.c
    subversion/trunk/subversion/svndumpfilter/svndumpfilter.c
    subversion/trunk/subversion/svnlook/svnlook.c
    subversion/trunk/subversion/svnmucc/svnmucc.c
    subversion/trunk/subversion/svnrdump/svnrdump.c
    subversion/trunk/subversion/svnserve/svnserve.c
    subversion/trunk/subversion/svnsync/svnsync.c
    subversion/trunk/subversion/svnversion/svnversion.c
    subversion/trunk/subversion/tests/cmdline/getopt_tests.py
    subversion/trunk/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
    subversion/trunk/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout

Modified: subversion/trunk/subversion/svn/help-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/help-cmd.c?rev=1522518&r1=1522517&r2=1522518&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/help-cmd.c (original)
+++ subversion/trunk/subversion/svn/help-cmd.c Thu Sep 12 10:43:21 2013
@@ -32,7 +32,6 @@
 #include "svn_string.h"
 #include "svn_config.h"
 #include "svn_error.h"
-#include "svn_version.h"
 #include "cl.h"
 
 
@@ -47,10 +46,9 @@ svn_cl__help(apr_getopt_t *os,
   svn_cl__opt_state_t *opt_state = NULL;
   svn_stringbuf_t *version_footer = NULL;
 
-  /* xgettext: the %s is for SVN_VER_NUMBER. */
-  char help_header_template[] =
+  char help_header[] =
   N_("usage: svn <subcommand> [options] [args]\n"
-     "Subversion command-line client, version %s.\n"
+     "Subversion command-line client.\n"
      "Type 'svn help <subcommand>' for help on a specific subcommand.\n"
      "Type 'svn --version' to see the program version and RA modules\n"
      "  or 'svn --version --quiet' to see just the version number.\n"
@@ -65,9 +63,6 @@ svn_cl__help(apr_getopt_t *os,
   N_("Subversion is a tool for version control.\n"
      "For additional information, see http://subversion.apache.org/\n");
 
-  char *help_header =
-    apr_psprintf(pool, _(help_header_template), SVN_VER_NUMBER);
-
   const char *ra_desc_start
     = _("The following repository access (RA) modules are available:\n\n");
 

Modified: subversion/trunk/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/svnadmin.c?rev=1522518&r1=1522517&r2=1522518&view=diff
==============================================================================
--- subversion/trunk/subversion/svnadmin/svnadmin.c (original)
+++ subversion/trunk/subversion/svnadmin/svnadmin.c Thu Sep 12 10:43:21 2013
@@ -1180,6 +1180,7 @@ subcommand_help(apr_getopt_t *os, void *
   struct svnadmin_opt_state *opt_state = baton;
   const char *header =
     _("general usage: svnadmin SUBCOMMAND REPOS_PATH  [ARGS & OPTIONS ...]\n"
+      "Subversion repository administration tool.\n"
       "Type 'svnadmin help <subcommand>' for help on a specific subcommand.\n"
       "Type 'svnadmin --version' to see the program version and FS modules.\n"
       "\n"

Modified: subversion/trunk/subversion/svnauth/svnauth.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnauth/svnauth.c?rev=1522518&r1=1522517&r2=1522518&view=diff
==============================================================================
--- subversion/trunk/subversion/svnauth/svnauth.c (original)
+++ subversion/trunk/subversion/svnauth/svnauth.c Thu Sep 12 10:43:21 2013
@@ -185,6 +185,7 @@ subcommand_help(apr_getopt_t *os, void *
   struct svnauth_opt_state *opt_state = baton;
   const char *header =
     _("general usage: svnauth SUBCOMMAND [ARGS & OPTIONS ...]\n"
+      "Subversion authentication credentials management tool.\n"
       "Type 'svnauth help <subcommand>' for help on a specific subcommand.\n"
       "Type 'svnauth --version' to see the program version and available\n"
       "authentication credential caches.\n"

Modified: subversion/trunk/subversion/svndumpfilter/svndumpfilter.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svndumpfilter/svndumpfilter.c?rev=1522518&r1=1522517&r2=1522518&view=diff
==============================================================================
--- subversion/trunk/subversion/svndumpfilter/svndumpfilter.c (original)
+++ subversion/trunk/subversion/svndumpfilter/svndumpfilter.c Thu Sep 12 10:43:21 2013
@@ -1146,6 +1146,7 @@ subcommand_help(apr_getopt_t *os, void *
   struct svndumpfilter_opt_state *opt_state = baton;
   const char *header =
     _("general usage: svndumpfilter SUBCOMMAND [ARGS & OPTIONS ...]\n"
+      "Subversion repository dump filtering tool.\n"
       "Type 'svndumpfilter help <subcommand>' for help on a "
       "specific subcommand.\n"
       "Type 'svndumpfilter --version' to see the program version.\n"

Modified: subversion/trunk/subversion/svnlook/svnlook.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnlook/svnlook.c?rev=1522518&r1=1522517&r2=1522518&view=diff
==============================================================================
--- subversion/trunk/subversion/svnlook/svnlook.c (original)
+++ subversion/trunk/subversion/svnlook/svnlook.c Thu Sep 12 10:43:21 2013
@@ -2212,11 +2212,12 @@ subcommand_help(apr_getopt_t *os, void *
   struct svnlook_opt_state *opt_state = baton;
   const char *header =
     _("general usage: svnlook SUBCOMMAND REPOS_PATH [ARGS & OPTIONS ...]\n"
+      "Subversion repository inspection tool.\n"
+      "Type 'svnlook help <subcommand>' for help on a specific subcommand.\n"
+      "Type 'svnlook --version' to see the program version and FS modules.\n"
       "Note: any subcommand which takes the '--revision' and '--transaction'\n"
       "      options will, if invoked without one of those options, act on\n"
       "      the repository's youngest revision.\n"
-      "Type 'svnlook help <subcommand>' for help on a specific subcommand.\n"
-      "Type 'svnlook --version' to see the program version and FS modules.\n"
       "\n"
       "Available subcommands:\n");
 

Modified: subversion/trunk/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnmucc/svnmucc.c?rev=1522518&r1=1522517&r2=1522518&view=diff
==============================================================================
--- subversion/trunk/subversion/svnmucc/svnmucc.c (original)
+++ subversion/trunk/subversion/svnmucc/svnmucc.c Thu Sep 12 10:43:21 2013
@@ -922,8 +922,9 @@ usage(apr_pool_t *pool, int exit_val)
 {
   FILE *stream = exit_val == EXIT_SUCCESS ? stdout : stderr;
   svn_error_clear(svn_cmdline_fputs(
-    _("Subversion multiple URL command client\n"
-      "usage: svnmucc ACTION...\n"
+    _("usage: svnmucc ACTION...\n"
+      "Subversion multiple URL command client.\n"
+      "Type 'svnmucc --version' to see the program version.\n"
       "\n"
       "  Perform one or more Subversion repository URL-based ACTIONs, committing\n"
       "  the result as a (single) new revision.\n"

Modified: subversion/trunk/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/svnrdump.c?rev=1522518&r1=1522517&r2=1522518&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/svnrdump.c (original)
+++ subversion/trunk/subversion/svnrdump/svnrdump.c Thu Sep 12 10:43:21 2013
@@ -726,6 +726,7 @@ help_cmd(apr_getopt_t *os,
 {
   const char *header =
     _("general usage: svnrdump SUBCOMMAND URL [-r LOWER[:UPPER]]\n"
+      "Subversion remote repository dump and load tool.\n"
       "Type 'svnrdump help <subcommand>' for help on a specific subcommand.\n"
       "Type 'svnrdump --version' to see the program version and RA modules.\n"
       "\n"

Modified: subversion/trunk/subversion/svnserve/svnserve.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/svnserve.c?rev=1522518&r1=1522517&r2=1522518&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/svnserve.c (original)
+++ subversion/trunk/subversion/svnserve/svnserve.c Thu Sep 12 10:43:21 2013
@@ -310,15 +310,21 @@ static void help(apr_pool_t *pool)
 #ifdef WIN32
   svn_error_clear(svn_cmdline_fputs(_("usage: svnserve [-d | -i | -t | -X "
                                       "| --service] [options]\n"
+                                      "Subversion repository server.\n"
+                                      "Type 'svnserve --version' to see the "
+                                      "program version.\n"
                                       "\n"
                                       "Valid options:\n"),
-                                    stdout, pool));
+                                      stdout, pool));
 #else
   svn_error_clear(svn_cmdline_fputs(_("usage: svnserve [-d | -i | -t | -X] "
                                       "[options]\n"
+                                      "Subversion repository server.\n"
+                                      "Type 'svnserve --version' to see the "
+                                      "program version.\n"
                                       "\n"
                                       "Valid options:\n"),
-                                    stdout, pool));
+                                      stdout, pool));
 #endif
   for (i = 0; svnserve__options[i].name && svnserve__options[i].optch; i++)
     {

Modified: subversion/trunk/subversion/svnsync/svnsync.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnsync/svnsync.c?rev=1522518&r1=1522517&r2=1522518&view=diff
==============================================================================
--- subversion/trunk/subversion/svnsync/svnsync.c (original)
+++ subversion/trunk/subversion/svnsync/svnsync.c Thu Sep 12 10:43:21 2013
@@ -1846,6 +1846,7 @@ help_cmd(apr_getopt_t *os, void *baton, 
 
   const char *header =
     _("general usage: svnsync SUBCOMMAND DEST_URL  [ARGS & OPTIONS ...]\n"
+      "Subversion repository replication tool.\n"
       "Type 'svnsync help <subcommand>' for help on a specific subcommand.\n"
       "Type 'svnsync --version' to see the program version and RA modules.\n"
       "\n"

Modified: subversion/trunk/subversion/svnversion/svnversion.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnversion/svnversion.c?rev=1522518&r1=1522517&r2=1522518&view=diff
==============================================================================
--- subversion/trunk/subversion/svnversion/svnversion.c (original)
+++ subversion/trunk/subversion/svnversion/svnversion.c Thu Sep 12 10:43:21 2013
@@ -57,7 +57,10 @@ help(const apr_getopt_option_t *options,
   svn_error_clear
     (svn_cmdline_fprintf
      (stdout, pool,
-      _("usage: svnversion [OPTIONS] [WC_PATH [TRAIL_URL]]\n\n"
+      _("usage: svnversion [OPTIONS] [WC_PATH [TRAIL_URL]]\n"
+        "Subversion working copy identification tool.\n"
+        "Type 'svnversion --version' to see the program version.\n"
+        "\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"

Modified: subversion/trunk/subversion/tests/cmdline/getopt_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/getopt_tests.py?rev=1522518&r1=1522517&r2=1522518&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/getopt_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/getopt_tests.py Thu Sep 12 10:43:21 2013
@@ -90,13 +90,6 @@ rep_lines_res = [
                  # In 'svn --version --quiet', we print only the version
                  # number in a single line.
                  (re.compile(r'^\d+\.\d+\.\d+(-[a-zA-Z0-9]+)?$'), 'X.Y.Z\n'),
-                 # 'svn --help' has a line with the version number.
-                 # It can vary, for example:
-                 # "Subversion command-line client, version 1.1.0."
-                 # "Subversion command-line client, version 1.1.0-dev."
-                 (re.compile(r'Subversion command-line client, '
-                             'version \d+\.\d+\.\d+(.|-[a-zA-Z0-9]+\.)$'),
-                  'Subversion command-line client, version X.Y.Z.'),
                 ]
 
 # This is a trigger pattern that selects the secondary set of

Modified: subversion/trunk/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout?rev=1522518&r1=1522517&r2=1522518&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout (original)
+++ subversion/trunk/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout Thu Sep 12
10:43:21 2013
@@ -1,5 +1,5 @@
 usage: svn <subcommand> [options] [args]
-Subversion command-line client, version X.Y.Z.
+Subversion command-line client.
 Type 'svn help <subcommand>' for help on a specific subcommand.
 Type 'svn --version' to see the program version and RA modules
   or 'svn --version --quiet' to see just the version number.

Modified: subversion/trunk/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout?rev=1522518&r1=1522517&r2=1522518&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout (original)
+++ subversion/trunk/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout Thu Sep 12
10:43:21 2013
@@ -1,5 +1,5 @@
 usage: svn <subcommand> [options] [args]
-Subversion command-line client, version X.Y.Z.
+Subversion command-line client.
 Type 'svn help <subcommand>' for help on a specific subcommand.
 Type 'svn --version' to see the program version and RA modules
   or 'svn --version --quiet' to see just the version number.



Mime
View raw message