##// END OF EJS Templates
added pygments webhelper
added pygments webhelper

File last commit:

r96:f24b9a29 default
r98:01d0f363 default
Show More
utils.py
16 lines | 511 B | text/x-python | PythonLexer
Marcin Kuzminski
Moved summary to seperate controller,...
r82
def get_repo_slug(request):
path_info = request.environ.get('PATH_INFO')
added is mercurial method in utils,
r96 uri_lst = path_info.split('/')
added empty controllers for branches tags files graph, routing and test for them
r93 repo_name = uri_lst[1]
Marcin Kuzminski
Moved summary to seperate controller,...
r82 return repo_name
added is mercurial method in utils,
r96
def is_mercurial(environ):
"""
Returns True if request's target is mercurial server - header
``HTTP_ACCEPT`` of such request would start with ``application/mercurial``.
"""
http_accept = environ.get('HTTP_ACCEPT')
if http_accept and http_accept.startswith('application/mercurial'):
return True
return False