# HG changeset patch # User Anton Shestakov # Date 1510842063 -28800 # Node ID a1de4ffaa7a8fd1590048e39c5ed61c1f96c21f3 # Parent 9acc0360ff67c35d18e20c401aa4c801c7bea339 hgweb: show commit phase if it's not public In spartan theme phase is shown on its own table row, because there's no single line of "tags". Everywhere else phase is prepended to the list of "tags" of a changeset. Its element has a purple-ish color in gitweb and monoblue, and a dotted line under it and no color in paper and coal (as these themes are frugal with colors). This patch intentionally doesn't touch graph, because it needs a rewrite. I'll get to it pretty soon and in the process will add phase and everything that's still coming (e.g. obsolescence and instabilities). .. feature:: hgweb now displays phases of non-public changesets diff -r 9acc0360ff67 -r a1de4ffaa7a8 mercurial/templates/gitweb/map --- a/mercurial/templates/gitweb/map Wed Nov 15 23:55:09 2017 +0800 +++ b/mercurial/templates/gitweb/map Thu Nov 16 22:21:03 2017 +0800 @@ -262,11 +262,12 @@ ' shortlog = shortlog.tmpl graph = graph.tmpl +phasetag = '{ifeq(phase, 'public', '', '{phase|escape} ')}' tagtag = '{name|escape} ' branchtag = '{name|escape} ' inbranchtag = '{name|escape} ' bookmarktag = '{name|escape} ' -alltags = '{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}' +alltags = '{phasetag}{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}' shortlogentry = ' {date|rfc822date} diff -r 9acc0360ff67 -r a1de4ffaa7a8 mercurial/templates/monoblue/map --- a/mercurial/templates/monoblue/map Wed Nov 15 23:55:09 2017 +0800 +++ b/mercurial/templates/monoblue/map Thu Nov 16 22:21:03 2017 +0800 @@ -221,11 +221,12 @@
child {rev}
{node|short}
' shortlog = shortlog.tmpl +phasetag = '{ifeq(phase, 'public', '', '{phase|escape} ')}' tagtag = '{name|escape} ' branchtag = '{name|escape} ' inbranchtag = '{name|escape} ' bookmarktag = '{name|escape} ' -alltags = '{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}' +alltags = '{phasetag}{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}' shortlogentry = ' {date|rfc822date} diff -r 9acc0360ff67 -r a1de4ffaa7a8 mercurial/templates/paper/map --- a/mercurial/templates/paper/map Wed Nov 15 23:55:09 2017 +0800 +++ b/mercurial/templates/paper/map Thu Nov 16 22:21:03 2017 +0800 @@ -198,12 +198,13 @@ ' +phasetag = '{ifeq(phase, 'public', '', '{phase|escape} ')}' changelogtag = '{name|escape} ' changesettag = '{tag|escape} ' changesetbookmark = '{bookmark|escape} ' changelogbranchhead = '{name|escape} ' changelogbranchname = '{name|escape} ' -alltags = '{inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}{bookmarks%changelogtag}' +alltags = '{phasetag}{inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}{bookmarks%changelogtag}' filediffparent = ' diff -r 9acc0360ff67 -r a1de4ffaa7a8 mercurial/templates/spartan/changelogentry.tmpl --- a/mercurial/templates/spartan/changelogentry.tmpl Wed Nov 15 23:55:09 2017 +0800 +++ b/mercurial/templates/spartan/changelogentry.tmpl Thu Nov 16 22:21:03 2017 +0800 @@ -18,6 +18,10 @@ date: {date|rfc822date} + {ifeq(phase, 'public', '', ' + phase: + {phase|escape} + ')} files: {files} diff -r 9acc0360ff67 -r a1de4ffaa7a8 mercurial/templates/spartan/changeset.tmpl --- a/mercurial/templates/spartan/changeset.tmpl Wed Nov 15 23:55:09 2017 +0800 +++ b/mercurial/templates/spartan/changeset.tmpl Thu Nov 16 22:21:03 2017 +0800 @@ -33,6 +33,10 @@ date: {date|rfc822date} +{ifeq(phase, 'public', '', ' + phase: + {phase|escape} +')} files: {files} diff -r 9acc0360ff67 -r a1de4ffaa7a8 mercurial/templates/static/style-gitweb.css --- a/mercurial/templates/static/style-gitweb.css Wed Nov 15 23:55:09 2017 +0800 +++ b/mercurial/templates/static/style-gitweb.css Thu Nov 16 22:21:03 2017 +0800 @@ -122,6 +122,10 @@ background-color: #ffaaff; border-color: #ffccff #ff00ee #ff00ee #ffccff; } +span.logtags span.phasetag { + background-color: #dfafff; + border-color: #e2b8ff #ce48ff #ce48ff #e2b8ff; +} span.logtags span.tagtag { background-color: #ffffaa; border-color: #ffffcc #ffee00 #ffee00 #ffffcc; diff -r 9acc0360ff67 -r a1de4ffaa7a8 mercurial/templates/static/style-monoblue.css --- a/mercurial/templates/static/style-monoblue.css Wed Nov 15 23:55:09 2017 +0800 +++ b/mercurial/templates/static/style-monoblue.css Thu Nov 16 22:21:03 2017 +0800 @@ -233,6 +233,10 @@ background-color: #ffaaff; border-color: #ffccff #ff00ee #ff00ee #ffccff; } +span.logtags span.phasetag { + background-color: #dfafff; + border-color: #e2b8ff #ce48ff #ce48ff #e2b8ff; +} span.logtags span.tagtag { background-color: #ffffaa; border-color: #ffffcc #ffee00 #ffee00 #ffffcc; diff -r 9acc0360ff67 -r a1de4ffaa7a8 mercurial/templates/static/style-paper.css --- a/mercurial/templates/static/style-paper.css Wed Nov 15 23:55:09 2017 +0800 +++ b/mercurial/templates/static/style-paper.css Thu Nov 16 22:21:03 2017 +0800 @@ -137,6 +137,15 @@ margin: 1em 0; } +.phase { + color: #999; + font-size: 70%; + border-bottom: 1px dotted #999; + font-weight: normal; + margin-left: .5em; + vertical-align: baseline; +} + .tag { color: #999; font-size: 70%; diff -r 9acc0360ff67 -r a1de4ffaa7a8 tests/test-hgweb-commands.t --- a/tests/test-hgweb-commands.t Wed Nov 15 23:55:09 2017 +0800 +++ b/tests/test-hgweb-commands.t Thu Nov 16 22:21:03 2017 +0800 @@ -775,7 +775,7 @@ test branch commit with null character: - unstable tip something + draft unstable tip something @@ -783,7 +783,7 @@ test branch - stable + draft stable @@ -791,7 +791,7 @@ test Added tag 1.0 for changeset 2ef0ac749a14 - default + draft default @@ -799,7 +799,7 @@ test base - 1.0 anotherthing + draft 1.0 anotherthing @@ -880,7 +880,7 @@

