Mercurial > hg-stable
changeset 7182:295af5bc1bcc
hgweb: remove links to non-existent file versions
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Mon, 20 Oct 2008 12:41:09 +0200 |
parents | 1e39a2459359 |
children | 099b4f9be5ab |
files | mercurial/hgweb/webcommands.py templates/coal/map templates/gitweb/map templates/map templates/monoblue/map templates/paper/map |
diffstat | 6 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Mon Oct 20 10:20:35 2008 +0200 +++ b/mercurial/hgweb/webcommands.py Mon Oct 20 12:41:09 2008 +0200 @@ -234,7 +234,8 @@ files = [] parity = paritygen(web.stripecount) for f in ctx.files(): - files.append(tmpl("filenodelink", + template = f in ctx and 'filenodelink' or 'filenolink' + files.append(tmpl(template, node=hex(n), file=f, parity=parity.next()))
--- a/templates/coal/map Mon Oct 20 10:20:35 2008 +0200 +++ b/templates/coal/map Mon Oct 20 12:41:09 2008 +0200 @@ -16,6 +16,7 @@ filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> ' filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> ' filenodelink = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> ' +filenolink = '{file|escape} ' fileellipses = '...' changelogentry = shortlogentry.tmpl searchentry = shortlogentry.tmpl
--- a/templates/gitweb/map Mon Oct 20 10:20:35 2008 +0200 +++ b/templates/gitweb/map Mon Oct 20 12:41:09 2008 +0200 @@ -13,6 +13,7 @@ filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> ' filedifflink = '<a href="#url#diff/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#file|escape#</a> ' filenodelink = '<tr class="parity#parity#"><td><a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">#file|escape#</a></td><td></td><td class="link"><a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">file</a> | <a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">annotate</a> | <a href="#url#diff/#node|short#/#file|urlescape#{sessionvars%urlparameter}">diff</a> | <a href="#url#log/#node|short#/#file|urlescape#{sessionvars%urlparameter}">revisions</a></td></tr>' +filenolink = '<tr class="parity#parity#"><td><a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">#file|escape#</a></td><td></td><td class="link">file | annotate | <a href="#url#diff/#node|short#/#file|urlescape#{sessionvars%urlparameter}">diff</a> | <a href="#url#log/#node|short#/#file|urlescape#{sessionvars%urlparameter}">revisions</a></td></tr>' fileellipses = '...' changelogentry = changelogentry.tmpl searchentry = changelogentry.tmpl
--- a/templates/map Mon Oct 20 10:20:35 2008 +0200 +++ b/templates/map Mon Oct 20 12:41:09 2008 +0200 @@ -13,6 +13,7 @@ filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> ' filedifflink = '<a href="#url#diff/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#file|escape#</a> ' filenodelink = '<a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#file|escape#</a> ' +filenolink = '{file|escape} ' fileellipses = '...' changelogentry = changelogentry.tmpl searchentry = changelogentry.tmpl
--- a/templates/monoblue/map Mon Oct 20 10:20:35 2008 +0200 +++ b/templates/monoblue/map Mon Oct 20 12:41:09 2008 +0200 @@ -13,6 +13,7 @@ filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a>' filedifflink = '<a href="#url#diff/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#file|escape#</a> ' filenodelink = '<tr class="parity#parity#"><td><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">#file|escape#</a></td><td></td><td><a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">file</a> | <a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">annotate</a> | <a href="#url#diff/#node|short#/#file|urlescape#{sessionvars%urlparameter}">diff</a> | <a href="#url#log/#node|short#/#file|urlescape#{sessionvars%urlparameter}">revisions</a></td></tr>' +filenolink = '<tr class="parity#parity#"><td><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">#file|escape#</a></td><td></td><td>file | annotate | <a href="#url#diff/#node|short#/#file|urlescape#{sessionvars%urlparameter}">diff</a> | <a href="#url#log/#node|short#/#file|urlescape#{sessionvars%urlparameter}">revisions</a></td></tr>' fileellipses = '...' changelogentry = changelogentry.tmpl searchentry = changelogentry.tmpl
--- a/templates/paper/map Mon Oct 20 10:20:35 2008 +0200 +++ b/templates/paper/map Mon Oct 20 12:41:09 2008 +0200 @@ -16,6 +16,7 @@ filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> ' filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> ' filenodelink = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> ' +filenolink = '{file|escape} ' fileellipses = '...' changelogentry = ../coal/shortlogentry.tmpl searchentry = ../coal/shortlogentry.tmpl