hg equivalent of git notes

痞子三分冷 提交于 2019-12-20 10:44:52

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/2305873/hg-equivalent-of-git-notes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!