Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hg equivalent of git notes

Tags:

git

mercurial

Is there a command in mercurial, that works like git notes?

like image 523
gruszczy Avatar asked Feb 21 '10 12:02

gruszczy


People also ask

Why use Mercurial instead of Git?

Mercurial Is Safer For Less Experienced Users By default, Mercurial doesn't allow you to change history. However, Git allows all involved developers to change the version history. Obviously, this can have disastrous consequences. With basic Mercurial, you can only change your last commit with “hg commit – amend”.


1 Answers

Not that I know of: I do not think Hg has yet a special kind of object to associate to commit message.

Introduced in July 2007, "git notes" by Johannes Schindelin, notes are:

Commit notes are blobs which are shown together with the commit message.
These blobs are taken from the notes ref, which you can configure by the config variable core.notesRef, which in turn can be overridden by the environment variable GIT_NOTES_REF.

The notes ref is a branch which contains trees much like the loose object trees in .git/objects/. In other words, to get at the commit notes for a given SHA-1, take the first two hex characters as directory name, and the remaining 38 hex characters as base name, and look that up in the notes ref.

The rationale for putting this information into a ref is this:
we want to be able to fetch and possibly union-merge the notes, maybe even look at the date when a note was introduced, and we want to store them efficiently together with the other objects.

"git notes" is still evolving right now (February 2010).

like image 55
VonC Avatar answered Oct 05 '22 22:10

VonC