Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/webcommands.py @ 27160:c533435cbc37
webcommands: test that fctx is not None in filediff()
A block of code above this one already says "if fctx is not None", and it's
also what this code actually intends to check, so let's be specific as PEP-8
recommends.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 28 Nov 2015 17:06:29 +0800 |
parents | 7e10b860c174 |
children | 5aa2afb4f81a |
comparison
equal
deleted
inserted
replaced
27159:7e10b860c174 | 27160:c533435cbc37 |
---|---|
790 style = web.config('web', 'style', 'paper') | 790 style = web.config('web', 'style', 'paper') |
791 if 'style' in req.form: | 791 if 'style' in req.form: |
792 style = req.form['style'][0] | 792 style = req.form['style'][0] |
793 | 793 |
794 diffs = webutil.diffs(web.repo, tmpl, ctx, None, [path], parity, style) | 794 diffs = webutil.diffs(web.repo, tmpl, ctx, None, [path], parity, style) |
795 if fctx: | 795 if fctx is not None: |
796 rename = webutil.renamelink(fctx) | 796 rename = webutil.renamelink(fctx) |
797 ctx = fctx | 797 ctx = fctx |
798 else: | 798 else: |
799 rename = [] | 799 rename = [] |
800 ctx = ctx | 800 ctx = ctx |