##// END OF EJS Templates
hgweb: do not import templatefilters.revescape and websub as symbol...
Yuya Nishihara -
r27008:7f19f331 default
parent child Browse files
Show More
@@ -10,7 +10,7 b' import contextlib'
10 import os
10 import os
11 from mercurial import hg, hook, error, encoding, templater, util, repoview
11 from mercurial import hg, hook, error, encoding, templater, util, repoview
12 from mercurial import ui as uimod
12 from mercurial import ui as uimod
13 from mercurial.templatefilters import websub
13 from mercurial import templatefilters
14 from common import ErrorResponse, permhooks, caching
14 from common import ErrorResponse, permhooks, caching
15 from common import HTTP_OK, HTTP_NOT_MODIFIED, HTTP_BAD_REQUEST
15 from common import HTTP_OK, HTTP_NOT_MODIFIED, HTTP_BAD_REQUEST
16 from common import HTTP_NOT_FOUND, HTTP_SERVER_ERROR
16 from common import HTTP_NOT_FOUND, HTTP_SERVER_ERROR
@@ -159,7 +159,7 b' class requestcontext(object):'
159 or req.url.strip('/') or self.repo.root)
159 or req.url.strip('/') or self.repo.root)
160
160
161 def websubfilter(text):
161 def websubfilter(text):
162 return websub(text, self.websubtable)
162 return templatefilters.websub(text, self.websubtable)
163
163
164 # create the templater
164 # create the templater
165
165
@@ -12,7 +12,7 b' from mercurial import match, patch, erro'
12 from mercurial import ui as uimod
12 from mercurial import ui as uimod
13 from mercurial.i18n import _
13 from mercurial.i18n import _
14 from mercurial.node import hex, nullid, short
14 from mercurial.node import hex, nullid, short
15 from mercurial.templatefilters import revescape
15 from mercurial import templatefilters
16 from common import ErrorResponse, paritygen
16 from common import ErrorResponse, paritygen
17 from common import HTTP_NOT_FOUND
17 from common import HTTP_NOT_FOUND
18 import difflib
18 import difflib
@@ -315,7 +315,7 b' def changelistentry(web, ctx, tmpl):'
315
315
316 def symrevorshortnode(req, ctx):
316 def symrevorshortnode(req, ctx):
317 if 'node' in req.form:
317 if 'node' in req.form:
318 return revescape(req.form['node'][0])
318 return templatefilters.revescape(req.form['node'][0])
319 else:
319 else:
320 return short(ctx.node())
320 return short(ctx.node())
321
321
General Comments 0
You need to be logged in to leave comments. Login now