changeset 8076:5ec526c1a32f

help texts: write command line switches as -a/--abc
author Martin Geisler <mg@lazybytes.net>
date Sat, 18 Apr 2009 14:40:21 +0200
parents 1f0a5a5fff43
children ab55a5122ea3
files hgext/children.py hgext/extdiff.py hgext/mq.py hgext/patchbomb.py hgext/purge.py hgext/rebase.py hgext/transplant.py tests/test-rebase-parameters.out
diffstat 8 files changed, 64 insertions(+), 59 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/children.py	Sat Apr 18 00:21:11 2009 -0700
+++ b/hgext/children.py	Sat Apr 18 14:40:21 2009 +0200
@@ -16,9 +16,9 @@
     """show the children of the given or working directory revision
 
     Print the children of the working directory's revisions. If a
-    revision is given via --rev, the children of that revision will be
-    printed. If a file argument is given, revision in which the file
-    was last changed (after the working directory revision or the
+    revision is given via --rev/-r, the children of that revision will
+    be printed. If a file argument is given, revision in which the
+    file was last changed (after the working directory revision or the
     argument to --rev if given) is printed.
     """
     rev = opts.get('rev')
--- a/hgext/extdiff.py	Sat Apr 18 00:21:11 2009 -0700
+++ b/hgext/extdiff.py	Sat Apr 18 14:40:21 2009 +0200
@@ -167,10 +167,10 @@
     an external program. The default program used is diff, with
     default options "-Npru".
 
-    To select a different program, use the -p option. The program will
-    be passed the names of two directories to compare. To pass
-    additional options to the program, use the -o option. These will
-    be passed before the names of the directories to compare.
+    To select a different program, use the -p/--program option. The
+    program will be passed the names of two directories to compare. To
+    pass additional options to the program, use -o/--option. These
+    will be passed before the names of the directories to compare.
 
     When two revision arguments are given, then changes are shown
     between those revisions. If only one revision is specified then
--- a/hgext/mq.py	Sat Apr 18 00:21:11 2009 -0700
+++ b/hgext/mq.py	Sat Apr 18 14:40:21 2009 +0200
@@ -1625,14 +1625,14 @@
     """remove patches from queue
 
     The patches must not be applied, unless they are arguments to the
-    --rev parameter. At least one patch or revision is required.
+    -r/--rev parameter. At least one patch or revision is required.
 
     With --rev, mq will stop managing the named revisions (converting
     them to regular mercurial changesets). The qfinish command should
-    be used as an alternative for qdel -r, as the latter option is
+    be used as an alternative for qdelete -r, as the latter option is
     deprecated.
 
-    With --keep, the patch files are preserved in the patch
+    With -k/--keep, the patch files are preserved in the patch
     directory."""
     q = repo.mq
     q.delete(repo, patches, opts)
@@ -1669,17 +1669,17 @@
     to the series.
 
     The patch will have the same name as its source file unless you
-    give it a new one with --name.
+    give it a new one with -n/--name.
 
     You can register an existing patch inside the patch directory with
-    the --existing flag.
+    the -e/--existing flag.
 
-    With --force, an existing patch of the same name will be
+    With -f/--force, an existing patch of the same name will be
     overwritten.
 
-    An existing changeset may be placed under mq control with --rev
+    An existing changeset may be placed under mq control with -r/--rev
     (e.g. qimport --rev tip -n patch will place tip under mq control).
-    With --git, patches imported with --rev will use the git diff
+    With -g/--git, patches imported with --rev will use the git diff
     format. See the diffs help topic for information on why this is
     important for preserving rename/copy information and permission
     changes.
