[TAKE 2][PATCH 0/5]: Show commands aliases and global options in help

Goffredo Baroncelli kreijack at aliceposta.it
Mon Jul 25 13:57:07 CDT 2005


Hi,

the five patches which follow this email permit to hg to show the commands aliases and the
global options when the 'hg help' command are used with the '-v' switch.
Moreover the short list is showed only when hg is executed without parameters.

Example:

$ hg
basic hg commands (use "hg help -v" for more):

 add        add the specified files on the next commit
 annotate   show changeset information per file line
 clone      make a copy of an existing repository
 commit     commit the specified files or all outstanding changes
 diff       diff working directory (or selected files)
 export     dump the header and diffs for one or more changesets
 init       create a new repository in the current directory
 log        show the revision history of the repository or a single file
 pull       pull changes from the specified source
 push       push changes to the specified destination
 remove     remove the specified files on the next commit
 revert     revert modified files or dirs back to their unmodified states
 serve      export the repository via HTTP
 status     show changed files in the working directory
 update     update or merge working directory
$

$ hg help
ghigo at therra:~/mercurial/dev-help$ python hg help
 add         add the specified files on the next commit
 addremove   add all new files, delete all missing files
 annotate    show changeset information per file line
 cat         output the latest or given revision of a file
 clone       make a copy of an existing repository
 commit      commit the specified files or all outstanding changes
 copy        mark a file as copied or renamed for the next commit
 diff        diff working directory (or selected files)
 export      dump the header and diffs for one or more changesets
 forget      don't add the specified files on the next commit
 heads       show current repository heads
[...]

$ hg help -v
Mercurial version unknown

Copyright (C) 2005 Matt Mackall <mpm at selenic.com>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

global options:

 -v --verbose
    verbose mode
 --debug
    debug mode
 -q --quiet
    quiet mode
 --profile
    profile
 -R --repository
    repository root directory
 --traceback
    print traceback on exception
 -y --noninteractive
    run non-interactively
 --version
    output version information and exit

hg commands:

 add:
      add the specified files on the next commit
 addremove:
      add all new files, delete all missing files
[...]
 identify, id:
      print information about the working copy
[...]

The first four patches are equal to the previous ones

PATCH1:  shows the global option 
PATCH2:  shows the commands aliases
PATCH3:  more verbose description of some global options
PATCH4:  shows the short help list only when hg is executed without parameters
PATCH5:  update the TODO file and a test script


Goffredo
-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack AT inwind.it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87  87C0 BB86 505C 6B2A CFF9



More information about the Mercurial mailing list