Closed
Bug 929685
Opened 11 years ago
Closed 11 years ago
Move Bugzilla source repository from Bazaar (bzr) to git
Categories
(Bugzilla :: Bugzilla-General, enhancement, P3)
Bugzilla
Bugzilla-General
Tracking
()
RESOLVED
FIXED
People
(Reporter: justdave, Unassigned)
References
Details
(Keywords: bmo-big)
Last time we did this: bug 470570
Discussion https://groups.google.com/forum/#!topic/mozilla.dev.apps.bugzilla/VkMOOQx3oYs
(although Google Group's threading order sucks)
Updated•11 years ago
|
Severity: normal → enhancement
OS: Mac OS X → All
Hardware: x86 → All
Comment 1•11 years ago
|
||
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.
Reporter | ||
Comment 2•11 years ago
|
||
There was a new thread started on the mailing list with an update at:
https://groups.google.com/forum/#!topic/mozilla.dev.apps.bugzilla/wbVdPQmAL2c
Assignee | ||
Comment 3•11 years ago
|
||
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.
Assignee | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Updated•11 years ago
|
Comment 4•11 years ago
|
||
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.
Gerv
Assignee | ||
Comment 5•11 years ago
|
||
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
Reporter | ||
Comment 6•11 years ago
|
||
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.
Assignee | ||
Comment 7•11 years ago
|
||
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)
Comment 8•11 years ago
|
||
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)
Assignee | ||
Comment 9•11 years ago
|
||
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)
Comment 10•11 years ago
|
||
It's working, after not too much yak shaving.
bzr2.dmz.scl3# git log -1
commit 415dddf4d1c783e366dbc7b1954ccd1e2074748a
Author: Mark Côté <mcote@alumni.uwaterloo.ca>
Date: Tue Feb 18 12:36:23 2014 -0500
Fixed git repo in mirroring script.
Flags: needinfo?(klibby)
Assignee | ||
Comment 11•11 years ago
|
||
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
Comment 12•11 years ago
|
||
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!
Assignee | ||
Comment 13•11 years ago
|
||
Awesome! I think we should do a few manual tests this morning and then set it up in a cron job.
Assignee | ||
Comment 14•11 years ago
|
||
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)
Comment 15•11 years ago
|
||
Looks like it did the right thing. Re-enabled cron job.
Flags: needinfo?(klibby)
Assignee | ||
Comment 16•11 years ago
|
||
Success! Migration completed around 16:30 EDT on 2014-03-11. Mirror script working. First change:
http://git.mozilla.org/?p=bugzilla/bugzilla.git;a=commit;h=d51abfd7e3e1fcc3eea37e72ab0f49f3e28950a2 [github]
mirrored to
http://bzr.mozilla.org/bugzilla/trunk/revision/8957
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•