Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
try: | try: | ||||
revcount = int(req.form.get('revcount', [revcount])[0]) | revcount = int(req.form.get('revcount', [revcount])[0]) | ||||
revcount = max(revcount, 1) | revcount = max(revcount, 1) | ||||
tmpl.defaults['sessionvars']['revcount'] = revcount | tmpl.defaults['sessionvars']['revcount'] = revcount | ||||
except ValueError: | except ValueError: | ||||
pass | pass | ||||
lessvars = copy.copy(tmpl.defaults['sessionvars']) | lessvars = copy.copy(tmpl.defaults['sessionvars']) | ||||
lessvars['revcount'] = max(revcount / 2, 1) | lessvars['revcount'] = max(revcount // 2, 1) | ||||
lessvars['rev'] = query | lessvars['rev'] = query | ||||
morevars = copy.copy(tmpl.defaults['sessionvars']) | morevars = copy.copy(tmpl.defaults['sessionvars']) | ||||
morevars['revcount'] = revcount * 2 | morevars['revcount'] = revcount * 2 | ||||
morevars['rev'] = query | morevars['rev'] = query | ||||
mode, funcarg = getsearchmode(query) | mode, funcarg = getsearchmode(query) | ||||
if 'forcekw' in req.form: | if 'forcekw' in req.form: | ||||
try: | try: | ||||
revcount = int(req.form.get('revcount', [revcount])[0]) | revcount = int(req.form.get('revcount', [revcount])[0]) | ||||
revcount = max(revcount, 1) | revcount = max(revcount, 1) | ||||
tmpl.defaults['sessionvars']['revcount'] = revcount | tmpl.defaults['sessionvars']['revcount'] = revcount | ||||
except ValueError: | except ValueError: | ||||
pass | pass | ||||
lessvars = copy.copy(tmpl.defaults['sessionvars']) | lessvars = copy.copy(tmpl.defaults['sessionvars']) | ||||
lessvars['revcount'] = max(revcount / 2, 1) | lessvars['revcount'] = max(revcount // 2, 1) | ||||
morevars = copy.copy(tmpl.defaults['sessionvars']) | morevars = copy.copy(tmpl.defaults['sessionvars']) | ||||
morevars['revcount'] = revcount * 2 | morevars['revcount'] = revcount * 2 | ||||
count = len(web.repo) | count = len(web.repo) | ||||
pos = ctx.rev() | pos = ctx.rev() | ||||
parity = paritygen(web.stripecount) | parity = paritygen(web.stripecount) | ||||
changenav = webutil.revnav(web.repo).gen(pos, revcount, count) | changenav = webutil.revnav(web.repo).gen(pos, revcount, count) | ||||
revcount = max(revcount, 1) | revcount = max(revcount, 1) | ||||
tmpl.defaults['sessionvars']['revcount'] = revcount | tmpl.defaults['sessionvars']['revcount'] = revcount | ||||
except ValueError: | except ValueError: | ||||
pass | pass | ||||
lrange = webutil.linerange(req) | lrange = webutil.linerange(req) | ||||
lessvars = copy.copy(tmpl.defaults['sessionvars']) | lessvars = copy.copy(tmpl.defaults['sessionvars']) | ||||
lessvars['revcount'] = max(revcount / 2, 1) | lessvars['revcount'] = max(revcount // 2, 1) | ||||
morevars = copy.copy(tmpl.defaults['sessionvars']) | morevars = copy.copy(tmpl.defaults['sessionvars']) | ||||
morevars['revcount'] = revcount * 2 | morevars['revcount'] = revcount * 2 | ||||
patch = 'patch' in req.form | patch = 'patch' in req.form | ||||
if patch: | if patch: | ||||
lessvars['patch'] = morevars['patch'] = req.form['patch'][0] | lessvars['patch'] = morevars['patch'] = req.form['patch'][0] | ||||
descend = 'descend' in req.form | descend = 'descend' in req.form | ||||
if descend: | if descend: | ||||
try: | try: | ||||
revcount = int(req.form.get('revcount', [revcount])[0]) | revcount = int(req.form.get('revcount', [revcount])[0]) | ||||
revcount = max(revcount, 1) | revcount = max(revcount, 1) | ||||
tmpl.defaults['sessionvars']['revcount'] = revcount | tmpl.defaults['sessionvars']['revcount'] = revcount | ||||
except ValueError: | except ValueError: | ||||
pass | pass | ||||
lessvars = copy.copy(tmpl.defaults['sessionvars']) | lessvars = copy.copy(tmpl.defaults['sessionvars']) | ||||
lessvars['revcount'] = max(revcount / 2, 1) | lessvars['revcount'] = max(revcount // 2, 1) | ||||
morevars = copy.copy(tmpl.defaults['sessionvars']) | morevars = copy.copy(tmpl.defaults['sessionvars']) | ||||
morevars['revcount'] = revcount * 2 | morevars['revcount'] = revcount * 2 | ||||
graphtop = req.form.get('graphtop', [ctx.hex()])[0] | graphtop = req.form.get('graphtop', [ctx.hex()])[0] | ||||
graphvars = copy.copy(tmpl.defaults['sessionvars']) | graphvars = copy.copy(tmpl.defaults['sessionvars']) | ||||
graphvars['graphtop'] = graphtop | graphvars['graphtop'] = graphtop | ||||
count = len(web.repo) | count = len(web.repo) |