You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Martin Pool <mb...@samba.org> on 2002/12/11 00:39:23 UTC

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

* 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

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

Posted by Philip Martin <ph...@codematters.co.uk>.
Martin Pool <mb...@samba.org> writes:

> 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"

We have to be careful here, it's important that we are accurate.  A
working copy does not have *a* BASE revision in general, as it may be
a mixed revision working copy.  I would be happier if you referred to
something like "base revision of path" and did not imply that it
referred to the working copy as a whole.

> +     "                             COMMITTED last revision of last change,\n"

Too many lasts.

> +     "                             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"},

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org