# HG changeset patch # User Dirkjan Ochtman # Date 1224499269 -7200 # Node ID 295af5bc1bcc7dd0c45915aade079173e967d09f # Parent 1e39a2459359a2cd82b443b853eebf81d820d41c hgweb: remove links to non-existent file versions diff -r 1e39a2459359 -r 295af5bc1bcc mercurial/hgweb/webcommands.py --- 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())) diff -r 1e39a2459359 -r 295af5bc1bcc templates/coal/map --- 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 = '{label|escape} ' filedifflink = '{file|escape} ' filenodelink = '{file|escape} ' +filenolink = '{file|escape} ' fileellipses = '...' changelogentry = shortlogentry.tmpl searchentry = shortlogentry.tmpl diff -r 1e39a2459359 -r 295af5bc1bcc templates/gitweb/map --- 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 = '{label|escape} ' filedifflink = '#file|escape# ' filenodelink = '#file|escape#file | annotate | diff | revisions' +filenolink = '#file|escape#file | annotate | diff | revisions' fileellipses = '...' changelogentry = changelogentry.tmpl searchentry = changelogentry.tmpl diff -r 1e39a2459359 -r 295af5bc1bcc templates/map --- 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 = '{label|escape} ' filedifflink = '#file|escape# ' filenodelink = '#file|escape# ' +filenolink = '{file|escape} ' fileellipses = '...' changelogentry = changelogentry.tmpl searchentry = changelogentry.tmpl diff -r 1e39a2459359 -r 295af5bc1bcc templates/monoblue/map --- 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 = '{label|escape}' filedifflink = '#file|escape# ' filenodelink = '#file|escape#file | annotate | diff | revisions' +filenolink = '#file|escape#file | annotate | diff | revisions' fileellipses = '...' changelogentry = changelogentry.tmpl searchentry = changelogentry.tmpl diff -r 1e39a2459359 -r 295af5bc1bcc templates/paper/map --- 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 = '{label|escape} ' filedifflink = '{file|escape} ' filenodelink = '{file|escape} ' +filenolink = '{file|escape} ' fileellipses = '...' changelogentry = ../coal/shortlogentry.tmpl searchentry = ../coal/shortlogentry.tmpl