.editorconfig
author Gregory Szorc <gregory.szorc@gmail.com>
Sun, 18 Dec 2016 16:51:09 -0800
changeset 30776 3997edc4a86d
parent 28793 d30fdd6d1bf7
child 38281 1d6066336d7b
permissions -rw-r--r--
repair: determine what upgrade will do This commit introduces code for determining what actions/improvements an upgrade should perform. The "upgradefindimprovements" function introduces a mechanism to return a list of improvements that can be made to a repository. Each improvement is effectively an action that an upgrade will perform. Associated with each of these improvements is metadata that will be used to inform users what's wrong and what an upgrade will do. Each "improvement" is categorized as a "deficiency" or an "optimization." TBH, I'm not thrilled about the terminology and am receptive to constructive bikeshedding. The main difference between a "deficiency" and an "optimization" is a deficiency is always corrected (if it deviates from the current config) and an "optimization" is an optional action that goes above and beyond to improve the state of the repository (usually by requiring more CPU during upgrade). Our initial set of improvements identifies missing repository requirements, a single, easily correctable problem with changelog storage, and a set of "optimizations" related to delta recalculation. The main "upgraderepo" function has been expanded to handle improvements. It queries for the list of improvements and determines which of them will run based on the current repository state and user I went through numerous iterations of the output format before settling on a ReST-inspired definition list format. (I used bulleted lists in the first submission of this commit and could not get it to format just right.) Even with the various iterations, I'm still not super thrilled with the format. But, this is a debug* command, so that should mean we can refine the output without BC concerns.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28793
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     1
# See http://EditorConfig.org for the specification
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     2
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     3
root = true
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     4
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     5
[*.py]
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     6
indent_size = 4
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     7
indent_style = space
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     8
trim_trailing_whitespace = true
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     9
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
    10
[*.{c,h}]
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
    11
indent_size = 8
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
    12
indent_style = tab
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
    13
trim_trailing_whitespace = true