Size: 1380
Comment:
|
← Revision 15 as of 2013-01-24 04:46:17 ⇥
Size: 1699
Comment: add section numbering
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
== Writing good changeset comments == | #pragma section-numbers 2 = Writing Good Changeset Comments = <<TableOfContents>> |
Line 3: | Line 5: |
Many ["Mercurial"] tools use the first line of a ChangeSet comment as a short-form description of the ChangeSet. | Many Mercurial tools use the first line of a [[ChangeSet|changeset]] comment as a short-form description of the changeset. |
Line 7: | Line 9: |
* * stand alone, * * be less than 65 characters long, and * * give a quick idea of the content of the ChangeSet. |
* stand alone, * be less than 65 characters long, and * give a quick idea of the content of the changeset. |
Line 11: | Line 13: |
Here is an example of a good ChangeSet comment: | == Good Example == Here is an example of a good changeset comment: |
Line 15: | Line 18: |
Line 16: | Line 20: |
Line 21: | Line 26: |
* * The first line succinctly describes the change. * * The entire comment is short and informative. * * It mentions known shortcomings. |
* The first line succinctly describes the change. * The entire comment is short and informative. * It mentions known shortcomings. |
Line 25: | Line 30: |
== Bad Example == | |
Line 37: | Line 43: |
* * First line doesn't stand alone * * No paragraph breaks -> poor readability * * Loads of uninformative detail |
* First line doesn't stand alone * No paragraph breaks → poor readability * Loads of uninformative detail == See also == * For comments on contributed patches to Mercurial, see [[ContributingChanges#Patch_descriptions|Patch descriptions]] ---- CategoryHowTo [[ThaiChangeSetComments|ภาษาไทย]], [[JapaneseChangeSetComments|日本語]] |
Writing Good Changeset Comments
Contents
Many Mercurial tools use the first line of a changeset comment as a short-form description of the changeset.
You should thus treat the first line like the subject line of an email message. It should:
- stand alone,
- be less than 65 characters long, and
- give a quick idea of the content of the changeset.
1. Good Example
Here is an example of a good changeset comment:
First stab at the veeblefrotzer subsystem Implemented using the McWhirly/O'Blivet technique. Displays correctly on the twelfth of every month, but doesn't yet work during the other 27-30 days.
This has a few things going for it:
- The first line succinctly describes the change.
- The entire comment is short and informative.
- It mentions known shortcomings.
2. Bad Example
Here's a bad example:
Implemented the veeblefrotzer subsystem, which uses the McWhirly/O'Blivet scheme for envolvolution of the subducted whingnangle. See McWhirly, O'Blivet, "Acta Exsanguinata", vol. III, chap. 19 for a concise description of the technique, unless you can't find the chapter because someone has razored it out and papered it to the walls of their cube.
What's so bad about it?
- First line doesn't stand alone
No paragraph breaks → poor readability
- Loads of uninformative detail
3. See also
For comments on contributed patches to Mercurial, see Patch descriptions