Using Launchpad and Bazaar
From Wiki
This is the wiki page for the showmedo video Getting Started with Launchpad and Bazaar in 20 Minutes by User:ErikThompson
Contents |
[edit]
Bazaar tips
[edit]
Steps to start a new Launchpad project using Bazaar on Windows
- Register Username on Launchpad: https://launchpad.net/+login
- Search and then Register Your New Project Name on Launchpad: https://launchpad.net/
- Create working folder and add some starter files
- Download Standalone Windows Installer for Bazaar and Install Bazaar: http://bazaar-vcs.org/Download
- Right-click on folder and select Bzr Here
- Navigate into working folder
- Type: bzr whoami to find out what bazaar thinks you are.
- Type: bzr whoami "Erik Thompson" to tell bazaar exactly who you are.
- 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>"
- 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.
- Initialize Bazaar (use the 1st time only for a working folder), type: bzr init
- If you want to ignore any folders or files type ignore filename
- Recursively Add files and folders, type: bzr add
- Save the updates locally: bzr commit –m "saving my initial setup"
- Register a new branch under your Lanuchpad user name
- You don't need to register a hosted branch first, you can just push directly to it.
- Download puttygen and pageant (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) and use puttygen to create a public and private key
- Copy the text in the panel that is a bunch of random letters into your launchpad ssh key
- 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.
- 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- Bazaar comes with a Launchpad plug-in. You can tell bzr about your Launchpad login using the launchpad-login command.
- 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
- Also, once a branch has been pushed to a particular location, bzr will remember, so subsequent pushes only need the command bzr push.
- Assign this branch to the project trunk
[edit]
Steps to download a project on Launchpad that uses Bazaar with only one branch
- Make sure you have Bazaar installed: http://bazaar-vcs.org/Download
- Start Bazzar (perhaps by right-clicking a folder and selecting Bzr Here)
- To download the latest revision of the emol project type: bzr checkout https://launchpad.net/emol
- To download the second revision of the emol project into a folder called 'rev2' type: bzr checkout https://launchpad.net/emol -r 2 rev2
[edit]
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)
- Make sure you have Bazaar installed: http://bazaar-vcs.org/Download
- Go to the launchpad code page for the project: https://code.launchpad.net/rasmol/
- Observe that Rasmol has three separate branches: Click the one that says 'debian': https://code.launchpad.net/~tpikonen/rasmol/debian
- The Download URL is the info that you need to remember: http://bazaar.launchpad.net/~tpikonen/rasmol/debian
- Start Bazzar (perhaps by right-clicking a folder and selecting Bzr Here)
- Type 'bzr checkout ' followed by the download URL, e.g. type: bzr checkout http://bazaar.launchpad.net/~tpikonen/rasmol/debian

