Commit Graph

63 Commits

Author SHA1 Message Date
Alexander Plavin
e94f8da7af paper: define searchhint message in map file and use it in other templates 2013-07-25 01:12:25 +04:00
FUJIWARA Katsunori
af33f66d43 help: use full name of extensions to look up them for keyword search
Before this patch, "hg help -k KEYWORD" fails, if there is the
extension of which name includes ".", because "extensions.load()"
invoked from "help.topicmatch()" fails to look such extension up, even
though it is already loaded in.

"help.topicmatch()" invokes "extensions.load()" with the name gotten
from "extensions.enabled()". The former expects full name of extension
(= key in '[extensions]' section), but the latter returns names
shortened by "split('.')[-1]". This difference causes failure of
looking extension up.

This patch adds "shortname" argument to "extensions.enabled()" to make
it return shortened names only if it is True. "help.topicmatch()"
turns it off to get full name of extensions.

Then, this patch shortens full name of extensions by "split('.')[-1]"
for showing them in the list of extensions.

Shortening is also applied on names gotten from
"extensions.disabled()" but harmless, because it returns only
extensions directly under "hgext" and their names should not include
".".
2013-09-23 20:23:25 +09:00
Matt Mackall
bae7de95b0 heads: modernize documentation (issue3992)
The old docs emphasized topological heads rather than branch heads and
incorrectly defined branch heads as not having children rather than
descendants.
2013-07-21 18:45:42 -05:00
Siddharth Agarwal
b40e1d442a version: bump copyright year 2013-07-17 17:34:30 -07:00
Matt Mackall
90ddfc6b4b rollback: mark as deprecated 2013-07-16 17:10:26 -05:00
Matt Mackall
d487ab0f65 tip: deprecate the tip command 2013-07-11 19:29:23 -05:00
Alexander Plavin
fb005d78d7 hgweb: make help verbose again (issue3899)
Due to regression introduced in 5fc7d589c700, help in hgweb
was rendered in non-verbose form (issue3899)
2013-04-22 12:27:56 +04:00
Dan Villiom Podlaski Christiansen
e6781fbadb minirst: HTML formatter tweaks
output table rows on distinct lines
don't make the first row a table header
2013-02-09 21:51:21 +00:00
Dan Villiom Podlaski Christiansen
5ff9149ead minirst: CGI escape strings prior to embedding it in the HTML 2013-02-09 17:44:25 -05:00
Dan Villiom Podlaski Christiansen
768b2c3969 minirst: don't generate TH elements for the first row in table
We mainly use them for option tables -- browsers bolding and centering
them looks wrong.
2013-02-09 21:51:21 +00:00
Dan Villiom Podlaski Christiansen
d045d03b91 help: use a full header for topic titles
...for prettier HTML!
2013-02-10 12:58:57 +01:00
Dan Villiom Podlaski Christiansen
9e387ff40b hgweb: generate HTML documentation
It's generated from the raw ReST source, as returned from help.help_().
2013-02-09 21:51:21 +00:00
Dan Villiom Podlaski Christiansen
e500e66efd hgweb help: split up long lines (in generated output) 2013-02-09 21:51:21 +00:00
Dan Villiom Podlaski Christiansen
fc88a30a90 hgweb help: add tests 2013-03-01 19:42:42 +01:00
Kevin Bullock
94a13e547a tests: fix test-help.t for '@' bookmark documentation
8013dfa942cf unexpectedly introduced bookmarks into the results for 'hg
help -k clone'. Mea culpa, miserere &c.
2013-01-25 11:38:54 -06:00
Pierre-Yves David
a1985448ad clfilter: enforce hidden changeset globally
The dispatch code now enables filtering of "hidden" changesets globally. The
filter is installed before command and extension invocation. The `--hidden`
switch is now global and disables this filtering for any command.

Code in log dedicated to changeset exclusion is removed as this global filtering
has the same effect.
2013-01-08 20:37:37 +01:00
Pierre-Yves David
292c83cd65 command: remove phase from the list of basic command
This is not a basic command. There is no reason new user should needs to know
about it. Thanks to Matt Mackall for pointing this.
2012-11-28 11:20:56 +01:00
FUJIWARA Katsunori
477c2590ac help: indicate help omitting if help document is not fully displayed
Before this patch, there is no information about whether help document
is fully displayed or not.

So, some users seem to misunderstand "-v" for "hg help" just as "the
option to show list of global options": experience on "hg help -v" for
some commands not containing verbose containers may strengthen this
misunderstanding.

Such users have less opportunity for noticing omitted help document,
and this may cause insufficient understanding about Mercurial.

This patch indicates help omitting, if help document is not fully
displayed.

For command help, the message below is displayed at the end of help
output, if help document is not fully displayed:

    use "hg -v help xxxx" to show more complete help and the global
    options

and otherwise:

    use "hg -v help xxxx" to show the global options

