styles: add new 'bisect' style that prints the bisection status
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu, 22 Sep 2011 01:51:36 +0200
changeset 15156 143c78b4fc8c
parent 15155 f4a8d754cd0a
child 15159 85322c19c831
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:16 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 changeset: 16:609d82a7ebae bisect: bad (implicit) user: test date: Thu Jan 01 00:00:16 1970 +0000 summary: 16 $ hg log --quiet --style bisect 18:d42e18c7bc9b B 17:228c06deef46 B 16:609d82a7ebae B 15:857b178a7cf3 14:faa450606157 G 13:b0a32c86eb31 G 12:9f259202bbe7 G 11:82ca6f06eccd U 10:429fcd26f52d S 9:3c77083deb4a G 8:dab8161ac8fc 7:50c76098bbf2 I 6:a214d5d3811a I 5:385a529b6670 I 4:5c668c22234f I 3:0950834f0a9c I 2:051e12f87bf1 1:4ca5088da217 0:33b1f9bc8bc5 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
mercurial/templates/map-cmdline.bisect
tests/test-bisect3.t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/map-cmdline.bisect	Thu Sep 22 01:51:36 2011 +0200
@@ -0,0 +1,25 @@
+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'
+start_file_mods = 'files:      '
+file_mod = ' {file_mod}'
+end_file_mods = '\n'
+start_file_adds = 'files+:     '
+file_add = ' {file_add}'
+end_file_adds = '\n'
+start_file_dels = 'files-:     '
+file_del = ' {file_del}'
+end_file_dels = '\n'
+start_file_copies = 'copies:     '
+file_copy = ' {name} ({source})'
+end_file_copies = '\n'
+parent = 'parent:      {rev}:{node|formatnode}\n'
+manifest = 'manifest:    {rev}:{node}\n'
+branch = 'branch:      {branch}\n'
+tag = 'tag:         {tag}\n'
+bookmark = 'bookmark:    {bookmark}\n'
+extra = 'extra:       {key}={value|stringescape}\n'
--- a/tests/test-bisect3.t	Thu Sep 22 01:36:01 2011 +0200
+++ b/tests/test-bisect3.t	Thu Sep 22 01:51:36 2011 +0200
@@ -115,3 +115,118 @@
   I 2:b1ad1b6bcc5c
   G 1:37f42ae8b45e
   G 0:b4e73ffab476
+
+test style
+
+  $ hg log --style bisect
+  changeset:   14:cecd84203acc
+  bisect:      
+  tag:         tip
+  user:        test
+  date:        Wed Dec 31 23:59:46 1969 -0000
+  summary:     14
+  
+  changeset:   13:86f7c8cdb6df
+  bisect:      
+  parent:      3:e7f031aee8ca
+  user:        test
+  date:        Wed Dec 31 23:59:47 1969 -0000
+  summary:     13
+  
+  changeset:   12:a76089b5f47c
+  bisect:      bad
+  user:        test
+  date:        Wed Dec 31 23:59:48 1969 -0000
+  summary:     12
+  
+  changeset:   11:5c3eb122d29c
+  bisect:      bad (implicit)
+  user:        test
+  date:        Wed Dec 31 23:59:49 1969 -0000
+  summary:     11
+  
+  changeset:   10:b097cef2be03
+  bisect:      bad
+  user:        test
+  date:        Wed Dec 31 23:59:50 1969 -0000
+  summary:     10
+  
+  changeset:   9:8bcbdb072033
+  bisect:      untested
+  parent:      8:3cd112f87d77
+  parent:      3:e7f031aee8ca
+  user:        test
+  date:        Wed Dec 31 23:59:51 1969 -0000
+  summary:     9=8+3
+  
+  changeset:   8:3cd112f87d77
+  bisect:      untested
+  user:        test
+  date:        Wed Dec 31 23:59:52 1969 -0000
+  summary:     8
+  
+  changeset:   7:577e237a73bd
+  bisect:      skipped
+  user:        test
+  date:        Wed Dec 31 23:59:53 1969 -0000
+  summary:     7
+  
+  changeset:   6:e597fa2707c5
+  bisect:      good
+  user:        test
+  date:        Wed Dec 31 23:59:54 1969 -0000
+  summary:     6
+  
+  changeset:   5:b9cea37a76bc
+  bisect:      good (implicit)
+  user:        test
+  date:        Wed Dec 31 23:59:55 1969 -0000
+  summary:     5
+  
+  changeset:   4:da6b357259d7
+  bisect:      good
+  parent:      1:37f42ae8b45e
+  user:        test
+  date:        Wed Dec 31 23:59:56 1969 -0000
+  summary:     4
+  
+  changeset:   3:e7f031aee8ca
+  bisect:      ignored
+  user:        test
+  date:        Wed Dec 31 23:59:57 1969 -0000
+  summary:     3
+  
+  changeset:   2:b1ad1b6bcc5c
+  bisect:      ignored
+  user:        test
+  date:        Wed Dec 31 23:59:58 1969 -0000
+  summary:     2
+  
+  changeset:   1:37f42ae8b45e
+  bisect:      good (implicit)
+  user:        test
+  date:        Wed Dec 31 23:59:59 1969 -0000
+  summary:     1
+  
+  changeset:   0:b4e73ffab476
+  bisect:      good (implicit)
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     0
+  
+  $ hg log --quiet --style bisect
+    14:cecd84203acc
+    13:86f7c8cdb6df
+  B 12:a76089b5f47c
+  B 11:5c3eb122d29c
+  B 10:b097cef2be03
+  U 9:8bcbdb072033
+  U 8:3cd112f87d77
+  S 7:577e237a73bd
+  G 6:e597fa2707c5
+  G 5:b9cea37a76bc
+  G 4:da6b357259d7
+  I 3:e7f031aee8ca
+  I 2:b1ad1b6bcc5c
+  G 1:37f42ae8b45e
+  G 0:b4e73ffab476