##// END OF EJS Templates
webcommands: stop using ersatz if-else ternary operator for rename variable...
av6 -
r27159:7e10b860 default
parent child Browse files
Show More
@@ -838,7 +838,6 b' def comparison(web, req, tmpl):'
838 if 'file' not in req.form:
838 if 'file' not in req.form:
839 raise ErrorResponse(HTTP_NOT_FOUND, 'file not given')
839 raise ErrorResponse(HTTP_NOT_FOUND, 'file not given')
840 path = webutil.cleanpath(web.repo, req.form['file'][0])
840 path = webutil.cleanpath(web.repo, req.form['file'][0])
841 rename = path in ctx and webutil.renamelink(ctx[path]) or []
842
841
843 parsecontext = lambda v: v == 'full' and -1 or int(v)
842 parsecontext = lambda v: v == 'full' and -1 or int(v)
844 if 'context' in req.form:
843 if 'context' in req.form:
@@ -875,8 +874,10 b' def comparison(web, req, tmpl):'
875
874
876 comparison = webutil.compare(tmpl, context, leftlines, rightlines)
875 comparison = webutil.compare(tmpl, context, leftlines, rightlines)
877 if fctx is not None:
876 if fctx is not None:
877 rename = webutil.renamelink(fctx)
878 ctx = fctx
878 ctx = fctx
879 else:
879 else:
880 rename = []
880 ctx = ctx
881 ctx = ctx
881 return tmpl('filecomparison',
882 return tmpl('filecomparison',
882 file=path,
883 file=path,
General Comments 0
You need to be logged in to leave comments. Login now