# HG changeset patch # User Angel Ezquerra # Date 1354051442 -3600 # Node ID 40374059d227850ec2f5fb4f21a1b619136e2a6a # Parent add2f9ddcfb5e7b462a562b98453f3ffbeefd149 hgwebdir: do not show RSS and Atom links for plain directories Up until now the templates that show RSS and Atom feeds on the "repository lists" (i.e. gitweb and monoblue) showed them for all entries, including regular folders. Clicking on those "folder RSS" links would result in an error page being shown. This patch hides those links for regular folders. diff -r add2f9ddcfb5 -r 40374059d227 mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py Tue Dec 04 00:37:50 2012 +0100 +++ b/mercurial/hgweb/hgwebdir_mod.py Tue Nov 27 22:24:02 2012 +0100 @@ -304,7 +304,8 @@ description_sort="", lastchange=d, lastchange_sort=d[1]-d[0], - archives=[]) + archives=[], + isdirectory=True) seendirs.add(name) yield row diff -r add2f9ddcfb5 -r 40374059d227 mercurial/templates/gitweb/map --- a/mercurial/templates/gitweb/map Tue Dec 04 00:37:50 2012 +0100 +++ b/mercurial/templates/gitweb/map Tue Nov 27 22:24:02 2012 +0100 @@ -294,7 +294,12 @@ {contact|obfuscate} {lastchange|rfc822date} {archives%indexarchiveentry} - + {if(isdirectory, '', + '' + )} + \n' indexarchiveentry = ' {type|escape} ' index = index.tmpl diff -r add2f9ddcfb5 -r 40374059d227 mercurial/templates/monoblue/map --- a/mercurial/templates/monoblue/map Tue Dec 04 00:37:50 2012 +0100 +++ b/mercurial/templates/monoblue/map Tue Nov 27 22:24:02 2012 +0100 @@ -247,10 +247,11 @@ {lastchange|rfc822date} {archives%indexarchiveentry} - + {if(isdirectory, '', + '' + )} \n' indexarchiveentry = '{type|escape} '