Differences between revisions 1 and 2
Revision 1 as of 2017-06-28 08:05:00
Size: 752
Comment:
Revision 2 as of 2017-06-28 08:12:16
Size: 1328
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
= Feature Title = = Templates consolidation =
Line 9: Line 9:
'''Main proponents: YourNameHere''' '''Main proponents: DavidDemelier'''
Line 13: Line 13:
Add a short summary of the idea here. In the progress of making more homogeneous style in Mercurial, this project proposes to unify the naming convention of templates.
Line 17: Line 17:
Explain what kind of problem are triggering this idea, why it is worth solving and the big picture of how you'll solve it.
Mercurial didn't enforce a coding style on many areas: hgrc (see ConfigConsolidationPlan), environment variables, templates, and so on.
Line 22: Line 21:
All kind of stuff can go here, solution description / alternative solution etc 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.
Line 26: Line 34:
 * (./) various
 * (./) step
 * {X} That
 * {X} need
 * {X} to
 * {X} be
 * {X} performed
 * (./) Naming style
 * (X) Implement a function to discard hyphens and underscores
 * {X} Update the templates documentation to use underscores
Line 36: Line 40:
 * pointer
 * to
 * related
 * page
  * ConfigConsolidationPlan

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)