Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Repository Migration to Gerrit, git push --mirror returns refs/meta/config (cannot delete project configuration)

I got some strange problems when migrating my old git repository which resides in a redmine, to my new Gerrit repository.

Basically i made a

git clone --mirror ssh:// .... old-repo.git
cd old-repo.git/
git push --mirror ssh:// .... new-gerrit-repo

Well, now I first got some warnings:

remote: (W) a01300f: commit message lines >70 characters; manually wrap lines
remote: (W) 8def171: commit subject >65 characters; use shorter first paragraph

which I guess I can ignore, because the original repository will still exist as reference.

My main problem is this error:

! [remote rejected] refs/meta/config (cannot delete project configuration)
error: failed to push some refs to ssh:// .... new-gerrit-repo

After some reading I found out, that this refs/meta/config branch only contains some project specific rules for Gerrit. It's a has a few config files for parametrizing Gerrit. (it's basically the Project Options page under Gerrit "General" Tab) There are no project-related source files.

Can someone help me? Is it save to ignore this error and go on with the migration?

Access push;read;submit rights are given for Administrators on refs/meta/config. Nothing helped.

Thanks for every message!

like image 291
Fl0R1D3R Avatar asked Oct 03 '14 08:10

Fl0R1D3R


1 Answers

The refs/meta/config ref is indeed only for Gerrit-specific settings (including but not limited to access control settings) for the project. Depending on the source and target it may or may not make sense to migrate it, but you can't do it via --mirror since that's equivalent to deleting and recreating the ref and Gerrit explicitly prohibits deletion of refs/meta/config.

What you could do is mirror all other refs and manually copy the state of the refs/meta/config branch, if it's something in there that's worth keeping.

like image 141
Magnus Bäck Avatar answered Nov 07 '22 17:11

Magnus Bäck