如何监视特定文件中的Mercurial更改? [英] How can I monitor a specific file for changes in Mercurial?

查看:94
本文介绍了如何监视特定文件中的Mercurial更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经建立了一个容纳大型Java项目的远程Mercurial(Hg)存储库.我想监视对项目的pom文件所做的任何更改,并在对pom进行更改时接收电子邮件.

I have set up a remote Mercurial (Hg) repository that holds a large Java project. I would like to monitor any changes done to the project's pom file and receive e-mails when changes were made to the pom.

我想从通知中排除所有其他文件更改,因为我只想监视依赖关系中任何可能的更改(因此称为POM).是否有任何使用Jenkins的Mercurial扩展程序或解决方法来订阅Mercurial回购中单个文件的更改历史记录?

I would like to exclude all other file changes from notifications as I am only interested in monitoring any possible changes in dependencies (hence the POM). Is there any Mercurial Extension or workaround using Jenkins to subscribe to the change history for one individual file inside a Mercurial repo?

推荐答案

通知扩展名发送通过回购更改发送电子邮件.

The notify extension sends email on repo changes.

更改上下文(请参见第6节)为您提供了一种遍历文件的方法在变更集中.

The Change Context (look in section 6) gives you a way to iterate over the files in the changeset.

将这两个东西放到一个自定义钩子中应该很简单.浏览上下文,仅在提到您的特殊文件时发送电子邮件.

Putting these two things together in a custom hook should be fairly straightforward. Look through the context and only send email if your special file is mentioned.

这篇关于如何监视特定文件中的Mercurial更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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