tests/test-update-reverse.t
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Tue, 11 Mar 2014 14:36:40 +0900
changeset 20689 401f9b661a2d
parent 19095 5cc71484ee9c
child 21391 cb15835456cb
permissions -rw-r--r--
doc: show short description of each commands in generated documents Before this patch, short description of each commands is not shown in generated documents (HTML file and UNIX man page). This omitting may prevent users from understanding about commands. This patch show it as the 1st paragraph in the help section of each commands. This style is chosen because: - showing it as the section title in "command - short desc" style disallows referencing by "#command" in HTML file: in "en" locale, hyphen concatenated title is used as the section ID in HTML file for this style - showing it as the 1st paragraph in "command - short desc" style seems to be redundant: "command" appears also just before as the section title - showing it just after synopsis like "hg help command" seems not to be reasonable in UNIX man page This patch just writes short description ("d['desc'][0]") before "::", because it should be already "strip()"-ed in "get_desc()", or empty string for the command without description.

  $ hg init

  $ touch a
  $ hg add a
  $ hg commit -m "Added a"

  $ touch main
  $ hg add main
  $ hg commit -m "Added main"
  $ hg checkout 0
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved

'main' should be gone:

  $ ls
  a

  $ touch side1
  $ hg add side1
  $ hg commit -m "Added side1"
  created new head
  $ touch side2
  $ hg add side2
  $ hg commit -m "Added side2"

  $ hg log
  changeset:   3:91ebc10ed028
  tag:         tip
  user:        test
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     Added side2
  
  changeset:   2:b932d7dbb1e1
  parent:      0:c2eda428b523
  user:        test
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     Added side1
  
  changeset:   1:71a760306caf
  user:        test
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     Added main
  
  changeset:   0:c2eda428b523
  user:        test
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     Added a
  

  $ hg heads
  changeset:   3:91ebc10ed028
  tag:         tip
  user:        test
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     Added side2
  
  changeset:   1:71a760306caf
  user:        test
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     Added main
  
  $ ls
  a
  side1
  side2

  $ hg update --debug -C 1
  resolving manifests
   branchmerge: False, force: True, partial: False
   ancestor: 91ebc10ed028+, local: 91ebc10ed028+, remote: 71a760306caf
   side1: other deleted -> r
   side2: other deleted -> r
   main: remote created -> g
  removing side1
  removing side2
  updating: side2 2/3 files (66.67%)
  getting main
  updating: main 3/3 files (100.00%)
  1 files updated, 0 files merged, 2 files removed, 0 files unresolved

  $ ls
  a
  main