Skip to content

Instantly share code, notes, and snippets.

View nottrobin's full-sized avatar

Robin Winslow nottrobin

View GitHub Profile
@nottrobin
nottrobin / gist:e418c5ba2f4f7dcf027a
Created January 27, 2015 16:42
Installing fastimport in Bazaar
cd ~/.bazaar/plugins
bzr branch lp:bzr-fastimport fastimport
@nottrobin
nottrobin / gist:264e08d726c3ecacf102
Created January 27, 2015 16:47
Convert Bazaar repository to Git
git init # Initialise a new git repo
bzr fast-export --plain . | git fast-import # Import Bazaar history into Git
@nottrobin
nottrobin / gist:9cc2e6b7deb60a434f67
Created January 27, 2015 16:48
check Git revision history
git log # Check your revision history is in Git
@nottrobin
nottrobin / gist:a0693c00086a362ba6d6
Created January 27, 2015 16:49
Convert Git to Bazaar
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
@nottrobin
nottrobin / gist:851045637af7b628750a
Created January 27, 2015 16:50
Check converted Bazaar history
cd bzr-repo/trunk # Open the "trunk" branch (equivalent of "master")
bzr log | less # Check your revision history is in Bazaar
@nottrobin
nottrobin / set up git and bzr project.sh
Last active August 29, 2015 14:14
Setting up a project with both .gitignore and .bzrignore files
$ cat .gitignore
.bzr/
.sass-cache/
bzr-repo/
*.pyc
$ cat .bzrignore
.git/
.sass-cache/
bzr-repo/
*.pyc
@nottrobin
nottrobin / install git bzr pip.sh
Last active August 29, 2015 14:14
Install Git, Bazaar and Pip
sudo apt install git bzr python-pip
@nottrobin
nottrobin / bzr-sync user permissions.sh
Last active August 29, 2015 14:14
Setup user permissions for the bzr-sync server
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 [email protected]: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
@nottrobin
nottrobin / clone bzr-sync.sh
Last active August 29, 2015 14:14
Cloning the bzr-sync project
# Clone the repository, and make it owned by our user (bzr-sync)
sudo git clone [email protected]: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
@nottrobin
nottrobin / prepare bzr-sync project.sh
Created January 28, 2015 14:28
Clone bzr-sync and install dependencies
# Clone the repository, and make it owned by our user (bzr-sync)
sudo git clone [email protected]: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