I have a hg hook that checks files that are in commit (pretxncommit type of hook) for coding standards. However if I make a merge all files are excluded from checking. If I make a merge and edit then some of the merged files they are processed by the hook.

Moreover "hg st" shows all the modified files including merged one.

Is there any way to force hg hook to check all the files?

Thanks.

有帮助吗?

解决方案

Assuming the hook is written in Python, you define it as something like

def check_files(ui, repo, **kwargs):
...

Then repo.status() returns all files with their respective status. There is TODO to add more details in this place in the documentation :)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top