I would like to mark an arbitrary group of commits/changesets with a label.
- Commit 1 *Mark 1
- Commit 2 *Mark 2
- Commit 3
- Commit 4 *Mark 1
- Commit 5 *Mark 2
The goal is to easily locate all the changes for a specific mark, and to have that grouping persisted in the VCS directly, as opposed to some outside system like a bug tracking system.
The location and ordering of the marks needs to be arbitrary, and should be able to work with both committed/uncommitted and pushed/unpushed changes.
In SVN the best way I know is to just edit the commit notes and add some sort of special text that you can search for e.g. “**Mark 1”. Or just to make a fake edit and commit it and use its commit note to list all the included revisions.
Is there a better solution for SVN? Are there equivalent or better solutions for Hg or Git?
There is no special metadata with Git, beside the commit comment and date, or the tag.
So you are left with three choices:
Those two choices won’t work well with commits already pushed.
The third choice is associate data to those commits, like a ticket. See ticgit for example of ticket bug tracking integrated to your git repo.