[PATCH] hgweb: coal/paper: display the branch name
Ben
benoit.allard at gmx.de
Tue Jul 1 18:16:01 CDT 2008
Display the name of the branches in the coal and paper view for the
graph and log view.
That time my mailer eat the long lines ... resent as gzip in attachment ...
On Wed, Jul 2, 2008 at 01:13, Ben <benoit.allard at gmx.de> wrote:
> # HG changeset patch
> # User Benoit Allard <benoit at aeteurope.nl>
> # Date 1213826684 -7200
> # Node ID ed84752777c56fda7eb7e4d5f43624d4b14ffb6c
> # Parent 39319a457ddac02e209461eb3d0ed2145ccc0106
> hgweb: coal/paper: display the branch name
>
> diff -r 39319a457dda -r ed84752777c5 templates/coal/graph.tmpl
> --- a/templates/coal/graph.tmpl Sat Jun 28 09:28:01 2008 +0200
> +++ b/templates/coal/graph.tmpl Thu Jun 19 00:04:44 2008 +0200
> @@ -70,7 +70,7 @@
>
> var revlink = '<li style="_STYLE"><span class="desc">';
> revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}"
> title="_NODEID">_DESC</a>';
> -revlink += '</span><span class="tag">_TAGS</span>';
> +revlink += '</span>_BRANCHINFO<span class="tag">_TAGS</span>';
> revlink += '<span class="info">_DATE ago, by _USER</span></li>';
>
> graph.vertex = function(x, y, color, parity, cur) {
> @@ -86,10 +86,18 @@
> var item = revlink.replace(/_STYLE/, nstyle);
> item = item.replace(/_PARITY/, 'parity' + parity);
> item = item.replace(/_NODEID/, cur[0]);
> - item = item.replace(/_NODEID/, cur[0]);
> item = item.replace(/_DESC/, cur[3]);
> item = item.replace(/_USER/, cur[4]);
> item = item.replace(/_DATE/, cur[5]);
> + var branchspan = '';
> + if (cur[6][0] != 'default' || cur[6][1]) {
> + if (cur[6][1]) {
> + branchspan += '<span class="branchhead">'+cur[6][0]+'</span>';
> + } else {
> + branchspan += '<span class="branchname">'+cur[6][0]+'</span>';
> + }
> + }
> + item = item.replace(/_BRANCHINFO/, branchspan);
> item = item.replace(/_TAGS/, cur[7].join(' '));
>
> return [bg, item];
> diff -r 39319a457dda -r ed84752777c5 templates/coal/map
> --- a/templates/coal/map Sat Jun 28 09:28:01 2008 +0200
> +++ b/templates/coal/map Thu Jun 19 00:04:44 2008 +0200
> @@ -56,6 +56,8 @@
> tags = tags.tmpl
> tagentry = '<tr class="tagEntry parity{parity}"><td><a
> href="{url}rev/{node|short}{sessionvars%urlparameter}">{tag|escape}</a></td><td
> class="node">{node|short}</td></tr>'
> changelogtag = '<span class="tag">{name|escape}</span> '
> +changelogbranch = '<span class="branchhead">{name|escape}</span> '
> +changeloginbranch = '<span class="branchname">{name|escape}</span>'
> changesettag = '<span class="tag">{tag|escape}</span> '
> filediffparent = '<tr><th class="parent">parent {rev}:</th><td
> class="parent"><a
> href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>'
> filelogparent = '<tr><th>parent {rev}:</th><td><a
> href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td></tr>'
> diff -r 39319a457dda -r ed84752777c5 templates/coal/shortlogentry.tmpl
> --- a/templates/coal/shortlogentry.tmpl Sat Jun 28 09:28:01 2008 +0200
> +++ b/templates/coal/shortlogentry.tmpl Thu Jun 19 00:04:44 2008 +0200
> @@ -1,5 +1,5 @@
> <tr class="parity{parity}">
> <td class="age">{date|age}</td>
> <td class="author">{author|person}</td>
> - <td class="description"><a
> href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape}</a>{tags%changelogtag}</td>
> + <td class="description"><a
> href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape}</a>{inbranch%changeloginbranch}{branches%changelogbranch}{tags%changelogtag}</td>
> </tr>
> diff -r 39319a457dda -r ed84752777c5 templates/paper/map
> --- a/templates/paper/map Sat Jun 28 09:28:01 2008 +0200
> +++ b/templates/paper/map Thu Jun 19 00:04:44 2008 +0200
> @@ -55,8 +55,9 @@
> fileannotatechild = '<tr><td class="metatag">child:</td><td><a
> href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td></tr>'
> tags = ../coal/tags.tmpl
> tagentry = '<tr class="tagEntry parity{parity}"><td><a
> href="{url}rev/{node|short}{sessionvars%urlparameter}">{tag|escape}</a></td><td
> class="node">{node|short}</td></tr>'
> -changelogtag = '<tr><th class="tag">tag:</th><td
> class="tag">{tag|escape}</td></tr>'
> changelogtag = '<span class="tag">{name|escape}</span> '
> +changelogbranch = '<span class="branchhead">{name|escape}</span> '
> +changeloginbranch = '<span class="branchname">{name|escape}</span> '
> changesettag = '<span class="tag">{tag|escape}</span> '
> filediffparent = '<tr><th class="parent">parent {rev}:</th><td
> class="parent"><a
> href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>'
> filelogparent = '<tr><th>parent {rev}:</th><td><a
> href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td></tr>'
> diff -r 39319a457dda -r ed84752777c5 templates/static/style-coal.css
> --- a/templates/static/style-coal.css Sat Jun 28 09:28:01 2008 +0200
> +++ b/templates/static/style-coal.css Thu Jun 19 00:04:44 2008 +0200
> @@ -81,6 +81,22 @@
> .tag {
> color: #999;
> font-size: 70%;
> + font-weight: normal;
> + margin-left: .5em;
> + vertical-align: baseline;
> +}
> +
> +.branchhead {
> + color: #cc0066;
> + font-size: 80%;
> + font-weight: normal;
> + margin-left: .5em;
> + vertical-align: baseline;
> +}
> +
> +.branchname {
> + color: #ee8800;
> + font-size: 60%;
> font-weight: normal;
> margin-left: .5em;
> vertical-align: baseline;
> diff -r 39319a457dda -r ed84752777c5 templates/static/style-paper.css
> --- a/templates/static/style-paper.css Sat Jun 28 09:28:01 2008 +0200
> +++ b/templates/static/style-paper.css Thu Jun 19 00:04:44 2008 +0200
> @@ -77,6 +77,22 @@
> .tag {
> color: #999;
> font-size: 70%;
> + font-weight: normal;
> + margin-left: .5em;
> + vertical-align: baseline;
> +}
> +
> +.branchhead {
> + color: #cc0066;
> + font-size: 80%;
> + font-weight: normal;
> + margin-left: .5em;
> + vertical-align: baseline;
> +}
> +
> +.branchname {
> + color: #ee8800;
> + font-size: 60%;
> font-weight: normal;
> margin-left: .5em;
> vertical-align: baseline;
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: branch.patch.gz
Type: application/x-gzip
Size: 1408 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20080702/971273cd/attachment.bin
More information about the Mercurial-devel
mailing list