Size: 2987
Comment: cosmetic
|
Size: 2981
Comment: Group changesets now begin with "Group: " instead of with "Added group: "
|
Deletions are marked like this. | Additions are marked like this. |
Line 80: | Line 80: |
Group Added: FIRST LINE OF GROUP DESCRIPTION | Group: FIRST LINE OF GROUP DESCRIPTION |
Group Extension
This extension is not distributed with Mercurial.
Author: Arne Babenhauserheide
Download site: http://freehg.org/u/ArneBab/hgext_group/
Overview
Add a comment as summary to a group of changesets, so they get shown together in the log as one contribution.
This way we can do nice looking contributions with comprehensive and concise description without having to destroy history.
And for the smaller scale, developers can use it to say "These are some of my commits. All together they fix bug 12345" and do the same for other related commits.
Others who do a hg log then only see the message for the whole group as if it was one single commit (with some info, that it is a group) and can inspect the contents of the group seperately, if they want to.
Configuration
Enable the extension by adding following lines to your configuration file (hgrc):
[extensions] group=/path/to/group.py
To activate the grouped log by default, add the following lines to your configuration file (hgrc):
[groups] grouped_log = True
If you don't set this config, you can see the grouped log using
hg log --grouped
Usage
The extension adds some options to the log command. Also it supplies a command for creating groups (hg group), one for listing all groups (hg groups) and one for inspecting groups (hg groupinspect).
The additional options to the log command are:
hg log ...
where the additional options are:
--grouped |
activate grouped output |
--ungrouped |
deactivate grouped output |
The group command to create a new group is evoked as follows:
hg group [-m <text>] REV REV REV ...
where the options are:
-m or --message |
Use <text> as the commit message |
If it doesn't get the message option, it opens a prompt for the group summary. REV can be either a revision number, a short hex or the full hex changeset identifier.
To see the changesets inside a group, you can use the groupinspect command:
hg groupinspect [options] [REV REV REV...]
The options are the same as for the standard log command. REV can be either a revision number, a short hex or the full hex changeset identifier. If no revision is passed, groupinspect shows all groups and their respective changesets.
Background
.hggroups looks like this:
"description_line" rev1_hex rev2_hex ... "description_line" rev1_hex rev2_hex ... "description_line" rev1_hex rev2_hex ...
Definition for the commit message:
Group: FIRST LINE OF GROUP DESCRIPTION REST OF DESCRIPTION, arbitrary length and style.
Date and user are already in the ctx.
Sorted by the group number.
Initiating email to the Mercurial mailinglist:
http://selenic.com/pipermail/mercurial/2008-June/019832.html