.clang-format
author Gregory Szorc <gregory.szorc@gmail.com>
Wed, 28 Mar 2018 14:55:13 -0700
changeset 37485 0b7475ea38cf
parent 36224 d0a3fa849cb8
permissions -rw-r--r--
wireproto: port heads command to wire protocol v2 After much thought and consideration, wire protocol version 2's commands will be defined in different functions from the existing commands. This will make it easier to implement these commands because it won't require shoehorning things like response formatting and argument declaration into the same APIs. For example, wire protocol version 1 requires that commands declare a fixed and ordered list of argument names. It isn't really possible to insert new arguments or have optional arguments without breaking backwards compatibility. Wire protocol version 2, however, uses CBOR maps for passing arguments. So arguments a) can be optional b) can be added without BC c) can be strongly typed. This commit starts our trek towards reimplementing the wire protocol for version 2 with the heads command. It is pretty similar to the existing heads command. One added feature is it can be told to operate on only public phase changesets. This is useful for making discovery faster when a repo has tens of thousands of draft phase heads (such as Mozilla's "try" repository). The HTTPv2 server-side protocol has had its `getargs()` implementation updated to reflect that arguments are a map and not a list. Differential Revision: https://phab.mercurial-scm.org/D3179
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