Mercurial configuration methods
We'll need the equivalent of the following HgGitRepository
methods in the Rails app:
-
set_hgrc
->SetRepositoryManagedHgrc
orHgSetManagedConfig
-
get_hgrc
->GetRepositoryManagedHgrc
orHgGetManagedConfig
-
hg_config_item_bool
->HgGetConfigItemBool
-
create_hg_repository
except the actualhg init
part, which is taken care of by #58 (closed) ->HgInitRepositoryConfig
orHgInitConfig
This is obviously a divergence from the Gitaly protocol, so that we'd better speak of the HGitaly protocol from this point. We can either make these new methods in RepositoryService
or make a new service. In the former case, maybe it's obvious that it is for a given repository, so we may not need to include that in the method names.
The bulk of implementation should be done in py-heptapod, and exposed both as a CLI command (for the Rails app) and in HGitaly, hence avoiding a code duplication that would certainly be harmful.
Opinions welcome, especially about the naming matters.