简体   繁体   中英

hg equivalent of git notes

在Mercurial中是否有一个命令像git note一样起作用?

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) .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM