Page MenuHomePhabricator

hgweb: query string arguments to control whitespace for annotate
ClosedPublic

Authored by indygreg on Sep 30 2017, 4:08 AM.

Details

Summary

This feature should hopefully be pretty straightforward. We simply
examine some query string arguments to feed into the diff options.

The function to obtain the diff options has been factored into its
own generic function to facilitate an upcoming change to the HTML
interface and to enable diff settings to be controlled via the same
query string arguments on other web commands.

The test output for "ignoreblanklines" didn't change. I'm not sure
why. Our test coverage for --ignore-blank-lines isn't great and I
can't figure out how to make this diff setting do anything meaningful.
On a very brief examination of the code, it is possible the setting
doesn't work because it is operating at the line level and blank lines
detection needs to examine multiple lines. But I'm not an expert in
this code, so I'm not sure.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Sep 30 2017, 4:08 AM
simpkins accepted this revision.Oct 1 2017, 6:22 AM
simpkins added a subscriber: simpkins.

Looks good to me apart from one minor question.

mercurial/hgweb/webutil.py
180–183

Would it be better to use util.parsebool() here?

durin42 added a subscriber: durin42.Oct 1 2017, 6:38 AM
durin42 added inline comments.
mercurial/hgweb/webutil.py
180–183

Yeah, let's do parsebool() here, but that's fine as a follow-up

durin42 accepted this revision.Oct 1 2017, 6:40 AM
This revision is now accepted and ready to land.Oct 1 2017, 6:40 AM
This revision was automatically updated to reflect the committed changes.