Request for review: Group extension: Adding comments to groups of changes
Arne Babenhauserheide
arne_bab at web.de
Wed Sep 24 13:35:45 UTC 2008
Hi,
Some time ago I created a group extension and showed it in the general
Mercurial list.
- First Idea: http://selenic.com/pipermail/mercurial/2008-June/019832.html
- Implementation: http://selenic.com/pipermail/mercurial/2008-
August/020569.html
- code: http://freehg.org/u/ArneBab/hgext_group
It allows you to create virtual groups of changesets without altering history
and hiding the grouped changesets.
Implementation
------------------------
It uses a .hggroups file which contains one group per line. A group line has a
text string as description and an arbitrary number of changesets (identified
by hex).
Each group line is linked to a changes via the annotate command - the
changeset which last changed the group line is identified with the group.
The extension overwrites the log to hide each changeset which is in a group
from the output, if grouped log is enabled.
It adds two new commands:
hg group -m "text" REV REV REV
which creates a new group with the given description and the given REVs.
hg groupinspect GROUP_REV
which shows a log of all changesets inside the group.
Review required
--------------------------
There is one design aspect I am unsure about, though:
Should a group have the highest revision changeset as parent, or should it
have the current tip as parent?
The previous seems cleaner to me, but the latter is far easier to implement
(doesn't require as much merging).
I implemented the "highest grouped revision" approach, but I'm not perfectly
happy since it requires merging every time I create a group whose most recent
changeset is older than one of an earlier group.
Which approach do you favor?
And how should I best go forward?
And what do you think about the extension in general?
Best wishes,
Arne
--
-- My stuff: http://draketo.de - stories, songs, poems, programs and stuff :)
-- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the
history of free software.
-- Ein Würfel System: http://1w6.org - einfach saubere (Rollenspiel-) Regeln.
-- PGP/GnuPG: http://draketo.de/inhalt/ich/pubkey.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20080924/980d51eb/attachment.asc>
More information about the Mercurial-devel
mailing list