Last Comment Bug 929685 - Move Bugzilla source repository from Bazaar (bzr) to git
: Move Bugzilla source repository from Bazaar (bzr) to git
: bmo-big
Product: Bugzilla
Classification: Server Software
Component: Bugzilla-General (show other bugs)
: unspecified
: All All
P3 enhancement (vote)
: ---
Assigned To: Mark Côté [:mcote]
: default-qa
Depends on: 965547 965549 973297
Blocks: 965551 bzr-decom
  Show dependency treegraph
Reported: 2013-10-22 13:35 PDT by Dave Miller [:justdave] (
Modified: 2014-03-11 13:58 PDT (History)
5 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Description User image Dave Miller [:justdave] ( 2013-10-22 13:35:28 PDT
Last time we did this: bug 470570


(although Google Group's threading order sucks)
Comment 1 User image Frédéric Buclin 2013-11-26 02:49:05 PST
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.
Comment 2 User image Dave Miller [:justdave] ( 2013-12-16 04:55:30 PST
There was a new thread started on the mailing list with an update at:!topic/
Comment 3 User image Mark Côté [:mcote] 2014-01-29 14:11:49 PST
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.
Comment 4 User image Gervase Markham [:gerv] 2014-02-05 01:33:08 PST
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.

Comment 5 User image Mark Côté [:mcote] 2014-02-05 07:20:01 PST
Pretty much the entire procedure is documented in the for the migration scripts:
Comment 6 User image Dave Miller [:justdave] ( 2014-02-19 09:41:14 PST
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.
Comment 7 User image Mark Côté [:mcote] 2014-02-19 19:00:19 PST
Can this be done?  I was just about to file a bug for a new account, but this sounds way better, if possible.
Comment 8 User image Kendall Libby [:fubar] 2014-02-25 02:19:14 PST
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.
Comment 9 User image Mark Côté [:mcote] 2014-02-25 08:25:03 PST
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).
Comment 10 User image Kendall Libby [:fubar] 2014-02-25 08:48:53 PST
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.
Comment 11 User image Mark Côté [:mcote] 2014-02-25 10:24:25 PST
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
Comment 12 User image Kendall Libby [:fubar] 2014-02-26 02:02:30 PST
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!
Comment 13 User image Mark Côté [:mcote] 2014-02-26 05:23:48 PST
Awesome! I think we should do a few manual tests this morning and then set it up in a cron job.
Comment 14 User image Mark Côté [:mcote] 2014-02-26 11:54:12 PST
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.
Comment 15 User image Kendall Libby [:fubar] 2014-02-27 02:20:05 PST
Looks like it did the right thing. Re-enabled cron job.
Comment 16 User image Mark Côté [:mcote] 2014-03-11 13:58:06 PDT
Success!  Migration completed around 16:30 EDT on 2014-03-11.  Mirror script working.  First change:;a=commit;h=d51abfd7e3e1fcc3eea37e72ab0f49f3e28950a2 [github]

mirrored to

Note You need to log in before you can comment on or make changes to this bug.