# HG changeset patch # User Steven Brown # Date 1400317823 -28800 # Node ID 16352b34e32e40faab60fef8a0e533759e7a73fe # Parent ec273709c49e3da28953470a9f22e99660479190 hgweb: apply websub filter to the changeset description in rss and atom feeds For example, this is useful for linking from the feed reader to a bug tracker. This follows the existing pattern used within the hgweb templates. With the exception of the raw style, all usages of the changeset "desc" keyword are now followed by either the "firstline" filter or the "websub" filter. When "websub" is used, it always follows the "escape" filter. diff -r ec273709c49e -r 16352b34e32e mercurial/templates/atom/changelogentry.tmpl --- a/mercurial/templates/atom/changelogentry.tmpl Sat May 17 17:09:46 2014 +0800 +++ b/mercurial/templates/atom/changelogentry.tmpl Sat May 17 17:10:23 2014 +0800 @@ -32,7 +32,7 @@ description - {desc|strip|escape|addbreaks|nonempty} + {desc|strip|escape|websub|addbreaks|nonempty} files diff -r ec273709c49e -r 16352b34e32e mercurial/templates/rss/changelogentry.tmpl --- a/mercurial/templates/rss/changelogentry.tmpl Sat May 17 17:09:46 2014 +0800 +++ b/mercurial/templates/rss/changelogentry.tmpl Sat May 17 17:10:23 2014 +0800 @@ -27,7 +27,7 @@ description - {desc|strip|escape|addbreaks|nonempty} + {desc|strip|escape|websub|addbreaks|nonempty} files diff -r ec273709c49e -r 16352b34e32e mercurial/templates/rss/filelogentry.tmpl --- a/mercurial/templates/rss/filelogentry.tmpl Sat May 17 17:09:46 2014 +0800 +++ b/mercurial/templates/rss/filelogentry.tmpl Sat May 17 17:10:23 2014 +0800 @@ -1,7 +1,7 @@ {desc|strip|firstline|strip|escape} {urlbase}{url|urlescape}log{node|short}/{file|urlescape} - + {author|obfuscate} {date|rfc822date} diff -r ec273709c49e -r 16352b34e32e tests/test-hgweb-commands.t --- a/tests/test-hgweb-commands.t Sat May 17 17:09:46 2014 +0800 +++ b/tests/test-hgweb-commands.t Sat May 17 17:10:23 2014 +0800 @@ -36,6 +36,8 @@ > default.width = 3 > stable.width = 3 > stable.color = FF0000 + > [websub] + > append = s|(.*)|\1(websub)| > EOF $ hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log @@ -98,7 +100,7 @@ description - branch commit with null character: + branch commit with null character: (websub) files @@ -141,7 +143,7 @@ description - branch + branch(websub) files @@ -184,7 +186,7 @@ description - Added tag 1.0 for changeset 2ef0ac749a14 + Added tag 1.0 for changeset 2ef0ac749a14(websub) files @@ -227,7 +229,7 @@ description - base + base(websub) files @@ -278,7 +280,7 @@ description - branch commit with null character: + branch commit with null character: (websub) files @@ -318,7 +320,7 @@ description - branch + branch(websub) files @@ -358,7 +360,7 @@ description - Added tag 1.0 for changeset 2ef0ac749a14 + Added tag 1.0 for changeset 2ef0ac749a14(websub) files @@ -398,7 +400,7 @@ description - base + base(websub) files @@ -458,7 +460,7 @@ description - Added tag 1.0 for changeset 2ef0ac749a14 + Added tag 1.0 for changeset 2ef0ac749a14(websub) files @@ -501,7 +503,7 @@ description - base + base(websub) files @@ -552,7 +554,7 @@ description - Added tag 1.0 for changeset 2ef0ac749a14 + Added tag 1.0 for changeset 2ef0ac749a14(websub) files @@ -592,7 +594,7 @@ description - base + base(websub) files @@ -650,7 +652,7 @@ description - base + base(websub) files @@ -675,7 +677,7 @@ base http://*:$HGPORT/log2ef0ac749a14/foo (glob) - + test Thu, 01 Jan 1970 00:00:00 +0000 @@ -862,7 +864,7 @@ number or hash, or revset expression. -
base
+
base(websub)
@@ -1284,7 +1286,7 @@ number or hash, or revset expression. -
Added tag 1.0 for changeset 2ef0ac749a14
+
Added tag 1.0 for changeset 2ef0ac749a14(websub)
@@ -1408,7 +1410,7 @@ number or hash, or revset expression. -
branch
+
branch(websub)