.clang-format
author Gregory Szorc <gregory.szorc@gmail.com>
Thu, 20 Sep 2018 15:06:43 -0700
changeset 39852 2c2fadbc9851
parent 36224 d0a3fa849cb8
permissions -rw-r--r--
localrepo: automatically load lfs extension when required (BC) If an unrecognized requirement is present (possibly due to an unloaded extension), the user will get an error message telling them to go to https://mercurial-scm.org/wiki/MissingRequirement for more info. And some requirements clearly map to known extensions shipped by Mercurial. This commit teaches repository loading to automatically map requirements to extensions. We implement support for loading the lfs extension when the "lfs" requirement is present. This behavior feels more user-friendly to me and I'm having trouble coming up with a compelling reason to not do it. The strongest argument I have against is that - strictly speaking - requirements are general repository features and there could be N providers of that feature. e.g. in the case of LFS, there could be another extension implementing LFS support. And the user would want to use this non-official extension rather than the built-in one. The way this patch implements things, the non-official extension could be missing and Mercurial would load the official lfs extension, leading to unexpected behavior. But this feels like a highly marginal use case to me and doesn't outweigh the user benefit of "it just works." If someone really wanted to e.g. use a custom LFS extension, they could prevent the built-in one from being loaded by either defining "extensions.lfs=/path/to/custom/extension" or "extensions.lfs=!", as the automatic extension loading only occurs if there is no config entry for that extension. Differential Revision: https://phab.mercurial-scm.org/D4711
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34798
e33381d95930 clang-format: configuration for the clang-format source formatter
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     1
BasedOnStyle: LLVM
e33381d95930 clang-format: configuration for the clang-format source formatter
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     2
IndentWidth: 8
e33381d95930 clang-format: configuration for the clang-format source formatter
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     3
UseTab: ForIndentation
e33381d95930 clang-format: configuration for the clang-format source formatter
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     4
BreakBeforeBraces: Linux
e33381d95930 clang-format: configuration for the clang-format source formatter
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     5
AllowShortIfStatementsOnASingleLine: false
e33381d95930 clang-format: configuration for the clang-format source formatter
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     6
IndentCaseLabels: false
e33381d95930 clang-format: configuration for the clang-format source formatter
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     7
AllowShortBlocksOnASingleLine: false
e33381d95930 clang-format: configuration for the clang-format source formatter
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     8
AllowShortFunctionsOnASingleLine: false
36224
d0a3fa849cb8 formatting: enforce system headers before local headers
Augie Fackler <augie@google.com>
parents: 34798
diff changeset
     9
IncludeCategories:
d0a3fa849cb8 formatting: enforce system headers before local headers
Augie Fackler <augie@google.com>
parents: 34798
diff changeset
    10
  - Regex:           '^<'
d0a3fa849cb8 formatting: enforce system headers before local headers
Augie Fackler <augie@google.com>
parents: 34798
diff changeset
    11
    Priority:        1
d0a3fa849cb8 formatting: enforce system headers before local headers
Augie Fackler <augie@google.com>
parents: 34798
diff changeset
    12
  - Regex:           '^"'
d0a3fa849cb8 formatting: enforce system headers before local headers
Augie Fackler <augie@google.com>
parents: 34798
diff changeset
    13
    Priority:        2