Using Launchpad and Bazaar

From Wiki

Jump to: navigation, search

This is the wiki page for the showmedo video Getting Started with Launchpad and Bazaar in 20 Minutes by User:ErikThompson

Contents

Bazaar tips

Steps to start a new Launchpad project using Bazaar on Windows

  1. Register Username on Launchpad: https://launchpad.net/+login
  2. Search and then Register Your New Project Name on Launchpad: https://launchpad.net/
  3. Create working folder and add some starter files
  4. Download Standalone Windows Installer for Bazaar and Install Bazaar: http://bazaar-vcs.org/Download
  5. Right-click on folder and select Bzr Here
  6. Navigate into working folder
  7. Type: bzr whoami to find out what bazaar thinks you are.
  8. Type: bzr whoami "Erik Thompson" to tell bazaar exactly who you are.
    1. It is often a good idea to include an email address in your bzr identity, for example "Eric the Viking <eric@vikings-r-us.example.com>"
    2. If you do this, and the email address is linked to you in Launchpad, then Launchpad is able to link the revisions you created to your Launchpad identity.
  9. Initialize Bazaar (use the 1st time only for a working folder), type: bzr init
  10. If you want to ignore any folders or files type ignore filename
  11. Recursively Add files and folders, type: bzr add
  12. Save the updates locally: bzr commit –m "saving my initial setup"
  13. Register a new branch under your Lanuchpad user name
    1. You don't need to register a hosted branch first, you can just push directly to it.
  14. Download puttygen and pageant (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) and use puttygen to create a public and private key
  15. Copy the text in the panel that is a bunch of random letters into your launchpad ssh key
  16. Start pageant, and click right click the pageant icon in the system tray, click add-key and select your key. Now bzr should be able to publish to Launchpad.
  17. Upload the code using the example command listed in launchpad under your branch name.
    In my case: bzr push bzr+ssh://mrlobster99@bazaar.launchpad.net/~mrlobster99/emol/devel
    1. Bazaar comes with a Launchpad plug-in. You can tell bzr about your Launchpad login using the launchpad-login command.
    2. If you did bzr launchpad-login mrlobster99 (and you only need to do this once on any given computer) the command would have checked that the identity you used did exist in Launchpad, and that it had an SSH key listed for it. Once you have done this you can use the shorter push command: bzr push lp:~mrlobster99/emol/devel
    3. Also, once a branch has been pushed to a particular location, bzr will remember, so subsequent pushes only need the command bzr push.
  18. Assign this branch to the project trunk

Steps to download a project on Launchpad that uses Bazaar with only one branch

  1. Make sure you have Bazaar installed: http://bazaar-vcs.org/Download
  2. Start Bazzar (perhaps by right-clicking a folder and selecting Bzr Here)
  3. To download the latest revision of the emol project type: bzr checkout https://launchpad.net/emol
  4. To download the second revision of the emol project into a folder called 'rev2' type: bzr checkout https://launchpad.net/emol -r 2 rev2

Example of downloading a Launchpad project that has multiple branches

For this example I'm assuming you want to download RasMol (https://launchpad.net/rasmol)

  1. Make sure you have Bazaar installed: http://bazaar-vcs.org/Download
  2. Go to the launchpad code page for the project: https://code.launchpad.net/rasmol/
  3. Observe that Rasmol has three separate branches: Click the one that says 'debian': https://code.launchpad.net/~tpikonen/rasmol/debian
  4. The Download URL is the info that you need to remember: http://bazaar.launchpad.net/~tpikonen/rasmol/debian
  5. Start Bazzar (perhaps by right-clicking a folder and selecting Bzr Here)
  6. Type 'bzr checkout ' followed by the download URL, e.g. type: bzr checkout http://bazaar.launchpad.net/~tpikonen/rasmol/debian
Personal tools