The SCons wiki has moved to https://github.com/SCons/scons/wiki/ToolsBazaarWorkflows
The following sections try to outline a few workflows for managing external SCons Tools as packages on Launchpad (Bazaar).
If you simply want to use an external Tool, or have a look at the sources, issue the command given in the "Branch/Clone" column of the ToolsIndex. This will give you a local copy to work with. Example:
bzr branch lp:scons-vala vala
Patching or extending and then, finally, contributing your code, needs a little more effort...
Getting a Launchpad login
We assume that you have initially branched an existing tool, modified it and want to publish your changes.
- If you don't already have a login at Launchpad, register there first. A homepage is created for you, and on it you find the OpenID URL. It has your "Launchpad-login" as last part, after the "
- For identification purposes you need to provide a public SSH key to Launchpad. If necessary, create a new one under your OS of choice. Import your key under the entry "
SSH keys" on your Launchpad homepage.
- Now you can issue the command "
bzr launchpad-login yournick" on your local machine. Here, "
yournick" is your personal "Launchpad-login" as described above. This tells Bazaar to use this nickname for all your following commits/pushes, directed at Launchpad.
- You should also check your local name (the one that is displayed for commits) with "
bzr whoami" and change it by "
bzr whoami "John Doe <firstname.lastname@example.org>"", respectively.
- Commit your local changes with "
- Then, push your local branch up to Launchpad with "
bzr push lp:~yournick/toolname/branchname". Correctly replacing "
yournick" (your "Launchpad-login"), "
toolname" (name of the tool) and "
branchname" (name of your branch), this creates a new branch under your account associated with the tool project. Since Launchpad stores all the different branches in a sort of "matrix", your contribution should show up on your page and on the tool project page along with the original branch.
- As described on the Code/Uploading a Branch page, you can continue to commit your subsequent changes locally ("
bzr commit") or publish them again by a push ("
bzr push lp:~yournick/toolname/branchname").
- Eventually, use the "Propose for merging" link (on the Launchpad page of your branch) to get your changes into the "mainline" (also known as "trunk") for the project.
Merging, contributing your patched code
The practice currently regarded best, is to branch the current mainline of a Tool, add your changes, and then propose your branch for a merge via Launchpad. One of the Tool's admins should then merge the user's branch locally, resolve conflicts and finally pushes the result up again.
Setting up a project for a new tool
The single steps are:
- Login in with your user account
- Go to the main page at http://launchpad.net and click on "Register a project"
Fill out the details for the first page. Name the project "scons-xyz", where "xyz" is the name of your tool.
Fill out the second page, and confirm "Create new project"
- Now you can upload your current version of the tool by
bzr push lp:~user/scons-xyz/trunk
which pushes it to the automatically created "trunk" series.
How to add a downloadable archive to your new project
Select the "trunk" series in the Project's main page
"Create a new milestone" and enter a version number
Back in the overview page for the "trunk" series, create a new release
Fill out the form for the release and confirm
Go back to the tool's page on Launchpad, and do a refresh in your browser. Then click on the "trunk" series link. You should see a page like this:
If this has not been done already, link the uploaded branch to this series. Clicking on "Link the branch to this series", select the "trunk" branch...
and get the addition of the series confirmed, after clicking
Now you can add your TAR archive for download
and the archive should get available for download.
Some helpful links are