Does anyone have any objections to this patch? It makes 'svn help' do
this:
$ svn help
usage: svn <subcommand> [options] [args]
Type 'svn help <subcommand>' for help on a specific subcommand.
Type 'svn --version' to see the version number of this software.
Most subcommands take file and/or directory arguments, recursing
on the directories. If no arguments are supplied to such a
command, it recurses on the current directory (inclusive) by default.
Available subcommands:
[...]
Note the new third line ("Type 'svn --version' to see..."). But I
adjusted the paragraph after it to lose its short final line, so that
the total line count in help output is still the same.
Due to some local box horkage, I haven't built and tested this yet,
but I would do that before committing of course. I'm mainly
interested in whether people think it's a good idea.
-Karl
[[[
Make 'svn help' output tell how to discover the version number.
* subversion/clients/cmdline/help-cmd.c
(svn_cl__help_header): Add a line about running 'svn --version'.
Tweak a wording later on, to save a line, so the total number of
lines in the help output remains the same. This involved
reformatting the source so as to make the strings start in an
earlier column, which in turn makes this change appear more
drastic than it actually is.
(svn_cl__help_footer): No semantic change, just make the same
start-column adjustment as above, for consistency.
* subversion/tests/clients/cmdline/getopt_tests_data/svn--help_stdout,
subversion/tests/clients/cmdline/getopt_tests_data/svn_help_stdout:
Adjust accordingly.
]]]
Index: subversion/clients/cmdline/help-cmd.c
===================================================================
--- subversion/clients/cmdline/help-cmd.c (revision 11336)
+++ subversion/clients/cmdline/help-cmd.c (working copy)
@@ -32,20 +32,20 @@
#include "svn_private_config.h"
const char svn_cl__help_header[] =
- N_("usage: svn <subcommand> [options] [args]\n"
- "Type 'svn help <subcommand>' for help on a specific subcommand.\n"
- "\n"
- "Most subcommands take file and/or directory arguments, recursing\n"
- "on the directories. If no arguments are supplied to such a\n"
- "command, it will recurse on the current directory (inclusive) by\n"
- "default.\n"
- "\n"
- "Available subcommands:\n");
+ N_("usage: svn <subcommand> [options] [args]\n"
+ "Type 'svn help <subcommand>' for help on a specific subcommand.\n"
+ "Type 'svn --version' to see the version number of this software.\n"
+ "\n"
+ "Most subcommands take file and/or directory arguments, recursing\n"
+ "on the directories. If no arguments are supplied to such a\n"
+ "command, it recurses on the current directory (inclusive) by default.\n"
+ "\n"
+ "Available subcommands:\n");
const char svn_cl__help_footer[] =
- N_("Subversion is a tool for version control.\n"
- "For additional information, see http://subversion.tigris.org/\n"
- "\n");
+ N_("Subversion is a tool for version control.\n"
+ "For additional information, see http://subversion.tigris.org/\n"
+ "\n");
/*** Code. ***/
Index: subversion/tests/clients/cmdline/getopt_tests_data/svn_help_stdout
===================================================================
--- subversion/tests/clients/cmdline/getopt_tests_data/svn_help_stdout (revision 11336)
+++ subversion/tests/clients/cmdline/getopt_tests_data/svn_help_stdout (working copy)
@@ -1,10 +1,10 @@
usage: svn <subcommand> [options] [args]
Type 'svn help <subcommand>' for help on a specific subcommand.
+Type 'svn --version' to see the version number of this software.
Most subcommands take file and/or directory arguments, recursing
on the directories. If no arguments are supplied to such a
-command, it will recurse on the current directory (inclusive) by
-default.
+command, it recurses on the current directory (inclusive) by default.
Available subcommands:
add
Index: subversion/tests/clients/cmdline/getopt_tests_data/svn--help_stdout
===================================================================
--- subversion/tests/clients/cmdline/getopt_tests_data/svn--help_stdout (revision 11336)
+++ subversion/tests/clients/cmdline/getopt_tests_data/svn--help_stdout (working copy)
@@ -1,10 +1,10 @@
usage: svn <subcommand> [options] [args]
Type 'svn help <subcommand>' for help on a specific subcommand.
+Type 'svn --version' to see the version number of this software.
Most subcommands take file and/or directory arguments, recursing
on the directories. If no arguments are supplied to such a
-command, it will recurse on the current directory (inclusive) by
-default.
+command, it recurses on the current directory (inclusive) by default.
Available subcommands:
add
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 13 00:00:15 2004