[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: `svn help` output in SVN 1.8 and 1.9

From: Stefan Sperling <stsp_at_apache.org>
Date: Thu, 26 May 2016 23:39:42 +0200

On Thu, May 26, 2016 at 11:15:11PM +0300, Pavel Lyalyakin wrote:
> Hello,
>
> I'm reading through the nightly SVNBook 1.8 and make more or less
> necessary changes to complete it and begin the work on SVNBook 1.9.
> I've just noticed that the output of `svn help` is slightly different
> in SVN 1.8 and 1.9 command-line clients.
>
> SVN 1.8 shows the version number (take a look at the second line):
> [[[
> usage: svn <subcommand> [options] [args]
> Subversion command-line client, version 1.8.13.
> Type 'svn help <subcommand>' for help on a specific subcommand.
> ]]]
>
> SVN 1.9 does not show the version number:
> [[[
> usage: svn <subcommand> [options] [args]
> Subversion command-line client.
> ]]]
>
> Was there any special reason to hide the version number here? Or is it a bug?
>
> --
> With best regards,
> Pavel Lyalyakin

Hi Pavel,

This change was intentional.

------------------------------------------------------------------------
r1522518 | stsp | 2013-09-12 12:43:21 +0200 (Thu, 12 Sep 2013) | 42 lines

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.

------------------------------------------------------------------------
Received on 2016-05-26 23:39:59 CEST

This is an archived mail posted to the Subversion Dev mailing list.