在 Mercurial 中,我如何查看过去 24 小时内推送到存储库的修订?

发布于 2024-11-04 09:32:39 字数 388 浏览 3 评论 0原文

我有一个 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 技术交流群。

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

发布评论

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

评论(2

好久不见√ 2024-11-11 09:32:39

您可以使用 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.

Kiln activity log

苦笑流年记忆 2024-11-11 09:32:39

我不知道有什么内置方法可以做到这一点,但您可以以迂回的方式获取该信息。每天编写一个脚本来克隆您的主存储库,并相应地命名;例如 project1-2011-4-31project1-2011-5-1\。然后,查看从一个到另一个的传入内容是一件简单的事情:

cd %projectdirectory%\dateclones
cd project1-2011-3-25
hg incoming ..\project1-2011-5-1

将为您提供克隆 project1-2011-3-25project1-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:

cd %projectdirectory%\dateclones
cd project1-2011-3-25
hg incoming ..\project1-2011-5-1

Would give you all changes pushed between when project1-2011-3-25 was cloned and project1-2011-5-1 was cloned.

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