Mercurial 可以记录传入的变更集吗?

发布于 2024-12-11 05:52:55 字数 314 浏览 1 评论 0原文

我一直在尝试连接 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

执手闯天涯 2024-12-18 05:52:55

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文