mercurial/hgweb/webcommands.py
changeset 40936 e06719b7544d
parent 40407 3d76a8e627a6
parent 40820 4265bfb53dd3
child 41397 0bd56c291359
equal deleted inserted replaced
40935:4591c9791a82 40936:e06719b7544d
   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]