Closed Trilarion closed 4 years ago
GitHub or GitLab do not offer such services automatically.
This may be a cleaner tutorial: https://development.robinwinslow.uk/2015/01/10/converting-between-git-and-bzr/
On Windows with Python 2.7 or 3.6 pip install bzr
fails. It wants to compile C code but cannot, then wants to fallback to Python, but fails there too.
Another tutorial, will follow it: https://fpira.com/blog/2016/09/migrate-bazaar-to-git/
And there is https://stackoverflow.com/questions/38933053/converting-bazaar-repo-to-git-on-linux and https://softwareengineering.stackexchange.com/questions/202668/how-to-convert-a-bazaar-repository-to-git-repository.
The first goes with the bzr-fastimport package and the later use Github projects (https://github.com/felipec/git-remote-bzr and https://github.com/termie/git-bzr-ng). We only need a one way conversion. Will try out later.
The solution on Linux that I use goes like
sudo apt-get install bzr sudo apt-get install bzr-fastimport
Then for all "branches" of a Bazaar project:
bzr repo repo-dir cd repo-dir bzr fast-export | git fast-import git checkout master rm -rf .bzr
and then fetching all the branches in one repository and upload to Gitlab.
We need a one time conversion from Bazaar to Git for a few Bazaar repositories (some launchpad and some games). The easiest seems to be fastimport/fastexport.
According to http://www.janosgyerik.com/converting-a-bazaar-repository-to-git/ it is as easy as
pip install bzr fastimport bzr fast-export repo | GIT_DIR=ddd git fast-import