diff --git a/mercurial/templates/gitweb/map b/mercurial/templates/gitweb/map --- a/mercurial/templates/gitweb/map +++ b/mercurial/templates/gitweb/map @@ -264,11 +264,12 @@ shortlog = shortlog.tmpl graph = graph.tmpl phasetag = '{ifeq(phase, 'public', '', '{phase|escape} ')}' obsoletetag = '{if(obsolete, 'obsolete ')}' +instabilitytag = '{name|escape} ' tagtag = '{name|escape} ' branchtag = '{name|escape} ' inbranchtag = '{name|escape} ' bookmarktag = '{name|escape} ' -alltags = '{phasetag}{obsoletetag}{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}' +alltags = '{phasetag}{obsoletetag}{instabilities%instabilitytag}{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}' shortlogentry = ' {date|rfc822date} diff --git a/mercurial/templates/monoblue/map b/mercurial/templates/monoblue/map --- a/mercurial/templates/monoblue/map +++ b/mercurial/templates/monoblue/map @@ -223,11 +223,12 @@ filecompchild = ' shortlog = shortlog.tmpl phasetag = '{ifeq(phase, 'public', '', '{phase|escape} ')}' obsoletetag = '{if(obsolete, 'obsolete ')}' +instabilitytag = '{name|escape} ' tagtag = '{name|escape} ' branchtag = '{name|escape} ' inbranchtag = '{name|escape} ' bookmarktag = '{name|escape} ' -alltags = '{phasetag}{obsoletetag}{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}' +alltags = '{phasetag}{obsoletetag}{instabilities%instabilitytag}{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}' shortlogentry = ' {date|rfc822date} diff --git a/mercurial/templates/paper/map b/mercurial/templates/paper/map --- a/mercurial/templates/paper/map +++ b/mercurial/templates/paper/map @@ -200,12 +200,13 @@ branchentry = ' ' phasetag = '{ifeq(phase, 'public', '', '{phase|escape} ')}' obsoletetag = '{if(obsolete, 'obsolete ')}' +instabilitytag = '{name|escape} ' changelogtag = '{name|escape} ' changesettag = '{tag|escape} ' changesetbookmark = '{bookmark|escape} ' changelogbranchhead = '{name|escape} ' changelogbranchname = '{name|escape} ' -alltags = '{phasetag}{obsoletetag}{inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}{bookmarks%changelogtag}' +alltags = '{phasetag}{obsoletetag}{instabilities%instabilitytag}{inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}{bookmarks%changelogtag}' filediffparent = ' 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 @@ -26,6 +26,10 @@ obsolete: yes ')} + {ifeq(count(instabilities), '0', '', ' + instabilities: + {instabilities%"{name} "|escape} + ')} 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 @@ -41,6 +41,10 @@ obsolete: yes ')} +{ifeq(count(instabilities), '0', '', ' + instabilities: + {instabilities%"{name} "|escape} +')} files: {files} diff --git a/mercurial/templates/static/style-gitweb.css b/mercurial/templates/static/style-gitweb.css --- a/mercurial/templates/static/style-gitweb.css +++ b/mercurial/templates/static/style-gitweb.css @@ -130,6 +130,10 @@ span.logtags span.obsoletetag { background-color: #dddddd; border-color: #e4e4e4 #a3a3a3 #a3a3a3 #e4e4e4; } +span.logtags span.instabilitytag { + background-color: #ffb1c0; + border-color: #ffbbc8 #ff4476 #ff4476 #ffbbc8; +} span.logtags span.tagtag { background-color: #ffffaa; border-color: #ffffcc #ffee00 #ffee00 #ffffcc; diff --git a/mercurial/templates/static/style-monoblue.css b/mercurial/templates/static/style-monoblue.css --- a/mercurial/templates/static/style-monoblue.css +++ b/mercurial/templates/static/style-monoblue.css @@ -241,6 +241,10 @@ span.logtags span.obsoletetag { background-color: #dddddd; border-color: #e4e4e4 #a3a3a3 #a3a3a3 #e4e4e4; } +span.logtags span.instabilitytag { + background-color: #ffb1c0; + border-color: #ffbbc8 #ff4476 #ff4476 #ffbbc8; +} span.logtags span.tagtag { background-color: #ffffaa; border-color: #ffffcc #ffee00 #ffee00 #ffffcc; diff --git a/mercurial/templates/static/style-paper.css b/mercurial/templates/static/style-paper.css --- a/mercurial/templates/static/style-paper.css +++ b/mercurial/templates/static/style-paper.css @@ -155,6 +155,15 @@ a { text-decoration:none; } vertical-align: baseline; } +.instability { + color: #000; + font-size: 70%; + border-bottom: 1px solid #000; + font-weight: normal; + margin-left: .5em; + vertical-align: baseline; +} + .tag { color: #999; font-size: 70%; diff --git a/tests/test-hgweb.t b/tests/test-hgweb.t --- a/tests/test-hgweb.t +++ b/tests/test-hgweb.t @@ -340,7 +340,7 @@ static file $ get-with-headers.py --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server 200 Script output follows - content-length: 9261 + content-length: 9374 content-type: text/css body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; background: white; color: black; } @@ -475,6 +475,10 @@ static file background-color: #dddddd; border-color: #e4e4e4 #a3a3a3 #a3a3a3 #e4e4e4; } + span.logtags span.instabilitytag { + background-color: #ffb1c0; + border-color: #ffbbc8 #ff4476 #ff4476 #ffbbc8; + } span.logtags span.tagtag { background-color: #ffffaa; border-color: #ffffcc #ffee00 #ffee00 #ffffcc; diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t --- a/tests/test-obsolete.t +++ b/tests/test-obsolete.t @@ -1034,6 +1034,20 @@ check obsolete changeset obsolete: yes +check changeset with instabilities + + $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=paper' | grep '' + draft orphan phase-divergent + $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=coal' | grep '' + draft orphan phase-divergent + $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=gitweb' | grep '' + 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 + $ killdaemons.py $ rm hg.pid access.log errors.log