changeset 0:2ef0ac749a14 - 1.0 anotherthing + draft 1.0 anotherthing

@@ -1054,7 +1054,7 @@ test base - 1.0 anotherthing + draft 1.0 anotherthing @@ -1312,7 +1312,7 @@

view foo @ 1:a4f92ed23982 - default + draft default

@@ -1446,7 +1446,7 @@

view foo @ 2:1d22e65f027e - stable + draft stable

@@ -1584,7 +1584,7 @@ branch commit with null character: - unstable tip something + draft unstable tip something @@ -1598,7 +1598,7 @@ branch - stable + draft stable @@ -1612,7 +1612,7 @@ Added tag 1.0 for changeset 2ef0ac749a14 - default + draft default @@ -1626,7 +1626,7 @@ base - 1.0 anotherthing + draft 1.0 anotherthing diff -r 9acc0360ff67 -r a1de4ffaa7a8 tests/test-hgweb-descend-empties.t --- a/tests/test-hgweb-descend-empties.t Wed Nov 15 23:55:09 2017 +0800 +++ b/tests/test-hgweb-descend-empties.t Thu Nov 16 22:21:03 2017 +0800 @@ -73,7 +73,7 @@

directory / @ 0:c9f45f7a1659 - default tip + draft default tip

@@ -193,7 +193,7 @@

directory / @ 0:c9f45f7a1659 - default tip + draft default tip

@@ -317,7 +317,7 @@ -

/ default tip

+

/ draft default tip

@@ -431,7 +431,7 @@ -
/ default tip
+
/ draft default tip
diff -r 9acc0360ff67 -r a1de4ffaa7a8 tests/test-hgweb-diffs.t --- a/tests/test-hgweb-diffs.t Wed Nov 15 23:55:09 2017 +0800 +++ b/tests/test-hgweb-diffs.t Thu Nov 16 22:21:03 2017 +0800 @@ -81,7 +81,7 @@

changeset 0:0cd96de13884 - + draft

@@ -254,7 +254,7 @@

diff b @ 1:559edbd9ed20 - default tip + draft default tip

@@ -359,7 +359,7 @@

changeset 0:0cd96de13884 - + draft

@@ -536,7 +536,7 @@

diff a @ 1:559edbd9ed20 - default tip + draft default tip

@@ -642,7 +642,7 @@

comparison a @ 0:0cd96de13884 - + draft

@@ -772,7 +772,7 @@

comparison a @ 2:d73db4d812ff - default tip + draft default tip

@@ -904,7 +904,7 @@

comparison a @ 3:20e80271eb7a - default tip + draft default tip

@@ -1042,7 +1042,7 @@

comparison e @ 5:41d9fc4a6ae1 - default tip + draft default tip

diff -r 9acc0360ff67 -r a1de4ffaa7a8 tests/test-hgweb-filelog.t --- a/tests/test-hgweb-filelog.t Wed Nov 15 23:55:09 2017 +0800 +++ b/tests/test-hgweb-filelog.t Thu Nov 16 22:21:03 2017 +0800 @@ -189,7 +189,7 @@

log a @ 4:3f41bc784e7e - a-branch + draft a-branch

