/brz/remove-bazaar

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