~bzr-pqm/bzr/bzr.dev

3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
1
===========================
2
Using Bazaar with Launchpad
3
===========================
4
5
6
Motivation
7
==========
8
9
Communities are different to teams
10
----------------------------------
11
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.
19
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.
25
5278.1.6 by Martin Pool
More 'open source' occurrences
26
Great communities are well understood in the free software community.
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
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.
31
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/>`_.
38
39
40
The need for Collaborative Development Environments
41
---------------------------------------------------
42
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>`_.
53
54
55
Helping communities work with related communities
56
-------------------------------------------------
57
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:
62
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.
67
68
However it applies equally for popular applications on which add-ons are
3167.1.1 by Matt Nordhoff
Fix typos of "Firefox" and "OpenOffice.org" in docs.
69
built, e.g. Firefox, Thunderbird, OpenOffice.org, Drupal, Wordpress, Joomla,
70
etc.
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
71
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:
75
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
78
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
82
  systems happy.
83
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.
89
90
91
Launchpad: More development, less friction
92
------------------------------------------
93
94
As well as sponsoring `Ubuntu <http://www.ubuntu.com>`_ and
5050.22.1 by John Arbash Meinel
Lots of documentation updates.
95
`Bazaar <http://bazaar.canonical.com>`_ development, Canonical
5278.1.6 by Martin Pool
More 'open source' occurrences
96
provides Launchpad, <https://launchpad.net/>, as a free service
97
for the community. Launchpad is one of the most
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
98
exciting CDEs around for several notable reasons:
99
100
* it models relationships between many of things tracked, e.g.
101
  source code branches can be associated with bug fixes
102
6258.1.1 by Jelmer Vernooij
Fix typo. Thanks Kesten Broughton for pointing it out.
103
* as well as managing historical knowledge,
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
104
  it supports future development planning and tracking by providing
105
  features such as roadmaps, milestones and blueprints
106
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
110
111
* it provides a nexus for different communities to work
112
  together on related issues and roadmaps.
113
114
In other words, Launchpad has been designed to help your
4011.6.1 by Frank Aspell
Fixed typos.
115
community grow and to reduce the workflow friction both
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
116
*within* your community and *between* communities. Ultimately,
117
that means less time on mechanical tasks and more time for
118
interesting development.
119
120
121
Bazaar: Launchpad's VCS client
122
------------------------------
123
3101.2.3 by Ian Clatworthy
chapter -> tutorial fix
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:
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
126
127
1. Bazaar can be used without Launchpad
128
2. Launchpad can be used without Bazaar.
129
130
By design though, their sum is greater than the individual
3101.2.3 by Ian Clatworthy
chapter -> tutorial fix
131
parts.
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
132
133
134
Finding and browsing branches using Launchpad
135
=============================================
136
137
Finding available branches
138
--------------------------
139
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).
146
147
Launchpad fills this gap by providing a registry of branches.
148
149
150
Registering branches
151
--------------------
152
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
156
*Abandoned*.
157
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.
163
164
165
Browsing branches
166
-----------------
167
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:
172
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.
177
178
179
Accessing code in Launchpad using Bazaar
180
========================================
181
5278.1.6 by Martin Pool
More 'open source' occurrences
182
Getting the code for a project
183
------------------------------
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
184
5278.1.6 by Martin Pool
More 'open source' occurrences
185
As Launchpad keeps track of thousands of projects
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
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::
188
3101.2.4 by Ian Clatworthy
include feedback from kiko
189
  bzr branch lp:project-name
190
191
where `project-name` is the Launchpad project ID. Here are some examples::
192
193
  bzr branch lp:inkscape
194
  bzr branch lp:amarok
195
  bzr branch lp:python
196
  bzr branch lp:rails
197
  bzr branch lp:java-gnome
198
199
You can then browse the code locally using your favorite editor or IDE and
200
change the code if you wish.
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
201
3101.2.5 by Ian Clatworthy
Feedback from jam and jml
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::
204
205
  bzr branch lp:project-name/series
206
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
207
Publishing your changes
208
-----------------------
209
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,
3101.2.5 by Ian Clatworthy
Feedback from jam and jml
215
assuming you are a member of the relevant team, login to launchpad like this::
3101.2.4 by Ian Clatworthy
include feedback from kiko
216
3101.2.5 by Ian Clatworthy
Feedback from jam and jml
217
  bzr launchpad-login userid
3101.2.4 by Ian Clatworthy
include feedback from kiko
218
219
where `userid` is your Launchpad user ID.
3101.2.5 by Ian Clatworthy
Feedback from jam and jml
220
You can then push your changes to a team branch like this::
221
222
  bzr push lp:~team-name/project-name/branch-name
223
3101.2.4 by Ian Clatworthy
include feedback from kiko
224
Others can then download your code like this::
225
3101.2.5 by Ian Clatworthy
Feedback from jam and jml
226
  bzr branch lp:~team-name/project-name/branch-name
3101.2.4 by Ian Clatworthy
include feedback from kiko
227
228
229
Personal branches
230
-----------------
231
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::
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
234
3101.2.5 by Ian Clatworthy
Feedback from jam and jml
235
  bzr push lp:~userid/project-name/branch-name
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
236
3101.2.4 by Ian Clatworthy
include feedback from kiko
237
Others can then download your code like this::
238
3101.2.5 by Ian Clatworthy
Feedback from jam and jml
239
  bzr branch lp:~userid/project-name/branch-name
