hg相当于git笔记 [英] hg equivalent of git notes

查看:130
本文介绍了hg相当于git笔记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不是我知道的:我不知道认为Hg还有一种特殊的对象来联合提交信息。



引入 2007年7月 git notes by Johannes Schindelin,笔记有:

< blockquote>

提交记录是与提交消息一起显示的blob。

这些blob取自注释ref,您可以通过配置变量 core.notesRef ,这又可以被环境变量 GIT_NOTES_REF 覆盖。



注释ref是一个分支,其中包含的树很像 .git / objects / 中的松散对象树。换句话说,要获取给定SHA-1的提交注释,请将前两个十六进制字符作为目录名称,其余38个十六进制字符作为基本名称,并在注释引用中查找。



将这些信息放入ref的基本原理是这样的:

我们希望能够获取并可能合并笔记,甚至可以看看日期是什么时候引入了一个笔记,我们希望将它们与其他对象一起高效地存储。


git notes 目前仍在不断发展中 2010年2月)


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

解决方案

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

这篇关于hg相当于git笔记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