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