3101.2.4 by Ian Clatworthy
include feedback from kiko
240
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
244
quality standards.
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
245
246
5462.4.1 by Barry Warsaw
Added support for ubuntu: and debianlp: schemes, accessing the relevant
247
Package source branches
248
-----------------------
249
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::
253
254
  bzr branch ubuntu:package
255
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
258
Lucid), use this::
259
260
  bzr branch ubuntu:maverick/package
261
5462.4.4 by Barry Warsaw
Update docs.
262
Ubuntu distroseries can also be abbreviated to just their first letter.  For
263
example, the above could also be written::
264
265
  bzr branch ubuntu:m/package
266
5462.4.1 by Barry Warsaw
Added support for ubuntu: and debianlp: schemes, accessing the relevant
267
You can also download the package source branch from Launchpad for several
268
Debian series.  The default series can be downloaded like this::
269
270
  bzr branch debianlp:package
271
272
and a specific series can be downloaded like this::
273
274
  bzr branch debianlp:lenny/package
275
276
Note that the ``debianlp:`` scheme access the Debian source branch for a
277
package from Launchpad only.
278
279
.. _`maintaining packages for Ubuntu using Bazaar`: https://wiki.ubuntu.com/DistributedDevelopment
280
281
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
282
Linking branches using Launchpad
283
================================
284
285
Associating a branch with a bug
286
-------------------------------
287
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.
291
292
To do this, the steps are:
293
294
1. Navigate to the bug in question.
295
296
2. Select `Add branch` under `Actions`.
297
298
3. Select the branch.
299
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
303
   addresses the issue.
304
305
If you wish, you can also provide some arbitrary comments about
306
the relationship between the bug and the branch.
307
308
309
Changing the state in Launchpad while committing in Bazaar
310
----------------------------------------------------------
311
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::
315
316
  bzr commit --fixes lp:1234 -m "..."
317
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
321
times.
322
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.
327
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.
334
3101.2.4 by Ian Clatworthy
include feedback from kiko
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
338
are in place.
339
340
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
341
Associating a branch with a blueprint
342
-------------------------------------
343
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
346
it develops.
347
348
To do this, the steps are:
349
350
1. Navigate to the blueprint in question.
351
352
2. Select `Link branch` under `Actions`.
353
354
3. Select the branch.
355
356
If you wish, you can also provide some arbitrary comments about
357
the relationship between the blueprint and the branch.
358
359
360
Managing releases using Launchpad
361
=================================
362
363
Integrating changes
364
-------------------
365
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:
370
371
* peer review of the changes
372
373
* deciding which releases to include the changes in, e.g. the
374
  next maintenance release, the next major release, or both
375
376
* running functional regression tests
377
378
* benchmarking to ensure performance remains acceptable
379
380
* packaging into early access releases for end user testing
381
382
* documentation updates, e.g. Release Notes for the targeted
383
  releases
384
385
* translation of the user interface and documentation into
386
  multiple languages.
387
388
This section briefly looks at some of the features in Launchpad that
3101.2.4 by Ian Clatworthy
include feedback from kiko
389
help get good quality code into production. Strong integration with
390
Bazaar is core to making this happen smoothly.
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
391
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.
398
399
400
Branch merge proposals
401
----------------------
402
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.
406
3101.2.4 by Ian Clatworthy
include feedback from kiko
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*).
415
416
.. _PQM: https://launchpad.net/pqm
417
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
418
419
Code review tracking
420
--------------------
421
3638.6.25 by Dmitry Vasiliev
using_bazaar_with_launchpad.txt: Update and review translation
422
A number of features are under development in Launchpad to track the
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
423
states, conversations and outcomes of code reviews. These features are
424
expected to be integrated with branch merge proposals and branch
425
browsing features.
426
3101.2.4 by Ian Clatworthy
include feedback from kiko
427
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
428
Personal Package Archives (PPAs)
429
--------------------------------
430
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
436
system.
437
438
See https://help.launchpad.net/PPAQuickStart for further details.
439
440
441
Translations
442
------------
443
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.
447
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.
456
457
458
Summary
459
=======
460
4853.1.1 by Patrick Regan
Removed trailing whitespace from files in doc directory
461
The communities we join, whether off-line or on-line,
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
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.
466
467
In their own right, Launchpad and Bazaar are highly useful tools.
468
Together, they can:
469
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.
473
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
4011.6.1 by Frank Aspell
Fixed typos.
477
automatically managed by mentioning the bug while committing in Bazaar.
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
478
Further integration is under development with the aim of streamlining
3101.2.4 by Ian Clatworthy
include feedback from kiko
479
the process from *great idea* to *running code in the hands of end users*.
3101.2.1 by Ian Clatworthy
Add Using Bazaar with LP tutorial
480
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.
3101.2.3 by Ian Clatworthy
chapter -> tutorial fix
484
5278.1.6 by Martin Pool
More 'open source' occurrences
485
While designed as a free service to support free software projects,
3101.2.3 by Ian Clatworthy
chapter -> tutorial fix
486
Canonical may make Launchpad available to commercial software developers
487
depending on their requirements. We would be happy to hear from you
5278.1.6 by Martin Pool
More 'open source' occurrences
488
if you think Launchpad would be useful for managing your community.