Commit Graph

16 Commits

Author SHA1 Message Date
Matt Mackall
540b8eb745 help: tweak --verbose command help hint
We used to have two slightly different message which people wouldn't read...
and then complain that they couldn't find the global options or examples.

So we unify them into one message that's upfront that STUFF IS
INTENTIONALLY HIDDEN and that looks more like our normal hint style.
2014-08-12 03:01:37 -05:00
Matt Mackall
95a0ecfb91 merge with stable 2014-05-27 17:41:20 -07:00
Matt Mackall
10039fb244 bookmarks: properly align multi-byte characters 2014-05-27 15:16:52 -07:00
Matt Mackall
7179dad14c tests: fix cut and paste error on encoding alignment test 2014-05-27 15:13:13 -07: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
Gregory Szorc
02f50211af tests: declare commands using decorator 2014-05-04 22:48:07 -07:00
Mads Kiilerich
fa1c4e5ebe tests: add missing trailing 'cd ..'
Many tests didn't change back from subdirectories at the end of the tests ...
and they don't have to. The missing 'cd ..' could always be added when another
test case is added to the test file.

This change do that tests (99.5%) consistently end up in $TESTDIR where they
started, thus making it simpler to extend them or move them around.
2012-06-11 01:40:51 +02:00
Matt Mackall
a69962e18c branch: warn on branching 2011-12-08 14:32:44 -06:00
Matt Mackall
6435383b32 help: generate command help into a single RST string for formatting 2011-10-07 17:08:24 -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
FUJIWARA Katsunori
5b5a083f16 i18n: calculate terminal columns by width information of each characters
neither number of 'bytes' in any encoding nor 'characters' is
appropriate to calculate terminal columns for specified string.

this patch modifies MBTextWrapper for:

  - overriding '_wrap_chunks()' to make it use not built-in 'len()'
    but 'encoding.colwidth()' for columns of string

  - fixing '_cutdown()' to make it use 'encoding.colwidth()' instead
    of local, similar but incorrect implementation

this patch also modifies 'encoding.py':

  - dividing 'colwith()' into 2 pieces: one for calculation columns of
    specified UNICODE string, and another for rest part of original
    one. the former is used from MBTextWrapper in 'util.py'.

  - preventing 'colwidth()' from evaluating HGENCODINGAMBIGUOUS
    configuration per each invocation: 'unicodedata.east_asian_width'
    checking is kept intact for reducing startup cost.
2011-08-27 04:56:12 +09:00
Mads Kiilerich
ec483cfecb util: wrap lines with multi-byte characters correctly (issue2943)
This re-introduces the unicode conversion what was lost in e5976ee55f4b 5 years
ago and had the comment:
  To avoid corrupting multi-byte characters in line, we must wrap
  a Unicode string instead of a bytestring.
2011-08-06 23:52:20 +02:00
Mads Kiilerich
82954d10d1 tests: use (esc) markup for string-escape
This makes test output less ambiguous.

Failing test output will be escaped and marked up if necessary. A Python
string-escape compatible encoding is used, but not everything is encoded -
especially not \n and \t and '.
2010-11-08 01:35:41 +01:00
Yuya Nishihara
42e1ec7a53 tests: asciify output of test-encoding-align.t 2010-10-02 22:59:29 +09:00
Matt Mackall
589dbb9433 tests: unify test-encoding-align 2010-09-26 13:41:32 -05:00