Mercurial 可以记录传入的变更集吗?
我一直在尝试连接 Mercurial,以便记录拉入本地工作存储库的变更集组。换句话说,我希望能够查看拉入本地存储库的更改历史记录。就目前而言,我正在使用“prechangegroup”挂钩依次调用 hgcoming
,然后将其写入日志文件,稍后可以对其进行解析。
我很好奇我是否在这里重新发明轮子。是否有任何扩展允许我直接通过 Mercurial 查询此信息,而不必写入单独的日志文件?如果能够使用某种 hg pullhistory --template...
命令来获取此信息并对其进行格式化,而不是希望用户正确配置其系统,以便日志目录可写等。
I've been trying to hook into Mercurial in order to log groups of changesets that are pulled into the local working repository. In other words, I want to be able to view a history of changes that were pulled into the local repository. As it stands right now, I'm using the "prechangegroup" hook to, in turn, call hg incoming
which then writes to a logfile which can later be parsed.
I'm curious if I'm reinventing the wheel here though. Are there any extensions out there that allow to me to query for this information directly through Mercurial instead of having to write to a separate log file? It would be nice to be able to use some kind of hg pullhistory --template...
command to be able to get this information and format it instead of hoping that the user configures their system correctly so that the log directory is writable, etc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Mozilla 使用类似的东西。他们称之为“pushlog”: http://hg.mozilla.org/mozilla-central/pushloghtml
他们有一个钩子,可以将记录从变更组钩子推送到数据库(IIRC)。他们的源代码是可用的,所以你正在重新发明轮子,但它是一个如此小的、专门的轮子,这可能没问题。
Mozilla uses something like this. They call it the "pushlog": http://hg.mozilla.org/mozilla-central/pushloghtml
They have a hook that pushes records into a database (IIRC) from a changegroup hook. The source for their's is available, so you're re-inventing the wheel, but it's such a small, specialized wheel, that's probably okay.