.editorconfig
author Pulkit Goyal <7895pulkit@gmail.com>
Wed, 03 May 2017 15:25:06 +0530
changeset 32142 d90ffee93df6
parent 28793 d30fdd6d1bf7
child 38281 1d6066336d7b
permissions -rw-r--r--
py3: handle opts uniformly in commands.py Since keyword arguments can't be bytes on Python 3, we converted then to unicodes before passing into different command functions. We need to adopt a certain pattern to convert opts back to bytes. Following are some of the functions which are called from inside these command functions and should always be feeded bytes to follow the right behaviour. ui.fomattter() scmutil.match() patch.diffallopts() hg.peer() cmdutil.{show_changeset|copy|graphrevs|checkunsupportedflag} server.{createservice|runservice} There are few commands which are left out where opts is again passed to a function as keyword arguments or converting opts back to bytes is kind of not necessary. Those are cat, revert, help, unbundle and rollback. Following patches will deal with them. This patch apart from these five commands, convert opts back to bytes for rest of the commands. This fixes a lot of things which are hidden like --git works now. Similarly more flags of commands which run on Python 3 currently get fixed.
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