1

I did not find anything from the Mercurial hook documentation explaining how to get properties of the repository's hgrc file from a custom python hook.

As the documentation states that we have access to the full Mercurial API from hooks, I suppose this should be possible. But how?

Moreover I could not find a precise documentation on what are the objects (ui, repos, ...) passed in argument to the Mercurial hook.

greydet
  • 5,509
  • 3
  • 31
  • 51

1 Answers1

0

Ok I find out the answer by myself.

This page gives some hints about the argument passed to the hook functions: https://www.mercurial-scm.org/wiki/MercurialApi#Reading_configuration_files

ui.config functions permit to read Mercurial configuration files, giving the section and property name.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
greydet
  • 5,509
  • 3
  • 31
  • 51