Last time we did this: bug 470570
(although Google Group's threading order sucks)
We should still mirror to bzr for existing 4.x installations. It's a pain to move to another VCS just to do an update on the same branch.
There was a new thread started on the mailing list with an update at:
Plan, including rationale, is at https://wiki.mozilla.org/Bugzilla:Migrating_to_git
For the record, no serious reservations have been raised in the list, though there is some debate about how long the (read-only, mirrored-from-git) bzr repos should stay around. That can be addressed at a later date.
When we do this, we should document how we did it. There are people (and I am one) who are maintaining Bugzilla installations with customizations for other people. They may want to move their repos to git too.
Pretty much the entire procedure is documented in the README.md for the migration scripts: https://github.com/markrcote/bugzilla-git-migration/blob/master/README.md
I was just discussing the git->bzr mirror script and I guess there's been some concern about an ldap account for commit rights that would be doing the commits to bzr. A better idea might be to just run the mirror script ON the bzr server, and let it commit locally, then it won't need an ldap account or ssh keys or anything.
Can this be done? I was just about to file a bug for a new account, but this sounds way better, if possible.
Seems reasonable. The git-to-bzr script will need to commit locally instead of using bzr.m.o. I'll also have to get git installed on bzr2; the rpm conflicts with our openssh-lpk-clients package.
Sure, simple to update the script. I originally tested it locally, in fact. Let me know when you get git set up (or if you aren't able to, in which case we'll go back to creating a new account).
It's working, after not too much yak shaving.
bzr2.dmz.scl3# git log -1
Author: Mark Côté <email@example.com>
Date: Tue Feb 18 12:36:23 2014 -0500
Fixed git repo in mirroring script.
Okay script updated. You now need to provide source and destination repo paths/URLs as well as source and destination branches. I'm not sure of the paths on bzr.m.o, but something like
perl git-to-bzr.pl --from-repo=https://git.mozilla.org/bugzilla/bugzilla.git --from-branch=migration_test --to-repo=/path/to/bzr/bugzilla --to-branch=migration_test
bzr2.dmz.scl3# perl git-to-bzr.pl -v --from-repo=https://git.mozilla.org/bugzilla/bugzilla.git --from-branch=migration_test --to-repo=/var/www/html/bzr.mozilla.org/bugzilla/ --to-branch=migration_test
bzr checkout -q /var/www/html/bzr.mozilla.org/bugzilla/migration_test /tmp/ZA9uGgDONA
git ls-remote https://git.mozilla.org/bugzilla/bugzilla.git migration_test
Everything is up to date!
Awesome! I think we should do a few manual tests this morning and then set it up in a cron job.
As discussed, I just pushed an update to the mirroring script that just uses a simple "bzr cat" to view the current .gitrev instead of doing a whole checkout; the checkout is now done only if the ID in .gitrev doesn't match the ID of the latest git commit. The result is a very fast operation if there are no changes, which will be the case the vast majority of the time.
I pushed a couple more little commits to the git migration_test branch. fubar, please update the script, give it a run, and if the commits show up on bzr, feel free to enable the cron job again.
Looks like it did the right thing. Re-enabled cron job.
Success! Migration completed around 16:30 EDT on 2014-03-11. Mirror script working. First change: