Assuming you want to do this programatically rather than via the web UI,
you can update the submit.mergeContent key in project.config in
All-Projects.git (or whatever project you want to apply the setting in).
git clone <url of All-Projects.git>
cd All-Projects
git config --file project.config submit.contentMerge true
git commit -a -m 'Enabled content merges'
git push origin HEAD:refs/meta/config
For projects that aren't permission-only you probably don't want
to clone the git itself, because even if you do you won't get the
refs/meta/config ref. Then it would go something like this:
cd `mktemp -dt`
git init
git fetch <url of All-Projects.git> refs/meta/config
git checkout FETCH_HEAD
git config --file project.config submit.contentMerge true
git commit -a -m 'Enabled content merges'
git push origin HEAD:refs/meta/config
It struck me that the project.config file format is undocumented. Has
anyone started any work on this?
--
Magnus Bäck
ba...@google.com
> -----Original Message-----
> From: repo-d...@googlegroups.com [mailto:repo-
> dis...@googlegroups.com] On Behalf Of Magnus Bäck
> Sent: tisdag den 10 april 2012 16:52
> To: Repo and Gerrit Discussion
> Subject: Re: How to set use-content-merge in all projects
>
<snip>
>
> It struck me that the project.config file format is undocumented. Has
> anyone started any work on this?
>
Hi Magnus. :)
I have begun work on this. However, the work is so far not uploaded for public review, as I'm playing around with the structure of it, and haven't made that much progress on actual content either. (I was on to a good start there for a while, but accidentally wasted about two hours of work by a tiny misspelled command.. and I'm the one teaching others not to waste their work by using git! The irony stares me in the face..)
Anyway, please expect a new manual page covering the files of refs/meta/config and their format and possible parameters in the near future (the coming weeks?).
--
Best regards,
Fredrik Luthander
Sony Mobile Communications AB
[...]
> Anyway, please expect a new manual page covering the files of
> refs/meta/config and their format and possible parameters in
> the near future (the coming weeks?).
Great! Please add me as a reviewer when you've uploaded it.
While it might not end up in the same document, there's both
a need of a reference section and a couple of recipes of how
to actually modify the files therein. As evidenced by my previous
message there are a few snags that people should get help avoiding,
and I didn't even go into how groups need to be added to the
the group file to be eligible to addition in project.config.
Also, right now you can't obtain the group's UUID except via
the web UI (but I'm working on changing that).
--
Magnus Bäck
ba...@google.com
This setting isn't inherited, so you need to set it in every repository.
[...]
> cd `mktemp -dt`
> git init
> git fetch <url of All-Projects.git> refs/meta/config
> git checkout FETCH_HEAD
> git config --file project.config submit.contentMerge true
> git commit -a -m 'Enabled content merges'
> git push origin HEAD:refs/meta/config
Git won't set up an origin remote in this case, so you either need to
run "git remote add" or you need to specify the full push URL in the
final command.
[...]
--
Magnus Bäck
ba...@google.com
Hi--Should the project.config variable be mergeContent (not contentMerge)?
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en