Note:
This page is primarily intended for developers of Mercurial.
Templates consolidation
Status: Project
Main proponents: DavidDemelier
This is a speculative project and does not represent any firm decisions on future behavior.
In the progress of making more homogeneous style in Mercurial, this project proposes to unify the naming convention of templates.
1. Goal
Mercurial didn't enforce a coding style on many areas: hgrc (see ConfigConsolidationPlan), environment variables, templates, and so on.
2. Detailed description
Not having a correct convention leads into different styles. See the following templates:
- activebookmark
- changessincelatesttag
- file_copies_switch
- latesttagdistance
As proposed in the ConfigConsolidationPlan, I propose a mechanism where all hyphens and underscore get silently discarded. Thus, we can fix a correct naming style without breaking any user code.
I propose to use underscores everywhere because changessincelatesttag is not readable. No, it really isn't.
3. Roadmap
Naming style
Implement a function to discard hyphens and underscores
Update the templates documentation to use underscores