@@ -1698,11 +1698,11 @@
 def init(ui, repo, **opts):
     """init a new queue repository
 
-    The queue repository is unversioned by default. If -c is
-    specified, qinit will create a separate nested repository for
-    patches (qinit -c may also be run later to convert an unversioned
-    patch repository into a versioned one). You can use qcommit to
-    commit changes to this queue repository."""
+    The queue repository is unversioned by default. If
+    -c/--create-repo is specified, qinit will create a separate nested
+    repository for patches (qinit -c may also be run later to convert
+    an unversioned patch repository into a versioned one). You can use
+    qcommit to commit changes to this queue repository."""
     q = repo.mq
     r = q.init(repo, create=opts['create_repo'])
     q.save_dirty()
@@ -1845,19 +1845,21 @@
 
     qnew creates a new patch on top of the currently-applied patch (if
     any). It will refuse to run if there are any outstanding changes
-    unless -f is specified, in which case the patch will be
-    initialized with them. You may also use -I, -X, and/or a list of
-    files after the patch name to add only changes to matching files
-    to the new patch, leaving the rest as uncommitted modifications.
+    unless -f/--force is specified, in which case the patch will be
+    initialized with them. You may also use -I/--include,
+    -X/--exclude, and/or a list of files after the patch name to add
+    only changes to matching files to the new patch, leaving the rest
+    as uncommitted modifications.
 
-    -u and -d can be used to set the (given) user and date, respectively.
-    -U and -D set user to current user and date to current date.
+    -u/--user and -d/--date can be used to set the (given) user and
+    date, respectively. -U/--currentuser and -D/--currentdate set user
+    to current user and date to current date.
 
-    -e, -m or -l set the patch header as well as the commit message.
-    If none is specified, the header is empty and the commit message
-    is '[mq]: PATCH'.
+    -e/--edit, -m/--message or -l/--logfile set the patch header as
+    well as the commit message. If none is specified, the header is
+    empty and the commit message is '[mq]: PATCH'.
 
-    Use the --git option to keep the patch in the git extended diff
+    Use the -g/--git option to keep the patch in the git extended diff
     format. Read the diffs help topic for more information on why this
     is important for preserving permission changes and copy/rename
     information.
@@ -1882,13 +1884,13 @@
     contain only the modifications that match those patterns; the
     remaining modifications will remain in the working directory.
 
-    If --short is specified, files currently included in the patch
+    If -s/--short is specified, files currently included in the patch
     will be refreshed just like matched files and remain in the patch.
 
     hg add/remove/copy/rename work as usual, though you might want to
-    use git-style patches (--git or [diff] git=1) to track copies and
-    renames. See the diffs help topic for more information on the git
-    diff format.
+    use git-style patches (-g/--git or [diff] git=1) to track copies
+    and renames. See the diffs help topic for more information on the
+    git diff format.
     """
     q = repo.mq
     message = cmdutil.logmessage(opts)
@@ -2082,8 +2084,8 @@
 def push(ui, repo, patch=None, **opts):
     """push the next patch onto the stack
 
-    When --force is applied, all local changes in patched files will
-    be lost.
+    When -f/--force is applied, all local changes in patched files
+    will be lost.
     """
     q = repo.mq
     mergeq = None
@@ -2357,10 +2359,10 @@
     patches) by moving them out of mq control into regular repository
     history.
 
-    Accepts a revision range or the --applied option. If --applied is
-    specified, all applied mq revisions are removed from mq control.
-    Otherwise, the given revisions must be at the base of the stack of
-    applied patches.
+    Accepts a revision range or the -a/--applied option. If --applied
+    is specified, all applied mq revisions are removed from mq
+    control. Otherwise, the given revisions must be at the base of the
+    stack of applied patches.
 
     This can be especially useful if your changes have been applied to
     an upstream repository, or if you are about to push your changes
--- a/hgext/patchbomb.py	Sat Apr 18 00:21:11 2009 -0700
+++ b/hgext/patchbomb.py	Sat Apr 18 14:40:21 2009 +0200
@@ -46,7 +46,7 @@
 is set, your pager will be fired up once for each patchbomb message,
 so you can verify everything is alright.
 
-The "-m" (mbox) option is also very useful. Instead of previewing each
+The -m/--mbox option is also very useful. Instead of previewing each
 patchbomb message in a pager or sending the messages directly, it will
 create a UNIX mailbox file with the patch emails. This mailbox file
 can be previewed with any mail user agent which supports UNIX mbox
@@ -185,11 +185,11 @@
     program is installed, the result of running diffstat on the patch.
     Finally, the patch itself, as generated by "hg export".
 
-    With --outgoing, emails will be generated for patches not found in
-    the destination repository (or only those which are ancestors of
-    the specified revisions if any are provided)
+    With -o/--outgoing, emails will be generated for patches not found
+    in the destination repository (or only those which are ancestors
+    of the specified revisions if any are provided)
 
-    With --bundle, changesets are selected as for --outgoing, but a
+    With -b/--bundle, changesets are selected as for --outgoing, but a
     single email containing a binary Mercurial bundle as an attachment
     will be sent.
 
