Closed Bug 929685 Opened 11 years ago Closed 10 years ago

Move Bugzilla source repository from Bazaar (bzr) to git


(Bugzilla :: Bugzilla-General, enhancement, P3)






(Reporter: justdave, Unassigned)



(Keywords: bmo-big)

Last time we did this: bug 470570


(although Google Group's threading order sucks)
Severity: normal → enhancement
OS: Mac OS X → All
Hardware: x86 → All
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:!topic/
Plan, including rationale, is at

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.
Depends on: 965547
Depends on: 965549
Depends on: 965551
Keywords: bmo-big
Priority: -- → P3
Blocks: 965551
No longer depends on: 965551
Blocks: bzr-decom
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 for the migration scripts:
Depends on: 968636
Depends on: 973298
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.
Flags: needinfo?(klibby)
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.
Flags: needinfo?(klibby)
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).
Flags: needinfo?(klibby)
It's working, after not too much yak shaving.

bzr2.dmz.scl3# git log -1
commit 415dddf4d1c783e366dbc7b1954ccd1e2074748a
Author: Mark Côté <>
Date:   Tue Feb 18 12:36:23 2014 -0500

    Fixed git repo in mirroring script.
Flags: needinfo?(klibby)
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 --from-repo= --from-branch=migration_test --to-repo=/path/to/bzr/bugzilla --to-branch=migration_test
bzr2.dmz.scl3# perl -v --from-repo= --from-branch=migration_test --to-repo=/var/www/html/ --to-branch=migration_test
bzr checkout -q /var/www/html/ /tmp/ZA9uGgDONA
git ls-remote 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.
Flags: needinfo?(klibby)
Looks like it did the right thing. Re-enabled cron job.
Flags: needinfo?(klibby)
Depends on: 973297
No longer depends on: 968636
No longer depends on: 973298
Success!  Migration completed around 16:30 EDT on 2014-03-11.  Mirror script working.  First change:;a=commit;h=d51abfd7e3e1fcc3eea37e72ab0f49f3e28950a2 [github]

mirrored to
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.