Install Bazaar

Do a: sudo apt-get install bzr

Get SSHKey Pair

You should start with getting an SSHKeyPair.For this go through these instructions.

Upload your Public SSH key in ~/.ssh/rsa.pub to your launchpad account in launchpad.
Now we need to make sure the following points:

1)Your public SSH key is their with launchpad

2)You have a private SSH key in your .ssh folder

3)You have your .ssh folder in your home directory and not in root

4)Remember not to use sudo in any of your bzr commands as if you use sudo, you won't use your ssh key!.

Tell Bazaar Your Launchpad Login

It is also imp to make sure that you do
→bzr launchpad-login YOUR_LOGIN_ID_IN_LAUNCHPAD.

Since you cannot use sudo therefore you dont have root priveleges. It is here that we will fix our unix permission
settings so that you are able to successfuly make a commit or get other bzr operations going without getting permission errors. You need to use “sudo” when you apply changes to your mailman installation because mailman requires you to be root to make changes.

Setting Your UNIX Permissions


For fixing UNIX permissions the following steps can be followed:

Let us suppose that the login you use is ABC then do a:
→sudo adduser ABC mailman
This is adding yourself to the mailman group

Now do a:
→sudo su
→chown -R ABC:ABC /home/ABC/.bazaar
→exit (so that you are no longer root)
with this command you have given all the permissions to the user ABC to access the .bazaar directory in your /home/ABC directory

  • Now in order to perform bzr functions successfully in home folder:


Try to do the following:

1)Make a folder “test” in your /home/ABC directory.

2)Make a checkout from your feature branch in launchpad by doing
→bzr checkout BRANCH after doing cd /home/ABC/test

3)A directory will be created if checkout successfully happens.
Now go inside the folder and make a new empty file “testing”.

4)Do a:
→bzr add *

5)Do a:
→bzr commit –local -m “COMMENT”

6)Do a:
→bzr push BRANCH

If this works successfully then your bzr is working perfectly fine :-)

  • You can also use bzr in your /usr/local/mailman,for this you need to fix permissions again:


Do a:
→chown -R mailman:mailman /usr/local/mailman
This will give all root permissions to group mailman,since we added the user ABC to group mailman in the beginning,so giving
permissions to the group will automatically give permissions to the users of the group.

Now Do a:
→ chmod -R 770 on /usr/local/mailman
To make sure the mailman group has all the right permissions.

With this you can run bzr successfully in your /usr/local/mailman directory.

PS: Make sure you don't use “sudo bzr <command>”. This will give an error saying: Permission denied. If you follow the above steps correctly, you'll be able to run bzr without using sudo.

Bazaar online manpages can be found under:

Bazaar Man Pages

 
tips_and_tricks_for_using_bazaar.txt · Last modified: 2011/11/12 10:52 by keturn
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki