diff --git a/mercurial/templates/gitweb/map b/mercurial/templates/gitweb/map --- a/mercurial/templates/gitweb/map +++ b/mercurial/templates/gitweb/map @@ -263,11 +263,12 @@ filecompchild = ' shortlog = shortlog.tmpl graph = graph.tmpl phasetag = '{ifeq(phase, 'public', '', '{phase|escape} ')}' +obsoletetag = '{if(obsolete, 'obsolete ')}' tagtag = '{name|escape} ' branchtag = '{name|escape} ' inbranchtag = '{name|escape} ' bookmarktag = '{name|escape} ' -alltags = '{phasetag}{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}' +alltags = '{phasetag}{obsoletetag}{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 @@ -222,11 +222,12 @@ filecompchild = '
{node|short}
' shortlog = shortlog.tmpl phasetag = '{ifeq(phase, 'public', '', '{phase|escape} ')}' +obsoletetag = '{if(obsolete, 'obsolete ')}' tagtag = '{name|escape} ' branchtag = '{name|escape} ' inbranchtag = '{name|escape} ' bookmarktag = '{name|escape} ' -alltags = '{phasetag}{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}' +alltags = '{phasetag}{obsoletetag}{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 @@ -199,12 +199,13 @@ branchentry = ' ' phasetag = '{ifeq(phase, 'public', '', '{phase|escape} ')}' +obsoletetag = '{if(obsolete, 'obsolete ')}' changelogtag = '{name|escape} ' changesettag = '{tag|escape} ' changesetbookmark = '{bookmark|escape} ' changelogbranchhead = '{name|escape} ' changelogbranchname = '{name|escape} ' -alltags = '{phasetag}{inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}{bookmarks%changelogtag}' +alltags = '{phasetag}{obsoletetag}{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 @@ -22,6 +22,10 @@ phase: {phase|escape} ')} + {if(obsolete, ' + obsolete: + yes + ')} 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 @@ -37,6 +37,10 @@ phase: {phase|escape} ')} +{if(obsolete, ' + obsolete: + yes +')} 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 @@ -126,6 +126,10 @@ span.logtags span.phasetag { background-color: #dfafff; border-color: #e2b8ff #ce48ff #ce48ff #e2b8ff; } +span.logtags span.obsoletetag { + background-color: #dddddd; + border-color: #e4e4e4 #a3a3a3 #a3a3a3 #e4e4e4; +} 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 @@ -237,6 +237,10 @@ span.logtags span.phasetag { background-color: #dfafff; border-color: #e2b8ff #ce48ff #ce48ff #e2b8ff; } +span.logtags span.obsoletetag { + background-color: #dddddd; + border-color: #e4e4e4 #a3a3a3 #a3a3a3 #e4e4e4; +} 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 @@ -146,6 +146,15 @@ a { text-decoration:none; } vertical-align: baseline; } +.obsolete { + color: #999; + font-size: 70%; + border-bottom: 1px dashed #999; + 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: 9151 + content-length: 9261 content-type: text/css body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; background: white; color: black; } @@ -471,6 +471,10 @@ static file background-color: #dfafff; border-color: #e2b8ff #ce48ff #ce48ff #e2b8ff; } + span.logtags span.obsoletetag { + background-color: #dddddd; + border-color: #e4e4e4 #a3a3a3 #a3a3a3 #e4e4e4; + } 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 @@ -1015,6 +1015,30 @@ test summary output orphan: 2 changesets phase-divergent: 1 changesets +#if serve + + $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log + $ cat hg.pid >> $DAEMON_PIDS + +check obsolete changeset + + $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=paper' | grep '' + draft obsolete + $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=coal' | grep '' + draft obsolete + $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=gitweb' | grep '' + draft obsolete + $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=monoblue' | grep '' + draft obsolete + $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=spartan' | grep 'class="obsolete"' + obsolete: + yes + + $ killdaemons.py + + $ rm hg.pid access.log errors.log +#endif + Test incoming/outcoming with changesets obsoleted remotely, known locally ===============================================================================