Note:
This page is primarily intended for developers of Mercurial.
Unifying Fix and FormatSource Extensions
Status: Project
Main proponents: DannyHooper and Pierre-YvesDavid
Source formatting is great and a trending topic. There are multiples associated issues. The fix extensions deal with a subset of these issue and the format-source extensions deal with another subset (with some overlap).
We should have a single extension dealing with all issues.
1. Goal
There is three main issue with source formatting:
- Applying formatting in your working copy
- Applying formatting on content of existing draft changesets
- Applying formatting change during merge // minimizing conflict that are purely formatting.
fix deal with the first 2; Format source deal with the first and the last. We want an unified approache using common code, common config and common UX/UI.
2. Detailed description
2.1. config
idea |
fix |
format source |
proposal |
|
command line |
fix.TOOL:command ({rootpath}) |
format-source.TOOL ($HG_FILENAME) |
|
|
line range flag |
fix.TOOL:linerange ({first}:{last}) |
ø |
|
|
|
fix.TOOL:skipclean=BOOL |
ø |
|
|
pattern to format |
fix.TOOL:pattern |
in .hg-format-source |
|
|
tool priority |
fix.TOOL:priority |
ø |
|
|
metadata (strange) |
fix.TOOL:metadata=BOOL |
ø |
|
|
mode |
ø |
format-source.TOOL:mode={pipe/file} |
|
|
(input mode) |
ø |
format-source.TOOL:mode.input={pipe/file} |
|
|
(output mode) |
ø |
format-source.TOOL:mode.output={pipe/file} |
|
|
tool version |
ø |
format-source.TOOL:version-command |
|
|
version format |
ø |
format-source.TOOL:version-regex |
|
|
path of default config files |
ø |
format-source.TOOL:configpaths=[] |
|
2.2. user interface
3. Roadmap
various
step
That
need
to
be
performed
4. See Also
- pointer
- to
- related
- page