Any way to update project settings in batch?

82 views
Skip to first unread message

Ping Yin

unread,
Sep 5, 2011, 7:47:43 AM9/5/11
to repo-discuss
gerrit create-project can create project with specified settings.

However, how to update settings for multiple projects in batch? Such
as set 'Require Change-Id in commit message' and 'Fast Forward only'
merge strategy for all projects?

Ping Yin

unread,
Sep 5, 2011, 7:51:27 AM9/5/11
to repo-discuss
So a feature request: inherit such project settings from parent project.

Magnus Bäck

unread,
Sep 5, 2011, 8:17:16 AM9/5/11
to repo-discuss
On Monday, September 05, 2011 at 13:47 CEST,
Ping Yin <pkuf...@gmail.com> wrote:

For Gerrit 2.1, update the database with a suitable SQL update query.

For Gerrit 2.2, fetch the refs/meta/config branch of each repository,
update the configuration file (preferable with "git config") and push
it back.

It seems like these configuration values aren't set in project.config
by default, but an easy way to check what you need to do is of course
to make the configuration change for a single project and see what
Gerrit did for you. Then, repeat that action for the rest of the gits
(easily automated).

To set the two configuration values you're talking about I think the
following will work (once you have checked out refs/meta/config):

git config --file project.config receive.requireChangeId true
git config --file project.config submit.action FAST_FORWARD_ONLY

--
Magnus Bäck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson

Ping Yin

unread,
Sep 5, 2011, 9:27:45 PM9/5/11
to repo-discuss
On Mon, Sep 5, 2011 at 8:17 PM, Magnus Bäck
<magnu...@sonyericsson.com> wrote:
>
> To set the two configuration values you're talking about I think the
> following will work (once you have checked out refs/meta/config):
>
> git config --file project.config receive.requireChangeId true
> git config --file project.config submit.action FAST_FORWARD_ONLY
>

Thanks, it should be

git config --file project.config receive.requireChangeId true

git config --file project.config submit.action "fast forward only"

Reply all
Reply to author
Forward
0 new messages