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

[PATCH] svn --help to include HEAD, BASE, etc for -r

From: Martin Pool <mbp_at_samba.org>
Date: 2002-12-11 01:39:23 CET

* subversion/clients/cmdline/main.c
  (svn_cl__options): Rephrase help for the '-r' option to include
  short descriptions of the BASE, HEAD, COMMITED and PREV revision
  keywords. Help for this option now extends over several lines.

I think the keywords are sufficiently important that they merit being
included in the --help information. The names are well-chosen, but
sufficient nonobvious (BASE? BASIS? ...) that it's good to be
reminded, even for people who have read the manual.

Doing the spacing by hand is a bit ugly, but I didn't want to make the
patch intrusive by rewriting svn_opt_format_option to handle embedded
newlines. It wouldn't be too hard to do so, though.

The result looks like this:

log: Show the log messages for a set of revision(s) and/or file(s).
usage: log [URL] [PATH [PATH ... ]]
  Print the log messages for local PATHs, or for PATHs under
  URL, if URL is given. If URL is given by itself, then print log
  messages for everything under it. With -v, also print all affected
  paths with each log message.

  Each log message is printed just once, even if more than one of the
  affected paths for that revision were explicitly requested. Logs
  cross copy history by default; use --strict to disable this.
  For example:

    svn log
    svn log foo.c
    svn log http://www.example.com/repo/project/foo.c
    svn log http://www.example.com/repo/project foo.c bar.c

Valid options:
  -r [--revision] arg : revision X or X:Y range,
                             {DATE} for dates,
                             HEAD latest in repository,
                             BASE basis of working copy,
                             COMMITTED last revision of last change,
                             PREV revision before last change
  -v [--verbose] : print extra information
  --targets arg : pass contents of file "ARG" as additional args
  --username arg : specify a username ARG
  --password arg : specify a password ARG
  --no-auth-cache : do not cache authentication tokens
  --non-interactive : do no interactive prompting
  --strict : use strict semantics
  --incremental : give output suitable for concatenation
  --xml : output in xml

Index: main.c
===================================================================
--- main.c (revision 4083)
+++ main.c (working copy)
@@ -65,7 +65,14 @@
     {"recursive", 'R', 0, "descend recursively"},
     {"nonrecursive", 'N', 0, "operate on single directory only"},
     {"revision", 'r', 1,
- "revision ARG, X:Y range ({ARG}, {X}:{Y} for dates)"},
+ "revision X or X:Y range,\n"
+ " {DATE} for dates,\n"
+ " HEAD latest in repository,\n"
+ " BASE basis of working copy,\n"
+ " COMMITTED last revision of last change,\n"
+ " PREV revision before last change"
+ /* spacing corresponds to svn_opt_format_option */
+ },
     {"file", 'F', 1, "read data from file ARG"},
     {"incremental", svn_cl__incremental_opt, 0,
                       "give output suitable for concatenation"},

-- 
Martin 
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 11 01:40:23 2002

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.