# HG changeset patch # User Anton Shestakov # Date 2018-03-20 06:19:28 # Node ID 7c18798fc24dd981438ac3da59ce1059aa7fd932 # Parent 6bc2f1b3bc9d3fb73ffe605f9d811bd75727434e hgweb: explain instabilities of unstable changesets (the rest of the themes) diff --git a/mercurial/templates/gitweb/changeset.tmpl b/mercurial/templates/gitweb/changeset.tmpl --- a/mercurial/templates/gitweb/changeset.tmpl +++ b/mercurial/templates/gitweb/changeset.tmpl @@ -45,6 +45,7 @@ changeset | {node|short} {if(obsolete, succsandmarkers%obsfateentry)} +{if(instabilities, whyunstable%whyunstableentry)} {ifeq(count(parent), '2', parent%changesetparentdiff, parent%changesetparent)} {child%changesetchild} diff --git a/mercurial/templates/gitweb/map b/mercurial/templates/gitweb/map --- a/mercurial/templates/gitweb/map +++ b/mercurial/templates/gitweb/map @@ -282,6 +282,13 @@ obsfateentry = ' obsolete {obsfateverb}{obsfateoperations}{obsfatesuccessors}{obsfateusers}{obsfatedate} ' +instabilitychangesetlink = '{node|short}' +divergentnode = '{instabilitychangesetlink} ({phase})' +whyunstableentry = ' + + unstable + {instability}: {if(divergentnodes, divergentnodes%divergentnode)} {reason} {instabilitychangesetlink} + ' shortlogentry = ' {date|rfc822date} diff --git a/mercurial/templates/monoblue/changeset.tmpl b/mercurial/templates/monoblue/changeset.tmpl --- a/mercurial/templates/monoblue/changeset.tmpl +++ b/mercurial/templates/monoblue/changeset.tmpl @@ -49,6 +49,7 @@
changeset {rev}
{node|short}
{if(obsolete, succsandmarkers%obsfateentry)} + {if(instabilities, whyunstable%whyunstableentry)} {ifeq(count(parent), '2', parent%changesetparentdiff, parent%changesetparent)} {child%changesetchild} diff --git a/mercurial/templates/monoblue/map b/mercurial/templates/monoblue/map --- a/mercurial/templates/monoblue/map +++ b/mercurial/templates/monoblue/map @@ -238,6 +238,11 @@ obsfatedate = '{if(obsfatedate(markers), obsfateentry = '
obsolete
{obsfateverb}{obsfateoperations}{obsfatesuccessors}{obsfateusers}{obsfatedate}
' +instabilitychangesetlink = '{node|short}' +divergentnode = '{instabilitychangesetlink} ({phase})' +whyunstableentry = ' +
unstable
+
{instability}: {if(divergentnodes, divergentnodes%divergentnode)} {reason} {instabilitychangesetlink}
' shortlogentry = ' {date|rfc822date} diff --git a/mercurial/templates/spartan/changelogentry.tmpl b/mercurial/templates/spartan/changelogentry.tmpl --- a/mercurial/templates/spartan/changelogentry.tmpl +++ b/mercurial/templates/spartan/changelogentry.tmpl @@ -23,10 +23,7 @@ {phase|escape} ')} {if(obsolete, succsandmarkers%obsfateentry)} - {ifeq(count(instabilities), '0', '', ' - instabilities: - {instabilities%"{instability} "|escape} - ')} + {if(instabilities, whyunstable%whyunstableentry)} files: {files} diff --git a/mercurial/templates/spartan/changeset.tmpl b/mercurial/templates/spartan/changeset.tmpl --- a/mercurial/templates/spartan/changeset.tmpl +++ b/mercurial/templates/spartan/changeset.tmpl @@ -38,10 +38,7 @@ {phase|escape} ')} {if(obsolete, succsandmarkers%obsfateentry)} -{ifeq(count(instabilities), '0', '', ' - instabilities: - {instabilities%"{instability} "|escape} -')} +{if(instabilities, whyunstable%whyunstableentry)} files: {files} diff --git a/mercurial/templates/spartan/map b/mercurial/templates/spartan/map --- a/mercurial/templates/spartan/map +++ b/mercurial/templates/spartan/map @@ -177,6 +177,13 @@ obsfateentry = ' obsolete: {obsfateverb}{obsfateoperations}{obsfatesuccessors}{obsfateusers}{obsfatedate} ' +instabilitychangesetlink = '{node|short}' +divergentnode = '{instabilitychangesetlink} ({phase})' +whyunstableentry = ' + + unstable: + {instability}: {if(divergentnodes, divergentnodes%divergentnode)} {reason} {instabilitychangesetlink} + ' filediffparent = ' parent {rev}: diff --git a/tests/test-obsolete-divergent.t b/tests/test-obsolete-divergent.t --- a/tests/test-obsolete-divergent.t +++ b/tests/test-obsolete-divergent.t @@ -732,6 +732,12 @@ check explanation for a content-divergen content-divergent: 70d5a63ca112 (draft) predecessor a178212c3433 $ get-with-headers.py localhost:$HGPORT 'rev/1a2a9b5b0030?style=coal' | grep divergent: content-divergent: 70d5a63ca112 (draft) predecessor a178212c3433 + $ get-with-headers.py localhost:$HGPORT 'rev/1a2a9b5b0030?style=gitweb' | grep divergent: + content-divergent: 70d5a63ca112 (draft) predecessor a178212c3433 + $ get-with-headers.py localhost:$HGPORT 'rev/1a2a9b5b0030?style=monoblue' | grep divergent: +
content-divergent: 70d5a63ca112 (draft) predecessor a178212c3433
+ $ get-with-headers.py localhost:$HGPORT 'rev/1a2a9b5b0030?style=spartan' | grep divergent: + content-divergent: 70d5a63ca112 (draft) predecessor a178212c3433 $ killdaemons.py diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t --- a/tests/test-obsolete.t +++ b/tests/test-obsolete.t @@ -1068,9 +1068,11 @@ check changeset with instabilities draft orphan phase-divergent $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=monoblue' | grep '' draft orphan phase-divergent - $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=spartan' | grep 'class="instabilities"' - instabilities: - orphan phase-divergent + $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=spartan' | grep 'class="unstable"' + unstable: + orphan: obsolete parent 3de5eca88c00 + unstable: + phase-divergent: immutable predecessor 245bde4270cd check explanation for an orphan and phase-divergent changeset @@ -1080,6 +1082,15 @@ check explanation for an orphan and phas $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=coal' | egrep '(orphan|phase-divergent):' orphan: obsolete parent 3de5eca88c00
phase-divergent: immutable predecessor 245bde4270cd + $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=gitweb' | egrep '(orphan|phase-divergent):' + orphan: obsolete parent 3de5eca88c00 + phase-divergent: immutable predecessor 245bde4270cd + $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=monoblue' | egrep '(orphan|phase-divergent):' +
orphan: obsolete parent 3de5eca88c00
+
phase-divergent: immutable predecessor 245bde4270cd
+ $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=spartan' | egrep '(orphan|phase-divergent):' + orphan: obsolete parent 3de5eca88c00 + phase-divergent: immutable predecessor 245bde4270cd $ killdaemons.py