[PATCH 4 of 4] styles: add new 'bisect' style that prints the bisection status

Yann E. MORIN yann.morin.1998 at anciens.enib.fr
Wed Sep 21 19:10:20 CDT 2011


# HG changeset patch
# User "Yann E. MORIN" <yann.morin.1998 at anciens.enib.fr>
# Date 1316649096 -7200
# Node ID 81a7619420cce7667593cbf5690ba05634b7c895
# Parent  b06397d18c1bef158b180cd30bc887d6f77ee62f
styles: add new 'bisect' style that prints the bisection status

The style is based on the 'default' style, but adds the bisection status
of the changesets.

Example output for a changeset in range:

  $ hg log --style bisect -r 15
  changeset:   15:857b178a7cf3
  bisect:      bad
  parent:      13:b0a32c86eb31
  parent:      10:429fcd26f52d
  user:        test
  date:        Thu Jan 01 00:00:15 1970 +0000
  summary:     merge 10,13

  $ hg log --quiet --style bisect
    18:d42e18c7bc9b
  - 17:228c06deef46
  - 16:609d82a7ebae
  - 15:857b178a7cf3
    14:faa450606157
  + 13:b0a32c86eb31
  + 12:9f259202bbe7
  + 11:82ca6f06eccd
  ? 10:429fcd26f52d
  < 9:3c77083deb4a
  + 8:dab8161ac8fc
    7:50c76098bbf2
  ! 6:a214d5d3811a
  ! 5:385a529b6670
  ! 4:5c668c22234f
  ! 3:0950834f0a9c
  ! 2:051e12f87bf1
    1:4ca5088da217
    0:33b1f9bc8bc5

Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at anciens.enib.fr>

diff --git a/mercurial/templates/map-cmdline.default b/mercurial/templates/map-cmdline.bisect
copy from mercurial/templates/map-cmdline.default
copy to mercurial/templates/map-cmdline.bisect
--- a/mercurial/templates/map-cmdline.default
+++ b/mercurial/templates/map-cmdline.bisect
@@ -1,7 +1,7 @@
-changeset = 'changeset:   {rev}:{node|short}\n{branches}{bookmarks}{tags}{parents}user:        {author}\ndate:        {date|date}\nsummary:     {desc|firstline}\n\n'
-changeset_quiet = '{rev}:{node|short}\n'
-changeset_verbose = 'changeset:   {rev}:{node|short}\n{branches}{bookmarks}{tags}{parents}user:        {author}\ndate:        {date|date}\n{files}{file_copies_switch}description:\n{desc|strip}\n\n\n'
-changeset_debug = 'changeset:   {rev}:{node}\n{branches}{bookmarks}{tags}{parents}{manifest}user:        {author}\ndate:        {date|date}\n{file_mods}{file_adds}{file_dels}{file_copies_switch}{extras}description:\n{desc|strip}\n\n\n'
+changeset = 'changeset:   {rev}:{node|short}\nbisect:      {bisect}\n{branches}{bookmarks}{tags}{parents}user:        {author}\ndate:        {date|date}\nsummary:     {desc|firstline}\n\n'
+changeset_quiet = '{bisect|shortbisect} {rev}:{node|short}\n'
+changeset_verbose = 'changeset:   {rev}:{node|short}\nbisect:      {bisect}\n{branches}{bookmarks}{tags}{parents}user:        {author}\ndate:        {date|date}\n{files}{file_copies_switch}description:\n{desc|strip}\n\n\n'
+changeset_debug = 'changeset:   {rev}:{node}\nbisect:      {bisect}\n{branches}{bookmarks}{tags}{parents}{manifest}user:        {author}\ndate:        {date|date}\n{file_mods}{file_adds}{file_dels}{file_copies_switch}{extras}description:\n{desc|strip}\n\n\n'
 start_files = 'files:      '
 file = ' {file}'
 end_files = '\n'


More information about the Mercurial-devel mailing list