For topics and extensions help, the message below is displayed, only
if help document is not fully displayed:

    use "hg help -v xxxx" to show more complete help

This allows users to know whether there is any omitted information or
not exactly, and can trigger "hg help -v" invocation.

This patch causes formatting help document twice, to switch messages
one for omitted help, and another for not omitted. This decreases
performance of help document formatting, but it is not mainly focused
at help command invocation, so this wouldn't become problem.
2012-10-18 10:31:15 +09:00
FUJIWARA Katsunori
29424945df help: add information about recovery from corruption to help of "verify"
Before this patch, there is no information about what users should (or
can) do for recovery from corruption of repositories.

This patch adds URL of the Mercurial Wiki page explaining about
recovery from corruption.
2012-10-04 01:24:05 +09:00
FUJIWARA Katsunori
807a8f6caa doc: add the tool to check section marks in help documents
This patch adds "doc/check-seclevel.py" which checks below in help
documents:

  - whether unknown or unavailable section marks are used or not
  - whether appropriate section mark is used at sub-sectioning

It should be invoked in "doc" directory.

It checks all help documents of Mercurial (topics, commands,
extensions), if no file is specified by --file option.

With --file option, it checks contents of the specified file as help
document, for self testing purpose: -t/-c/-e/-C are used to specify
what kind of help document contents of the specified file is.

This checking is related to changeset 8d980034517b.
2012-08-13 21:25:48 +09:00
Mads Kiilerich
4d30442bbe help: use the first topic name from helptable, not the longest alias
This makes the 'additional help topics' list consistent with the output from
keyword search (for instance subrepo/subrepos).

The sorting by longest name was introduced in 4cbe49492ad3. There might have
been a good reason for it back then, but now it seems like a better idea to
place the preferred name first in the list in helptable.
2012-08-01 14:59:15 +02:00
Mads Kiilerich
8a58b3e3c1 help: sort results from keyword search 2012-06-13 02:44:46 +02:00
Olav Reinert
7c9defd0db help: fix extension commands help in keyword search
This patch fixes the synopsis shown for extension commands in keyword search
results. A previous patch erroneously caused the extension synopsis to be shown
instead.

Test cases for keyword search are missing, so I added a one.
2012-06-07 01:42:50 +02:00
Thomas Arendsen Hein
b3cb4187dd help: fix 'hg help -k' matching an extension without docs
getattr is not needed, __doc__ always exists and defaults to None
2012-06-07 15:54:40 +02:00
Olav Reinert
54cafa029d help: format command and option list help using RST
This patch changes the function which generates help text about commands and
options to use RST formatting. Tables describing options have been formatted
using RST table markup for some time already, so their appearance does not
change. Command lists, however, change appearance.

To format non-verbose command lists, RST field list markup was chosen, because
it resembles the old format:

<http://docutils.sourceforge.net/docs/user/rst/quickref.html#field-lists>

In the old (hand-coded) format of non-verbose command lists, the left column is
12 characters wide. Our minirst implementation formats field lists with a left
column 14 characters wide, so this patch changes the appearance of help output
correspondingly:

<http://markmail.org/message/krl4cxopsnii7s6z?q=mercurial+reinert+from:%22Olav+Reinert%22&page=2>

The minirst markup most closely resembling the old verbose command lists is
definition lists. But using it would cause a blank line to be inserted between
each command definition, making the output excessively long, and no more
useful than before. To avoid this, I chose to use field lists also for verbose
command help, resulting in output like this example:

 add           add the specified files on the next commit
 annotate, blame
               show changeset information by line for each file
 clone         make a copy of an existing repository
 commit, ci    commit the specified files or all outstanding changes
 diff          diff repository (or selected files)
 export        dump the header and diffs for one or more changesets
 forget        forget the specified files on the next commit
 init          create a new repository in the given directory
 log, history  show revision history of entire repository or files
 merge         merge working directory with another revision
 phase         set or show the current phase name
 pull          pull changes from the specified source
 push          push changes to the specified destination
 qdiff         diff of the current patch and subsequent modifications
 qinit         init a new queue repository (DEPRECATED)
 qnew          create a new patch
 qpop          pop the current patch off the stack
 qpush         push the next patch onto the stack
 qrefresh      update the current patch
 remove, rm    remove the specified files on the next commit
 serve         start stand-alone webserver
 status, st    show changed files in the working directory
 summary, sum  summarize working directory state
 update, up, checkout, co
               update working directory (or switch revisions)

