This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bzr init-repo bzr-repo # Create a new Bazaar repository tree | |
git fast-export -M --all | (cd bzr-repo; bzr fast-import -) # Export Git history into Bazaar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd bzr-repo/trunk # Open the "trunk" branch (equivalent of "master") | |
bzr log | less # Check your revision history is in Bazaar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat .gitignore | |
.bzr/ | |
.sass-cache/ | |
bzr-repo/ | |
*.pyc | |
$ cat .bzrignore | |
.git/ | |
.sass-cache/ | |
bzr-repo/ | |
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install git bzr python-pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo adduser bzr-sync # Create new bzr-sync user | |
sudo su bzr-sync # Change to bzr-sync user | |
ssh-keygen # Create new RSA key | |
cat ~/.ssh/id_rsa.pub # Add this public key to Github and Launchpad | |
# Now check we can clone your github projects properly | |
git clone git@github.com:example/example-project | |
rm -r example-project # Once we've tested this, delete the project again | |
# And check we can branch and push to launchpad projects | |
bzr branch lp:example-project # Branch a project | |
cd example-project # Change to its directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clone the repository, and make it owned by our user (bzr-sync) | |
sudo git clone git@github.com:ubuntudesign/bzr-sync.git /srv/bzr-sync | |
sudo chown -R bzr-sync:bzr-sync /srv/bzr-sync | |
# Install python dependencies | |
sudo pip install -r /srv/bzr-sync/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clone the repository, and make it owned by our user (bzr-sync) | |
sudo git clone git@github.com:ubuntudesign/bzr-sync.git /srv/bzr-sync | |
sudo chown -R bzr-sync:bzr-sync /srv/bzr-sync | |
# Install python dependencies | |
sudo pip install -r /srv/bzr-sync/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gunicorn --keyfile /srv/bzr-sync/certs/bzr-sync.key --certfile /srv/bzr-sync/certs/bzr-sync.cert --pythonpath /srv/bzr-sync --bind 0.0.0.0:9052 wsgi:application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/init/bzr-sync.conf | |
# A WSGI application | |
# to sync a github repository to a launchpad one | |
description "BZR sync" | |
start on runlevel [2345] | |
stop on runlevel [016] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo start bzr-sync |