Adding comments to groups of changes?

Arne Babenhauserheide arne_bab at web.de
Fri Jun 27 19:37:38 CDT 2008


After discussing with piranha and others in #mercurial @ irc.freenode.net, I 
changed and implemented the concept. 

It is far from clean, and my sourcefiles have gathered quite a lot of working 
comments, but it works. 

added/changed commands: 

$ hg group rev1 rev2 rev3

Gather the given revisions (as hex, number, and what else repo.changectx() 
takes ) into a group. 

$ hg groups
show all groups in reversed chronological order. 

$ hg log
hide all revisions which are in groups. Groups can be grouped, too. 


A group is just another commit associated with an entry in the .hggroups file 
(by repo.annotate()). 

.hggroups contains a short description of each group (for convenience, and for 
being able to rewrite group descriptions without changing the tracked 
revisions) and the tracked revisions. 
An example: 
"The 1st group" 333aaf680223486d5aa10a5ee5feb284151d8961 
356e81704e4fdf9368ff07598c9c8fe28cab7e20

(all on one line)

To remove groups, you can just remove the lines from the .hggroups file and 
commit (there isn't yet a remove command). The group data in the commits will 
still exist, but since the group entries will be missing, they won't be 
associated with groups. 


"user" and "date" are taken directly from the associated commits. 

I attached a somewhat cleaned version of the files for review. 

My working repository with all private comment strings and worse artefacts is 
avaible at 
http://freehg.org/u/ArneBab/hgext_group/


Please comment! 

Best wishes, 
Arne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: group.tar.gz
Type: application/x-tgz
Size: 5538 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20080628/c3bed6f7/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://selenic.com/pipermail/mercurial/attachments/20080628/c3bed6f7/attachment.pgp 


More information about the Mercurial mailing list