This change is a move towards generating all help text as a list of strings
marked up with RST.
2012-06-02 11:25:40 +02:00
Kevin Bullock
b4041f99fa help: include bookmarks in 'help revisions' and simplify wording 2012-05-16 10:29:11 -05:00
Martin Geisler
63259931d2 help: consistently use title capitalization for help topics 2012-04-30 11:51:24 +02:00
Matt Mackall
578253989c help: add phases topic 2012-01-26 11:23:14 -06:00
Olav Reinert
c5f1adceef help: fix column alignment in "hg help" output
The output of "hg help" is changed to ensure that the column containing
descriptions of commands, extensions, and other topics is correctly alignmened.
2012-01-11 18:14:55 +01:00
Olav Reinert
cfc7a5074e minirst: simplify and standardize field list formatting
The default width of field lists is changed from 12 to 14 to align minirst with
the rst2html tool. Shrinking the width of the left column to fit the content is
removed, to keep formatting simple and uniform.
2012-01-11 18:08:25 +01:00
Martin Geisler
e0542a7108 commands: bump copyright year 2012-01-11 15:51:02 +01:00
Pierre-Yves David
a2fe028df9 phases: add a phases command to display and manipulate phases 2012-01-10 19:45:35 +01:00
Matt Mackall
06ac7c8606 graft: add initial implementation 2011-10-12 18:45:36 -05:00
Matt Mackall
58c81fa35e help: unify the two -v notes for command help 2011-10-07 16:36:54 -05:00
Matt Mackall
4204f3ffa5 help: use RST to format option lists 2011-09-21 13:00:48 -05:00
Matt Mackall
ed51ea3c83 tests: fix up help test for new verbose sections 2011-09-17 13:37:47 -05:00
Matt Mackall
f675d667e0 diff: add help examples 2011-09-16 16:39:55 -05:00
Matt Mackall
1731276051 help: drop with_version
If --version is specified, we print the version and exit (as documented).
2011-08-04 15:08:41 -05:00
Martin Geisler
d1589aefcc commands: improve help for -y/--noninteractive
Before, the help text said that Mercurial would assume 'yes' for all
prompts, but this is confusing since many prompts don't have any 'yes'
choice. It now more accurately describes what will happen.
2011-07-07 10:32:30 +02:00
Matt Mackall
c8c26720e0 fileset: add a help topic
Add crosslinking with patterns topic.
2011-06-18 16:53:49 -05:00
Matt Mackall
310bb08a92 revert: rewrite help summary
New users have a tendency to mistake 'revert' as the command to use to
check out old revisions. They also occasionally mistake revert for a
generalized undo (compare rollback).

This version intentionally aims to avoid mentioning 'earlier' and thus
intentionally no longer alludes to the (secondary) -r behavior (which
in fact is not actually limited to 'earlier').

Instead, we mention checkout state, to convey that we can
restore things to the way they were when checked out.
2011-06-06 17:38:32 -05:00
Yun Lee
c6804b1629 help: move hgignore man page into built-in help (issue2769) 2011-04-17 23:08:35 +08:00
Adrian Buehlmann
3efb31d590 help: do not show full help text for command on option errors
Example

  $ hg clone --jump foo bar
  hg clone: option --jump not recognized
  hg clone [OPTION]... SOURCE [DEST]

  make a copy of an existing repository

  options:

   -U --noupdate           the clone will include an empty working copy (only a
                           repository)
   -u --updaterev REV      revision, tag or branch to check out
   -r --rev REV [+]        include the specified changeset
   -b --branch BRANCH [+]  clone only the specified branch
      --pull               use pull protocol to copy metadata
      --uncompressed       use uncompressed transfer (fast over LAN)
   -e --ssh CMD            specify ssh command to use
      --remotecmd CMD      specify hg command to run on the remote side
      --insecure           do not verify server certificate (ignoring
                           web.cacerts config)

  [+] marked option can be specified multiple times

  use "hg help clone" to show the full help text

Motivation for this change

  If the user already has specified the command, he probably already knows
  the command to some extent. Apparently, he has a problem with the options,
  so we show him just the synopsis with the short help and the details about
  the options, with a hint on the last line how to get the full help text.

Why is Mercurial better with this change?

  Experts who just forgot about the details of an option don't get that
  much text thrown at them, while the newbies still get a hint on the last
  line how to get the full help text.
2011-04-17 11:37:11 +02:00
Yun Lee
fd8965dcbb help: sort help topics to make the output more readable (issue2751) 2011-04-05 12:40:47 +08:00
Patrick Mezard
af8905ea3e test-help: test a sample of 'templates' topic help 2011-03-12 12:46:31 +01:00
Martin Geisler
6d0223473c commands: update year to 2011 in version string 2011-02-25 11:39:19 +01:00
Matt Mackall
d27d1fae16 bookmarks: move push/pull command features to core 2011-02-10 13:46:28 -06:00
Martin Geisler
d2eec2cbbc commands: clarify which aliases "hg help -v" show (issue2572) 2011-01-05 10:47:35 +01:00
Matt Mackall
b6427b4a0a version: replace email address with url to reduce private mail 2010-10-24 16:02:10 -05:00
Patrick Mezard
4f21d24f6f Add subrepos help topic
Edited by:
Martin Geisler <mg@lazybytes.net>
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
2010-10-24 19:28:44 +02:00