( )⚙ D5237 fix: add suboption for configuring execution order of tools

This is an archive of the discontinued Mercurial Phabricator instance.

fix: add suboption for configuring execution order of tools
ClosedPublic

Authored by hooper on Nov 6 2018, 9:02 PM.

Details

Summary

This could be accomplished by using wrapper scripts, but that would diminish
the usefulness of the incremental formatting logic. Configuring execution order
along with other things in the hgrc is probably more convenient anyway.

This change highlights some awkwardness with suboptions and default values,
which should be addressed separately.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

hooper created this revision.Nov 6 2018, 9:02 PM
hooper updated this revision to Diff 12461.Nov 6 2018, 9:03 PM
yuja added a subscriber: yuja.Nov 7 2018, 7:34 AM

+ When multiple tools are configured to affect a file, they execute in an order
+ defined by the :priority suboption. The priority suboption has a default value
+ of zero for each tool. Tools are executed in order of ascending priority.

Appears that we use "descending" priority in hooks and merge-tools. Let's
follow these. Other than that, the patch looks good to me.

hooper updated this revision to Diff 12473.Nov 7 2018, 5:05 PM
This revision was automatically updated to reflect the committed changes.