.editorconfig
author Augie Fackler <augie@google.com>
Thu, 09 Aug 2018 21:04:15 -0400
changeset 39037 ede768cfe83e
parent 38281 1d6066336d7b
child 45392 c25efc468a49
permissions -rw-r--r--
mail: always fall back to iso-8859-1 if us-ascii won't work (BC) It looks like this was a well-intentioned backwards compat hack for previewing the output of `hg email` in a stable way. Unfortunately I think this hack's time has come, because Python 3 does a much better job of ensuring it actually emits *valid* email messages. In particular, Python 2 would blindly trust us that the bytes we handed it were valid for the encoding we claimed, but Python 3 has some more sniff-tests that we end up failing. As a result, if we're going to print an email to the terminal, try us-ascii first, but if that fails go straight to iso-8859-1 which should be reasonably readable for ascii-compatible patch bodies. This *will* be a breaking change for ascii-incompatible textual patch content, but I don't think that's avoidable if we want to continue using the email library from the stdlib. .. bc:: Emails from the patchbomb extension will always be printed as though they are iso-8859-1 if they're not valid us-ascii. Previously, previewed emails were always claimed to be us-ascii and might contain invalid byte sequences. Differential Revision: https://phab.mercurial-scm.org/D4231

# See http://EditorConfig.org for the specification

root = true

[*.py]
indent_size = 4
indent_style = space
trim_trailing_whitespace = true

[*.{c,h}]
indent_size = 8
indent_style = tab
trim_trailing_whitespace = true

[*.t]
indent_size = 2
indent_style = space
trim_trailing_whitespace = false