mercurial/hgweb/webcommands.py
branchstable
changeset 40820 4265bfb53dd3
parent 40295 fa88170c10bb
child 40936 e06719b7544d
equal deleted inserted replaced
40818:47719d7c581f 40820:4265bfb53dd3
   856 
   856 
   857     parsecontext = lambda v: v == 'full' and -1 or int(v)
   857     parsecontext = lambda v: v == 'full' and -1 or int(v)
   858     if 'context' in web.req.qsparams:
   858     if 'context' in web.req.qsparams:
   859         context = parsecontext(web.req.qsparams['context'])
   859         context = parsecontext(web.req.qsparams['context'])
   860     else:
   860     else:
   861         context = parsecontext(web.config('web', 'comparisoncontext', '5'))
   861         context = parsecontext(web.config('web', 'comparisoncontext'))
   862 
   862 
   863     def filelines(f):
   863     def filelines(f):
   864         if f.isbinary():
   864         if f.isbinary():
   865             mt = pycompat.sysbytes(
   865             mt = pycompat.sysbytes(
   866                 mimetypes.guess_type(pycompat.fsdecode(f.path()))[0]
   866                 mimetypes.guess_type(pycompat.fsdecode(f.path()))[0]