@@ -220,7 +220,7 @@ @@ -229,7 +229,7 @@ @@ -312,7 +312,7 @@

log a @ 4:3f41bc784e7e - a-branch + draft a-branch

@@ -343,7 +343,7 @@ @@ -352,7 +352,7 @@ @@ -435,7 +435,7 @@

log a @ 1:5ed941583260 - a-tag a-bookmark + draft a-tag a-bookmark

@@ -466,7 +466,7 @@ @@ -549,7 +549,7 @@

log a @ 1:5ed941583260 - a-tag a-bookmark + draft a-tag a-bookmark

@@ -580,7 +580,7 @@ @@ -740,7 +740,7 @@

log c @ 7:46c1a66bd8fc - a-branch tip + draft a-branch tip (following lines 1:2 back to filelog)

@@ -771,7 +771,7 @@ @@ -780,7 +780,7 @@ @@ -860,7 +860,7 @@

log c @ 7:46c1a66bd8fc - a-branch tip + draft a-branch tip (following lines 1:2 back to filelog)

@@ -891,7 +891,7 @@ @@ -1097,7 +1097,7 @@

log a @ 4:3f41bc784e7e - a-branch + draft a-branch

@@ -1128,7 +1128,7 @@ @@ -1676,7 +1676,7 @@ @@ -1685,7 +1685,7 @@ diff -r 9acc0360ff67 -r a1de4ffaa7a8 tests/test-hgweb-removed.t --- a/tests/test-hgweb-removed.t Wed Nov 15 23:55:09 2017 +0800 +++ b/tests/test-hgweb-removed.t Thu Nov 16 22:21:03 2017 +0800 @@ -62,7 +62,7 @@

changeset 1:c78f6c5cbea9 - default tip + draft default tip

@@ -190,7 +190,7 @@

diff a @ 1:c78f6c5cbea9 - default tip + draft default tip

diff -r 9acc0360ff67 -r a1de4ffaa7a8 tests/test-hgweb.t --- a/tests/test-hgweb.t Wed Nov 15 23:55:09 2017 +0800 +++ b/tests/test-hgweb.t Thu Nov 16 22:21:03 2017 +0800 @@ -267,7 +267,7 @@

directory / @ 0:2ef0ac749a14 - default tip @ a b c d/e/f + draft default tip @ a b c d/e/f

@@ -340,7 +340,7 @@ $ get-with-headers.py --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server 200 Script output follows - content-length: 9044 + content-length: 9151 content-type: text/css body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; background: white; color: black; } @@ -467,6 +467,10 @@ background-color: #ffaaff; border-color: #ffccff #ff00ee #ff00ee #ffccff; } + span.logtags span.phasetag { + background-color: #dfafff; + border-color: #e2b8ff #ce48ff #ce48ff #e2b8ff; + } span.logtags span.tagtag { background-color: #ffffaa; border-color: #ffffcc #ffee00 #ffee00 #ffffcc; diff -r 9acc0360ff67 -r a1de4ffaa7a8 tests/test-highlight.t --- a/tests/test-highlight.t Wed Nov 15 23:55:09 2017 +0800 +++ b/tests/test-highlight.t Thu Nov 16 22:21:03 2017 +0800 @@ -113,7 +113,7 @@

view primes.py @ 0:f4fca47b67e6 - default tip + draft default tip

@@ -252,7 +252,7 @@

annotate primes.py @ 0:f4fca47b67e6 - default tip + draft default tip

drwxr-xr-x test second a - a-branch + draft a-branch
test first a - a-tag a-bookmark + draft a-tag a-bookmark
test second a - a-branch + draft a-branch
test first a - a-tag a-bookmark + draft a-tag a-bookmark
test first a - a-tag a-bookmark + draft a-tag a-bookmark
test first a - a-tag a-bookmark + draft a-tag a-bookmark
test change c - a-branch tip + draft a-branch tip
test b - + draft
test change c - a-branch tip + draft a-branch tip
test second a - a-branch + draft a-branch
@@ -1141,7 +1141,7 @@
     
test first a - a-tag a-bookmark + draft a-tag a-bookmark
@@ -1379,7 +1379,7 @@
   
   

log c @ 12:6e4182052f7b - a-branch tip + draft a-branch tip (following lines 3:4 back to filelog)

@@ -1410,7 +1410,7 @@
test touching beginning and end of c - a-branch + draft a-branch
@@ -1429,7 +1429,7 @@
     
test touch beginning of c - a-branch + draft a-branch
@@ -1449,7 +1449,7 @@
     
test make c bigger and touch its beginning - a-branch + draft a-branch
@@ -1473,7 +1473,7 @@
     
test change c - a-branch + draft a-branch
@@ -1487,7 +1487,7 @@
     
test b - + draft
@@ -1636,7 +1636,7 @@
   
   

log c @ 8:5c6574614c37 - a-branch + draft a-branch (following lines 3:4, descending back to filelog)

@@ -1667,7 +1667,7 @@
test make c bigger and touch its beginning - a-branch + draft a-branch
test touch beginning of c - a-branch + draft a-branch
test touching beginning and end of c - a-branch + draft a-branch