@@ -477,9 +477,11 @@
            _('file name of the bundle attachment')),
           ('r', 'rev', [], _('a revision to send')),
           ('', 'force', None,
-           _('run even when remote repository is unrelated (with -b)')),
+           _('run even when remote repository is unrelated '
+             '(with -b/--bundle)')),
           ('', 'base', [],
-           _('a base changeset to specify instead of a destination (with -b)')),
+           _('a base changeset to specify instead of a destination '
+             '(with -b/--bundle)')),
           ('', 'intro', None,
            _('send an introduction email for a single patch')),
          ] + emailopts + commands.remoteopts,
--- a/hgext/purge.py	Sat Apr 18 00:21:11 2009 -0700
+++ b/hgext/purge.py	Sat Apr 18 14:40:21 2009 +0200
@@ -104,7 +104,7 @@
           ('',  'all', None, _('purge ignored files too')),
           ('p', 'print', None, _('print the file names instead of deleting them')),
           ('0', 'print0', None, _('end filenames with NUL, for use with xargs'
-                                  ' (implies -p)')),
+                                  ' (implies -p/--print)')),
          ] + commands.walkopts,
          _('hg purge [OPTION]... [DIR]...'))
 }
--- a/hgext/rebase.py	Sat Apr 18 00:21:11 2009 -0700
+++ b/hgext/rebase.py	Sat Apr 18 14:40:21 2009 +0200
@@ -46,7 +46,7 @@
     changes relative to a master development tree.
 
     If a rebase is interrupted to manually resolve a merge, it can be
-    continued with --continue or aborted with --abort.
+    continued with --continue/-c or aborted with --abort/-a.
     """
     originalwd = target = None
     external = nullrev
--- a/hgext/transplant.py	Sat Apr 18 00:21:11 2009 -0700
+++ b/hgext/transplant.py	Sat Apr 18 14:40:21 2009 +0200
@@ -442,11 +442,12 @@
     Its argument will be invoked with the current changelog message as
     $1 and the patch as $2.
 
-    If --source is specified, selects changesets from the named
-    repository. If --branch is specified, selects changesets from the
-    branch holding the named revision, up to that revision. If --all
-    is specified, all changesets on the branch will be transplanted,
-    otherwise you will be prompted to select the changesets you want.
+    If --source/-s is specified, selects changesets from the named
+    repository. If --branch/-b is specified, selects changesets from
+    the branch holding the named revision, up to that revision. If
+    --all/-a is specified, all changesets on the branch will be
+    transplanted, otherwise you will be prompted to select the
+    changesets you want.
 
     hg transplant --branch REVISION --all will rebase the selected
     branch (up to the named revision) onto your current working
@@ -462,7 +463,7 @@
 
     If a changeset application fails, you can fix the merge by hand
     and then resume where you left off by calling hg transplant
-    --continue.
+    --continue/-c.
     '''
     def getremotechanges(repo, url):
         sourcerepo = ui.expandpath(url)
--- a/tests/test-rebase-parameters.out	Sat Apr 18 00:21:11 2009 -0700
+++ b/tests/test-rebase-parameters.out	Sat Apr 18 14:40:21 2009 +0200
@@ -11,7 +11,7 @@
     changes relative to a master development tree.
 
     If a rebase is interrupted to manually resolve a merge, it can be
-    continued with --continue or aborted with --abort.
+    continued with --continue/-c or aborted with --abort/-a.
 
 options:
 
@@ -39,7 +39,7 @@
     changes relative to a master development tree.
 
     If a rebase is interrupted to manually resolve a merge, it can be
-    continued with --continue or aborted with --abort.
+    continued with --continue/-c or aborted with --abort/-a.
 
 options:
 
@@ -67,7 +67,7 @@
     changes relative to a master development tree.
 
     If a rebase is interrupted to manually resolve a merge, it can be
-    continued with --continue or aborted with --abort.
+    continued with --continue/-c or aborted with --abort/-a.
 
 options:
 
@@ -95,7 +95,7 @@
     changes relative to a master development tree.
 
     If a rebase is interrupted to manually resolve a merge, it can be
-    continued with --continue or aborted with --abort.
+    continued with --continue/-c or aborted with --abort/-a.
 
 options: