Keywords: launchpad bazaar first time, bzr, host project

Bazaar and launchpad

Install bazaar

aptitude install python-pyrex
aptitude install bzr

easy_install bzr
easy_install pyrex

virtualenv --no-site-packages bzrENV
cd bzrENV
source bin/activate

easy_install bzr
easy_install "bzr==1.9"


ssh-keygen -t rsa

Generating public/private rsa key pair.
Enter file in which to save the key (/home/lucas/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/lucas/.ssh/id_rsa.
Your public key has been saved in /home/lucas/.ssh/
The key fingerprint is:
b4:...............2d username@yourmachine

cat .ssh/

bzr launchpad-login myusername

bzr whoami

bzr whoami "Lucas mylastname <>"

Create a project

mkdir myproject
cd myproject
mkdir trunk
cd trunk
touch README.txt License.txt

bzr init

bzr add

bzr commit -m "Initial Import"

 Checking in."
Committing to: /home/lucas/myproject/trunk/
added README.txt
added License.txt
Committed revision 1.

Upload the project

bzr push lp:~myusername/myproject/trunk --use-existing-dir

The authenticity of host ' (xx.xx.xx.xx)' can't be established.
RSA key fingerprint is 9d:.......89.
Are you sure you want to continue connecting (yes/no)? yes 
Warning: Permanently added ',xx.xx.xx.xx' (RSA) to the list of known hosts.
Created new branch.

* Next time when you change something, commit it and you want to push it to the repository you just have to do:

bzr push

Using Bazaar

bzr info/log

bzr log

bzr diff

bzr diff
bzr diff > this_is_my_patch.diff

Deleting, removing, renaming files

bzr mv oldfilename.txt newfilename.txt

bzr remove

bzr revert

Undoing changes


bzr commit --tag TAG_NAME
bzr commit --tag myproject-release-0.1

bzr tag -r 77 myproject-release-0.7

bzr diff -r tag:myproject-0.1
bzr log -r tag:myproject-0.1

bzr tags


bzr checkout branchdir/  newcheckoutdir/ 
bzr checkout s myproject_dev

bzr checkout --lightweight /srv/foo-repo/foo.feature foo.feature

bzr update

bzr commit -m"Updating xyz"

Checkout with launchpad

bzr checkout

bzr checkout lp:projectname datahub_trunk
bzr checkout s datahub_trunk
bzr checkout s

http checkout to sftp checkout

bzr bind s

Convert to Bazaar

csv to bzr

  1. csv to bazaar instructions

From Subversion to Bazaar repository

  1. svn with bzr

  2. svn to bzr

Convert Subversion Database to Bazaar

Convert svnadmin dump https to bzr

mkdir tmp
cd tmp
svnadmin create myprojectname
echo '#!/bin/sh' > myprojectname/hooks/pre-revprop-change
chmod +x myprojectname/hooks/pre-revprop-change
#Need full path for thve first part (destination part)
svnsync init file:///home/lucas/tmp/myprojectname
svnsync sync file:///home/lucas/tmp/myprojectname
svnadmin dump myprojectname >myprojectname.dump
python myprojectname.dump bzr-myprojectname/

Upload to launchpad if you want to. First register a project

cd bzr-uicrawler
bzr push s

Using bazaar with svn

  1. bzr-svn

bzr vs mercurial vs git

  1. The ability to version and rename directories is something neither Git nor Mercurial have.
  2. Bazaar plugin for svn can at the moment be used to commit to, pull from, merge from, push to and view logs of Subversion branches from Bazaar.

bzr and git

Work with bazaar

  1. bugzilla,trac,launchpad, build in link to a bug tracker


  1. Bazaar Main Docs

  2. svn style(central repository) work flow with distributed vcs bazaar

  3. Bazaar in 5 min

  4. Code Management

  5. Bazaar man Page. All options

  6. bzr as central repository, notes

  7. Tagging in bzr


Could not acquire lock "(remote lock)"


Using saved location: bzr+ssh://
Unable to obtain lock lp-46075600:///~username/myproject/trunk/.bzr/branch/lock
held by on host [process #9668]
locked 9 minutes, 23 seconds ago
Will continue to try until 02:10:45, unless you press Ctrl-C
If you're sure that it's not being modified, use bzr break-lock lp-46075600:///~username/myproject/trunk/.bzr/branch/lock
bzr: ERROR: Could not acquire lock "(remote lock)"


bzr break-lock lp:~username/myproject/trunk

checkout then commit

bzr: ERROR: Cannot lock LockDir( Transport operation not possible: http does not support mkdir() 

bzr launchpad-login myusernam

bzr bind lp:~myusername/myproject/path
#in my case it was
bzr bind lp:~szybalski/datahub/trunk

MyWiki: Bazaar (last edited 2009-11-25 14:57:47 by LukaszSzybalski)