As a project we decided that Inkscape needed to move to Git. Bazaar has been a great tool for us, but since it is no longer being developed we felt the need to find a new solution. Also we see the majority of developers are learning to use Git for other projects, which turned using Bazaar into a skill they had to learn in order to contribute. We always want to make contributing as easy as possible. So after the 0.92 release we started getting ready to move.
There are several Git code hosting platforms available but as a project we found that Gitlab is the best fit for us. We're an Open Source project and we value using and promoting Open Source tools and solutions. We're exciting about diving in and using Gitlab's amazing CI infrastructure to better our testing. And we've got some plans to use subteams and other mechanisms to try and recognize and enable contributors of all types. We're pretty excited to get our project on Gitlab.
Inkscape is a well established project with a long version history. While the conversion between Bazaar and Git isn't complex, that history made it more complicated to migrate. There are also several branches that we didn't want to lose if we didn't have to. This lead us to the lp2gh tool which is for migrations to Github. While we're not going to Github, we were able to use the version control conversion script to get all the branches out of Launchpad. For others who may follow in our footsteps, here is a small shell script showing what we did.
# Make a directory and ensure the tools we need are # in our path mkdir export export PATH=$PATH:`pwd`/lp2gh/bin cd export # Do a massive export of everything lp2gh-export-branches inkscape # Delete the Bazaar branches in the repo from git-bzr cd inkscape git branch | grep -v master | grep bzr/ | xargs -n 1 git branch -D # We had some inconsistent names and e-mail addresses # In our revision history, so we're fixing it now git filter-branch \ --commit-filter 'OUT=`email-filter.py "$GIT_AUTHOR_NAME" "$GIT_AUTHOR_EMAIL"`; eval $OUT' \ -- --all # Send up to GitLab git remote add origin [email protected]:inkscape/inkscape.git git push --all origin
For us, on my home desktop, that took about 24-hours to complete. This was a rather long migration, which seemed to be mostly blocked on the fast export of the Bazaar branches. We applied a small patch by Eduard Braun that included the Bazaar revision number in the Git commit message which will make it possible find which revisions certain bugs referenced. This patch caused the export to take longer that it would for other projects not using this patch.
posted Jun 9, 2017 | permanent link