1
===========================
2
Using Bazaar with Launchpad
3
===========================
9
Communities are different to teams
10
----------------------------------
12
The team of people required to create the initial release
13
of a piece of software may vary in size from one person
14
to several thousand people. Depending on the requirements,
15
the challenges involved, both technical and managerial,
16
can be immense. As explained in the Bazaar User Guide, selecting
17
"just right" processes and using tools like Bazaar to support
18
matching workflows can greatly help.
20
Success with software though requires more than a great team - it
21
requires a healthy, active *community*. This group is typically
22
far larger than the team as it includes everyone interested in
23
the software: the team, users, training partners, support partners,
24
third-party developers and so on.
26
Great communities are well understood in the free software community.
27
Their applicability extends well beyond that though: most
28
successful commercial software vendors are well skilled at
29
building and managing the communities that grow up around
30
their flagship products.
32
Like great teams, great communities don't just happen.
33
Good policies and guidelines are essential for
34
fostering the right sort of behaviour and healthy
35
relationships between participants. For a deeper look at
36
this topic, see Karl Fogel's landmark book:
37
`Producing Open Source Software <http://www.producingoss.com/>`_.
40
The need for Collaborative Development Environments
41
---------------------------------------------------
43
An intelligent toolset is also important for tracking and managing
44
community information and workflows. These tools are called
45
Collaborative Development Environments (CDEs). These toolsets are
46
typically web-based and manage things such as announcements,
47
issues/bugs, questions and answers, downloads, documents and
48
source code. Some examples of CDEs include
49
`Launchpad <https://launchpad.net>`_,
50
`SourceForge <http://sourceforge.net>`_,
51
`java.net <http://java.net>`_ and
52
`SAP Community Network <https://www.sdn.sap.com/irj/sdn>`_.
55
Helping communities work with related communities
56
-------------------------------------------------
58
Many successful products have a huge number of downstream dependencies.
59
In other words, a new challenge arises with success: dealing with other
60
communities and understanding how your changes will impact them. This is
61
most obvious for projects like:
63
* software languages, e.g. Python, PHP, Ruby, Java, Perl, etc.
64
* compilers, e.g. gcc, JDK, etc.
65
* libraries, e.g. zlib, openssl, etc.
66
* frameworks, e.g. Zope, Ruby on Rails, Spring, etc.
68
However it applies equally for popular applications on which add-ons are
69
built, e.g. Firefox, Thunderbird, OpenOffice.org, Drupal, Wordpress, Joomla,
72
Tools that assist communities work together to track and manage
73
issues and fixes across community boundaries are required. These
74
tools help people at both ends of the spectrum:
76
* users can report problems in their terms, e.g. rendering of image
77
type X is broken in application Y on operating system Z
79
* developers can better appreciate the downstream impact of making a
80
change or fix, e.g. fixing this bug in a graphics library will
81
make the users of these 5 applications on these 10 operating
84
People in the middle play the essential role of *joining the dots* and
85
communicating up and down the line. In many cases, they may also fix the
86
problem for end users, releasing a patch and pushing a suggested fix
87
to the upstream development team. Keeping track of all that over time
88
in a sustainable way is no easy task.
91
Launchpad: More development, less friction
92
------------------------------------------
94
As well as sponsoring `Ubuntu <http://www.ubuntu.com>`_ and
95
`Bazaar <http://bazaar.canonical.com>`_ development, Canonical
96
provides Launchpad, <https://launchpad.net/>, as a free service
97
for the community. Launchpad is one of the most
98
exciting CDEs around for several notable reasons:
100
* it models relationships between many of things tracked, e.g.
101
source code branches can be associated with bug fixes
103
* as well are managing historical knowledge,
104
it supports future development planning and tracking by providing
105
features such as roadmaps, milestones and blueprints
107
* it provides translation tools and packaging services so that
108
barriers are reduced for translators and testers wishing to
109
join your community and help out
111
* it provides a nexus for different communities to work
112
together on related issues and roadmaps.
114
In other words, Launchpad has been designed to help your
115
community grow and to reduce the workflow friction both
116
*within* your community and *between* communities. Ultimately,
117
that means less time on mechanical tasks and more time for
118
interesting development.
121
Bazaar: Launchpad's VCS client
122
------------------------------
124
This tutorial looks at how Bazaar and Launchpad can be used together
125
and how they complement each other. It is important to remember that:
127
1. Bazaar can be used without Launchpad
128
2. Launchpad can be used without Bazaar.
130
By design though, their sum is greater than the individual
134
Finding and browsing branches using Launchpad
135
=============================================
137
Finding available branches
138
--------------------------
140
While there are many advantages in adopting distributed version
141
control, one of the things that disappears is the all-knowing
142
central server with knowledge about all available branches. Indeed
143
in a distributed environment, interesting branches can literally
144
exist in 100s of locations across the Internet (or within an
145
Intranet for that matter).
147
Launchpad fills this gap by providing a registry of branches.
153
Branches can be uploaded to Launchpad or simply registered
154
as being available in an external location. Branches can also
155
be given a Status such as *New*, *Development*, *Mature* or
158
Note: External branches can even be hosted in legacy version control
159
tools, i.e. CVS and Subversion. Code in these systems will be
160
scanned and converted to Bazaar branches on a periodic basis.
161
For maximum fidelity of course, it is preferable for external
162
branches to be hosted in Bazaar.
168
Branches can be listed, filtered and sorted by numerous
169
attributes including Name, Registrant, Author, Status, Age and
170
time of last commit. Browsing of branches is also provided making
171
it easy to see things such as:
173
* where the branch can be downloaded from
174
* how to upload changes
175
* recent commits and the changes made by each
176
* the source code of individual files for a given version.
179
Accessing code in Launchpad using Bazaar
180
========================================
182
Getting the code for a project
183
------------------------------
185
As Launchpad keeps track of thousands of projects
186
and their latest code whether it be managed by Bazaar, CVS or Subversion,
187
Bazaar users can grab that code as easily as this::
189
bzr branch lp:project-name
191
where `project-name` is the Launchpad project ID. Here are some examples::
193
bzr branch lp:inkscape
197
bzr branch lp:java-gnome
199
You can then browse the code locally using your favorite editor or IDE and
200
change the code if you wish.
202
If a project has multiple series registered (e.g. a development series and a
203
maintenance series), the latest code for a given series can be fetched using::
205
bzr branch lp:project-name/series
207
Publishing your changes
208
-----------------------
210
Having fixed that annoying bug or added that cool feature you've always
211
wanted, it's time to impress your friends and make the world a better
212
place by making your code available to others. As explained earlier,
213
Launchpad is a free Bazaar code hosting service so you can push your
214
branch to it and others can access your code from there. For example,
215
assuming you are a member of the relevant team, login to launchpad like this::
217
bzr launchpad-login userid
219
where `userid` is your Launchpad user ID.
220
You can then push your changes to a team branch like this::
222
bzr push lp:~team-name/project-name/branch-name
224
Others can then download your code like this::
226
bzr branch lp:~team-name/project-name/branch-name
232
Even if you are not a member of a team, Launchpad can be used to publish
233
your changes. In this case, simply create a personal branch like this::
235
bzr push lp:~userid/project-name/branch-name
237
Others can then download your code like this::
239
bzr branch lp:~userid/project-name/branch-name
241
Note: Even when publishing to a personal branch, it is polite to notify the
242
upstream developers about your branch so they can pull your changes from
243
it if they are generally applicable to all users and meet the project's
247
Package source branches
248
-----------------------
250
When `maintaining packages for Ubuntu using Bazaar`_ you can easily access the
251
package's source branch on Launchpad. The package's source branch in the
252
current (default) series can be downloaded like this::
254
bzr branch ubuntu:package
256
where *package* is the name of the Ubuntu package you want to access. To
257
download the package branch for a specific series in Ubuntu (e.g. Maverick or
260
bzr branch ubuntu:maverick/package
262
Ubuntu distroseries can also be abbreviated to just their first letter. For
263
example, the above could also be written::
265
bzr branch ubuntu:m/package
267
You can also download the package source branch from Launchpad for several
268
Debian series. The default series can be downloaded like this::
270
bzr branch debianlp:package
272
and a specific series can be downloaded like this::
274
bzr branch debianlp:lenny/package
276
Note that the ``debianlp:`` scheme access the Debian source branch for a
277
package from Launchpad only.
279
.. _`maintaining packages for Ubuntu using Bazaar`: https://wiki.ubuntu.com/DistributedDevelopment
282
Linking branches using Launchpad
283
================================
285
Associating a branch with a bug
286
-------------------------------
288
After registering a branch, you can associate it to a bug so that
289
people interested in that bug can track and download the fix as
290
it becomes available.
292
To do this, the steps are:
294
1. Navigate to the bug in question.
296
2. Select `Add branch` under `Actions`.
298
3. Select the branch.
300
4. Optionally set the State of the relationship. This is
301
*Fix In Progress* by default but you may wish to set it
302
to another state such as *Fix Available* if the branch already
305
If you wish, you can also provide some arbitrary comments about
306
the relationship between the bug and the branch.
309
Changing the state in Launchpad while committing in Bazaar
310
----------------------------------------------------------
312
Bazaar and Launchpad can work together to reduce some of
313
the status housekeeping for you. When you commit using Bazaar,
314
use the --fixes option like this::
316
bzr commit --fixes lp:1234 -m "..."
318
where 1234 is the bug ID. This will changes the State of the
319
bug-branch relationship to *Fix Available*. If the one commit
320
fixes multiple issues, the --fixes option can be specified multiple
323
One of the cool things about this feature is that Launchpad does
324
not need to be accessible when making the commit. The ``--fixes``
325
option works by storing metadata which Launchpad will detect next
326
time the branch is pushed to it or scanned once online again.
328
Note: Launchpad will not implicitly close a bug just because a
329
branch is available that fixes it. There are several reasons for this.
330
Firstly, the branch usually needs to be merged into the trunk
331
(main development branch) before most teams consider it fixed.
332
Secondly, many teams have a separate process for confirming
333
bugs are fixed over and above a developer saying so.
335
As explained later, merge control features are currently under
336
development in Launchpad and automatically changing the status of
337
bugs to *Fix Committed* will be more appropriate once those features
341
Associating a branch with a blueprint
342
-------------------------------------
344
After registering a branch, you can associate it to a blueprint so that
345
people interested in that blueprint can track and test the feature as
348
To do this, the steps are:
350
1. Navigate to the blueprint in question.
352
2. Select `Link branch` under `Actions`.
354
3. Select the branch.
356
If you wish, you can also provide some arbitrary comments about
357
the relationship between the blueprint and the branch.
360
Managing releases using Launchpad
361
=================================
366
Once a branch has been developed and published, communities
367
typically go through a rigorous process before those changes
368
are integrated into the core product and rolled out to end users.
369
Some of the steps involved may include:
371
* peer review of the changes
373
* deciding which releases to include the changes in, e.g. the
374
next maintenance release, the next major release, or both
376
* running functional regression tests
378
* benchmarking to ensure performance remains acceptable
380
* packaging into early access releases for end user testing
382
* documentation updates, e.g. Release Notes for the targeted
385
* translation of the user interface and documentation into
388
This section briefly looks at some of the features in Launchpad that
389
help get good quality code into production. Strong integration with
390
Bazaar is core to making this happen smoothly.
392
Note: Where indicated, some of the features below are still under
393
development. If one or more of these features interest you, please
394
consider joining the Launchpad beta test team at this link:
395
https://help.launchpad.net/JoiningLaunchpadBetaTesters. You can
396
then get early access to features and provide feedback to the
397
developers before wider roll-out.
400
Branch merge proposals
401
----------------------
403
After navigating to a branch in Launchpad, one of the available actions
404
is *Propose for merging*. This lets you nominate which branch this code
405
ought to be merged into.
407
Tracking the knowledge about which branches are proposed to be merged
408
into a codeline helps Release Managers keep on top of what still needs
409
to be completed, or can be completed, before a ship date. Using this
410
information, they can ensure branches are merged after completing any
411
necessary reviews. In the simple case, the Release Manager may manually
412
merge branches. In more advanced cases, the merging could be automatically
413
done by a robot (like `PQM`_) when the branch reaches the right state
414
(e.g. *Review completed*).
416
.. _PQM: https://launchpad.net/pqm
422
A number of features are under development in Launchpad to track the
423
states, conversations and outcomes of code reviews. These features are
424
expected to be integrated with branch merge proposals and branch
428
Personal Package Archives (PPAs)
429
--------------------------------
431
PPAs help developers and development teams get custom builds into the
432
hands of users for early testing and feedback. In other words, a PPA
433
allows a developer to form a community of testers who are interested
434
in their changes. The testing community can install the packages,
435
run them for the test period and then remove them cleanly from their
438
See https://help.launchpad.net/PPAQuickStart for further details.
444
The Translations module in Launchpad is designed to make it easy for
445
anyone to get involved translating applications to languages they know.
446
Translators are shielded from the low level details.
448
Launchpad keeps track of the translations for each major version of a
449
project separately, allowing translators to continue to improve the
450
translations of your stable releases while others start work on newer
451
versions that are still in development. Translation speed in reduced
452
by sharing resources across projects. Automatic suggestions, from a
453
library of 750,000 translated strings, and a community of 19,000
454
registered translators can radically cut the time required to
455
localise your project into many languages.
461
The communities we join, whether off-line or on-line,
462
say a lot about the sort of people we are. The flip-side
463
to this is that the tools you choose for your community - particularly
464
the CDE and version control tool - can have a large impact on who
465
joins and how easily they can contribute.
467
In their own right, Launchpad and Bazaar are highly useful tools.
470
* help your community track major assets such as source code and knowledge
471
* help it grow by reducing barriers to entry
472
* help it interact with related communities.
474
In particular, Launchpad is a free code hosting service for your Bazaar
475
branches, branches can be browsed online, branches can be linked to bugs
476
and blueprints, and the status of bug-branch relationships can be
477
automatically managed by mentioning the bug while committing in Bazaar.
478
Further integration is under development with the aim of streamlining
479
the process from *great idea* to *running code in the hands of end users*.
481
If you have any feedback on how you'd like to see Bazaar and Launchpad
482
further integrated, please contact us on the Bazaar mailing list,
483
bazaar@lists.canonical.com.
485
While designed as a free service to support free software projects,
486
Canonical may make Launchpad available to commercial software developers
487
depending on their requirements. We would be happy to hear from you
488
if you think Launchpad would be useful for managing your community.