在 Mercurial 中,我如何查看过去 24 小时内推送到存储库的修订?
我有一个 Mercurial 存储库,几个人从他们自己的本地存储库推送到该存储库。我希望能够查询此中央存储库以获取过去 24 小时内到达该存储库的所有更改,特别是不仅仅是已提交的更改过去 24 小时内。
hg log --date 选项不能满足我的需要。它仅根据提交日期细化选择。因此,hg log --date -1 获取自昨天以来提交的修订,但不是三天前提交的修订,而是今天才推送到此存储库。
如果我能找到不到 24 小时前到达存储库的最旧版本的版本号(或 ID),那就可以了;但我看不到任何东西 - 即使在 hg help revsets 中 - 看起来它会起作用。
I have a Mercurial repository that several people push to from their own, local repositories. I'd like to be able to query this central repository for all changes that arrived at that repository in the last 24 hours, notably not just changes that were committed in the last 24 hours.
The hg log --date option doesn't do what I need. It only refines the selection based on the date of commit. So, hg log --date -1 gets me revisions committed since yesterday, but not revisions committed, say, three days ago, but only pushed to this repo today.
If I can find the revision number (or id) of the oldest revision arriving at the repo less than 24 hours ago, that would do the trick; but I can't see anything — even in hg help revsets — that looks like it'll work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 pushlog,它是您在服务器端配置的 Mercurial 扩展。
基本上,您安装必需的文件,并配置服务器存储库挂钩以在每次推送时调用推送日志,然后每当有人推送到该存储库时脚本就会记录。
不幸的是,除了该页面上的内容之外,我对它的了解并不多,我在 Mercurial 的 IRC 频道上询问并在那里得到了这个名字。
您可以在此处查看日志示例:calc Pushlog。
此外,您还可以使用包含此类日志的 Web 系统。这是我的 Kiln 日志在今天的更改后的样子。
You can use pushlog, an extension to Mercurial that you configure server-side.
Basically you install the requisite files, and configure your server repository hooks to call into pushlog on each push, and then the script will log whenever someone pushes to that repository.
Unfortunately I don't know more about it than what's on that page, I asked on the IRC channel of Mercurial and got that name there.
You can see an example of the log here: calc pushlog.
Additionally, there are web systems you can use that contains such logs. Here's what my Kiln log looks like after todays changes.
我不知道有什么内置方法可以做到这一点,但您可以以迂回的方式获取该信息。每天编写一个脚本来克隆您的主存储库,并相应地命名;例如
project1-2011-4-31
、project1-2011-5-1\
。然后,查看从一个到另一个的传入内容是一件简单的事情:将为您提供克隆
project1-2011-3-25
和project1-2011-5- 之间推送的所有更改1
被克隆。I don't know of a built in method to do this, but you could get that information in a roundabout way. Write a script to clone your main repo each day, and name it accordingly; say
project1-2011-4-31
,project1-2011-5-1\
. Then it's a simple matter of seeing what is incoming from one to the other:Would give you all changes pushed between when
project1-2011-3-25
was cloned andproject1-2011-5-1
was cloned.