Differences between revisions 2 and 3
Revision 2 as of 2017-06-28 08:12:16
Size: 1328
Comment:
Revision 3 as of 2017-06-28 08:12:34
Size: 1328
Comment:
Deletions are marked like this. Additions are marked like this.
Line 35: Line 35:
 * (X) Implement a function to discard hyphens and underscores  * {X} Implement a function to discard hyphens and underscores

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

  • {X} Implement a function to discard hyphens and underscores

  • {X} Update the templates documentation to use underscores

4. See Also


CategoryDeveloper CategoryNewFeatures

TemplatesConsolidationPlan (last edited 2017-06-28 08:12:34 by DavidDemelier)