Project information is not stored in the gerrit database. The information is stored directly in the git repository in a branch named 'meta/config', in two files 'project.config' and 'groups'. The values from these files are cached in the'project-list' and 'projects' caches.
Steps to make a change:
- set read and push permissions on refs/meta/config
- check out the branch,
- change the files,
- push the repo back,
- clear the cache.
Check out the branch:
% git fetch origin refs/meta/config:refs/remotes/origin/meta/config
% git checkout meta/config
Push back the changes:
#directly:
% git push origin meta/config:meta/config
#via review:
% git push origin meta/config:refs/for/refs/meta/config
Flush the caches:
% ssh gerrit gerrit flush-caches --cache project_list
% ssh gerrit gerrit flush-caches --cache projects
project.config
[access "refs/*"]
owner = group MYgroup
[receive]
requireChangeId = true
[submit]
mergeContent = true
action = merge always
groups
# UUID Group Name
# eca2c52d733e5740a01747e71f018dcfdeadbeef MYgroup
I found the meta/config mentioned in some posts (post post) in the repo-discuss newsgroup.
5 comments:
I just wanted to thank you for this. I've been working on a related problem (updating low-level configurations in general) and this showed me how to accomplish that! :-)
The push for review command doesn't work. Should be "git push origin meta/config:refs/for/refs/meta/config" instead of "git push origin meta/config:refs/for/meta/config"
Krinkle, thanks for the comment and correction!
I've edited to correctly use "refs/for/refs/meta/config"
It didn't understand what needs to be cloned.
Setting the global configurations the repo All-Projects should be cloned
git clone ssh://user@localhost:29418/All-Projects
*change user@localhost to match your configuration
This post is about changing the settings for a single project. So we clone that project and then fetch the meta/config branch. Meta/config is not normally listed in the branches, but we can fetch it by name.
Does this help with your question?
Post a Comment