The default bug view has changed. See this FAQ.

Move Bugzilla source repository from Bazaar (bzr) to git

RESOLVED FIXED

Status

()

Bugzilla
Bugzilla-General
P3
enhancement
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: justdave, Assigned: mcote)

Tracking

({bmo-big})

Details

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

4 years ago
Severity: normal → enhancement
OS: Mac OS X → All
Hardware: x86 → All

Comment 1

3 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.
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

3 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

3 years ago
Status: NEW → ASSIGNED
(Assignee)

Updated

3 years ago
Depends on: 965547
(Assignee)

Updated

3 years ago
Depends on: 965549
(Assignee)

Updated

3 years ago
Depends on: 965551
(Assignee)

Updated

3 years ago
Keywords: bmo-big
Priority: -- → P3

Updated

3 years ago
Blocks: 965551
No longer depends on: 965551

Updated

3 years ago
Blocks: 967642
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

3 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
Depends on: 968636
(Assignee)

Updated

3 years ago
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.
(Assignee)

Comment 7

3 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)
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

3 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)
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

3 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
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

3 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

3 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)
Looks like it did the right thing. Re-enabled cron job.
Flags: needinfo?(klibby)
(Assignee)

Updated

3 years ago
Depends on: 973297
(Assignee)

Updated

3 years ago
No longer depends on: 968636
(Assignee)

Updated

3 years ago
No longer depends on: 973298
(Assignee)

Comment 16

3 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
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.