tests/test-issue1877.t
author Adrian Buehlmann <adrian@cadifra.com>
Sun, 17 Apr 2011 11:37:11 +0200
changeset 13950 14d0553bd48b
parent 13806 8ba08a16e4e0
child 16913 f2719b387380
permissions -rw-r--r--
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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13806
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     1
http://mercurial.selenic.com/bts/issue1877
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     2
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     3
  $ hg init a
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     4
  $ cd a
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     5
  $ echo a > a
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     6
  $ hg add a
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     7
  $ hg ci -m 'a'
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     8
  $ echo b > a
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     9
  $ hg ci -m'b'
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    10
  $ hg up 0
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    11
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    12
  $ hg book main
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    13
  $ hg book
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    14
   * main                      0:cb9a9f314b8b
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    15
  $ echo c > c
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    16
  $ hg add c
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    17
  $ hg ci -m'c'
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    18
  created new head
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    19
  $ hg book
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    20
   * main                      2:d36c0562f908
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    21
  $ hg heads
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    22
  changeset:   2:d36c0562f908
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    23
  bookmark:    main
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    24
  tag:         tip
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    25
  parent:      0:cb9a9f314b8b
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    26
  user:        test
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    27
  date:        Thu Jan 01 00:00:00 1970 +0000
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    28
  summary:     c
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    29
  
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    30
  changeset:   1:1e6c11564562
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    31
  user:        test
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    32
  date:        Thu Jan 01 00:00:00 1970 +0000
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    33
  summary:     b
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    34
  
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    35
  $ hg up 1e6c11564562
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    36
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    37
  $ hg merge main
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    38
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    39
  (branch merge, don't forget to commit)
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    40
  $ hg book
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    41
     main                      2:d36c0562f908
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    42
  $ hg ci -m'merge'
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    43
  $ hg book
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    44
     main                      2:d36c0562f908
8ba08a16e4e0 bookmarks: do not forward merged bookmark (issue1877)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    45