/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/developers/HACKING.txt

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-09-06 04:32:36 UTC
  • mfrom: (2800.1.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070906043236-6mcj3cqvtl3i58t8
Document core developer tasks in HACKING

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
(The current version of this document is available in the file 
8
8
``doc/developers/HACKING.txt`` in the source tree, or at
9
 
http://doc.bazaar-vcs.org/bzr.dev/developers/HACKING.html)
 
9
http://doc.bazaar-vcs.org/bzr.dev/en/developer-guide/HACKING.html)
10
10
 
11
11
 
12
12
Getting Started
1287
1287
http://bazaar-vcs.org/BzrWin32Installer
1288
1288
 
1289
1289
 
 
1290
Core Developer Tasks
 
1291
####################
 
1292
 
 
1293
Overview
 
1294
========
 
1295
 
 
1296
What is a Core Developer?
 
1297
-------------------------
 
1298
 
 
1299
While everyone in the Bazaar community is welcome and encouraged to
 
1300
propose and submit changes, a smaller team is reponsible for pulling those
 
1301
changes together into a cohesive whole. In addition to the general developer
 
1302
stuff covered above, "core" developers have responsibility for:
 
1303
 
 
1304
* reviewing changes
 
1305
* reviewing blueprints
 
1306
* planning releases
 
1307
* managing releases.
 
1308
 
 
1309
.. note::
 
1310
  Removing barriers to community participation is a key reason for adopting
 
1311
  distributed VCS technology. While DVCS removes many technical barriers,
 
1312
  a small number of social barriers are often necessary instead.
 
1313
  By documenting how the above things are done, we hope to
 
1314
  encourage more people to participate in these activities, keeping the
 
1315
  differences between core and non-core contributors to a minimum.
 
1316
 
 
1317
 
 
1318
The Development Lifecycle
 
1319
-------------------------
 
1320
 
 
1321
As a rule, Bazaar development follows a 4 week cycle:
 
1322
 
 
1323
* 2 weeks - general changes
 
1324
* 1 week - feature freeze
 
1325
* 1 week+ - Release Candidate stabilization
 
1326
 
 
1327
During the FeatureFreeze week, the trunk (bzr.dev) is open in a limited
 
1328
way: only low risk changes, critical and high priority fixes are accepted
 
1329
during this time. At the end of FeatureFreeze, a branch is created for the
 
1330
first Release Candidate and the trunk is reopened for general development
 
1331
on the *next* release. A week or so later, the final release is packaged
 
1332
assuming no serious problems were encountered with the one or more Release
 
1333
Candidates.
 
1334
 
 
1335
.. note::
 
1336
  There is a one week overlap between the start of one release and
 
1337
  the end of the previous one.
 
1338
 
 
1339
 
 
1340
Communicating and Coordinating
 
1341
------------------------------
 
1342
 
 
1343
While it has many advantages, one of the challenges of distributed
 
1344
development is keeping everyone else aware of what you're working on.
 
1345
There are numerous ways to do this:
 
1346
 
 
1347
#. Assign bugs to yourself in Launchpad
 
1348
#. Mention it on the mailing list
 
1349
#. Mention it on IRC
 
1350
 
 
1351
As well as the email notifcations that occur when merge requests are sent
 
1352
and reviewed, you can keep others informed of where you're spending your
 
1353
energy by emailing the **bazaar-commits** list implicitly. To do this,
 
1354
install and configure the Email plugin. One way to do this is add these
 
1355
configuration settings to your central configuration file (e.g.
 
1356
``~/.bazaar/bazaar.conf`` on Linux)::
 
1357
 
 
1358
  [DEFAULT]
 
1359
  email = Joe Smith <joe.smith@internode.on.net>
 
1360
  smtp_server = mail.internode.on.net:25
 
1361
 
 
1362
Then add these lines for the relevant branches in ``locations.conf``::
 
1363
 
 
1364
  post_commit_to = bazaar-commits@lists.canonical.com
 
1365
  post_commit_mailer = smtplib
 
1366
 
 
1367
While attending a sprint, RobertCollins' Dbus plugin is useful for the
 
1368
same reason. See the documentation within the plugin for information on
 
1369
how to set it up and configure it.
 
1370
 
 
1371
 
 
1372
Reviewing Changes
 
1373
=================
 
1374
 
 
1375
Setting Up Your Workspace for Reviews
 
1376
-------------------------------------
 
1377
 
 
1378
TODO: Incorporate John Arbash Meinel's detailed email to Ian C on the
 
1379
numerous ways of setting up integration branches.
 
1380
 
 
1381
 
 
1382
The Review Checklist
 
1383
--------------------
 
1384
 
 
1385
See `A Closer Look at the Merge & Review Process`_
 
1386
for information on the gates used to decide whether code can be merged
 
1387
or not and details on how review results are recorded and communicated.
 
1388
 
 
1389
 
 
1390
The Importance of Timely Reviews
 
1391
--------------------------------
 
1392
 
 
1393
Good reviews do take time. They also regularly require a solid
 
1394
understanding of the overall code base. In practice, this means a small
 
1395
number of people often have a large review burden - with knowledge comes
 
1396
responsibility. No one like their merge requests sitting in a queue going
 
1397
nowhere, so reviewing sooner rather than later is strongly encouraged.
 
1398
 
 
1399
 
 
1400
Submitting Changes
 
1401
==================
 
1402
 
 
1403
An Overview of PQM
 
1404
------------------
 
1405
 
 
1406
Of the many workflows supported by Bazaar, the one adopted for Bazaar
 
1407
development itself is known as "Decentralized with automatic gatekeeper".
 
1408
To repeat the explanation of this given on
 
1409
http://bazaar-vcs.org/Workflows:
 
1410
 
 
1411
.. pull-quote::
 
1412
  In this workflow, each developer has their own branch or
 
1413
  branches, plus read-only access to the mainline. A software gatekeeper
 
1414
  (e.g. PQM) has commit rights to the main branch. When a developer wants
 
1415
  their work merged, they request the gatekeeper to merge it. The gatekeeper
 
1416
  does a merge, a compile, and runs the test suite. If the code passes, it
 
1417
  is merged into the mainline.
 
1418
 
 
1419
In a nutshell, here's the overall submission process:
 
1420
 
 
1421
#. get your work ready (including review except for trivial changes)
 
1422
#. push to a public location
 
1423
#. ask PQM to merge from that location
 
1424
 
 
1425
.. note::
 
1426
  At present, PQM always takes the changes to merge from a branch
 
1427
  at a URL that can be read by it. For Bazaar, that means a public,
 
1428
  typically http, URL.
 
1429
 
 
1430
As a result, the following things are needed to use PQM for submissions:
 
1431
 
 
1432
#. A publicly available web server
 
1433
#. Your OpenPGP key registered with PQM (contact RobertCollins for this)
 
1434
#. The PQM plugin installed and configured (not strictly required but
 
1435
   highly recommended).
 
1436
 
 
1437
 
 
1438
Selecting a Public Branch Location
 
1439
----------------------------------
 
1440
 
 
1441
If you don't have your own web server running, branches can always be
 
1442
pushed to Launchpad. Here's the process for doing that:
 
1443
 
 
1444
Depending on your location throughout the world and the size of your
 
1445
repository though, it is often quicker to use an alternative public
 
1446
location to Launchpad, particularly if you can set up your own repo and
 
1447
push into that. By using an existing repo, push only needs to send the
 
1448
changes, instead of the complete repository every time. Note that it is
 
1449
easy to register branches in other locations with Launchpad so no benefits
 
1450
are lost by going this way.
 
1451
 
 
1452
.. note::
 
1453
  For Canonical staff, http://people.ubuntu.com/~<user>/ is one
 
1454
  suggestion for public http branches. Contact your manager for information
 
1455
  on accessing this system if required.
 
1456
 
 
1457
It should also be noted that best practice in this area is subject to
 
1458
change as things evolve. For example, once the Bazaar smart server on
 
1459
Launchpad supports server-side branching, the performance situation will
 
1460
be very different to what it is now (Jun 2007).
 
1461
 
 
1462
 
 
1463
Configuring the PQM Plug-In
 
1464
---------------------------
 
1465
 
 
1466
While not strictly required, the PQM plugin automates a few things and
 
1467
reduces the chance of error. Before looking at the plugin, it helps to
 
1468
understand  a little more how PQM operates. Basically, PQM requires an
 
1469
email indicating what you want it to do. The email typically looks like
 
1470
this::
 
1471
 
 
1472
  star-merge source-branch target-branch
 
1473
 
 
1474
For example::
 
1475
 
 
1476
  star-merge http://bzr.arbash-meinel.com/branches/bzr/jam-integration http://bazaar-vcs.org/bzr/bzr.dev
 
1477
 
 
1478
Note that the command needs to be on one line. The subject of the email
 
1479
will be used for the commit message. The email also needs to be ``gpg``
 
1480
signed with a key that PQM accepts.
 
1481
 
 
1482
The advantages of using the PQM plugin are:
 
1483
 
 
1484
#. You can use the config policies to make it easy to set up public
 
1485
   branches, so you don't have to ever type the full paths you want to merge
 
1486
   from or into.
 
1487
 
 
1488
#. It checks to make sure the public branch last revision matches the
 
1489
   local last revision so you are submitting what you think you are.
 
1490
 
 
1491
#. It uses the same public_branch and smtp sending settings as bzr-email,
 
1492
   so if you have one set up, you have the other mostly set up.
 
1493
 
 
1494
#. Thunderbird refuses to not wrap lines, and request lines are usually
 
1495
   pretty long (you have 2 long URLs in there).
 
1496
 
 
1497
Here are sample configuration settings for the PQM plugin. Here are the
 
1498
lines in bazaar.conf::
 
1499
 
 
1500
  [DEFAULT]
 
1501
  email = Joe Smith <joe.smith@internode.on.net>
 
1502
  smtp_server=mail.internode.on.net:25
 
1503
 
 
1504
And here are the lines in ``locations.conf`` (or ``branch.conf`` for
 
1505
dirstate-tags branches)::
 
1506
 
 
1507
  [/home/joe/bzr/my-integration]
 
1508
  push_location = sftp://joe-smith@bazaar.launchpad.net/%7Ejoe-smith/bzr/my-integration/
 
1509
  push_location:policy = norecurse
 
1510
  public_branch = http://bazaar.launchpad.net/~joe-smith/bzr/my-integration/
 
1511
  public_branch:policy = appendpath
 
1512
  pqm_email = Bazaar PQM <pqm@bazaar-vcs.org>
 
1513
  pqm_branch = http://bazaar-vcs.org/bzr/bzr.dev
 
1514
 
 
1515
Note that the push settings will be added by the first ``push`` on
 
1516
a branch. Indeed the preferred way to generate the lines above is to use
 
1517
``push`` with an argument, then copy-and-paste the other lines into
 
1518
the relevant file.
 
1519
 
 
1520
 
 
1521
Submitting a Change
 
1522
-------------------
 
1523
 
 
1524
Here is one possible recipe once the above environment is set up:
 
1525
 
 
1526
#. pull bzr.dev => my-integration
 
1527
#. merge patch => my-integration
 
1528
#. fix up any final merge conflicts (NEWS being the big killer here).
 
1529
#. commit
 
1530
#. push
 
1531
#. pqm-submit
 
1532
 
 
1533
.. note::
 
1534
  The ``push`` step is not required if ``my-integration`` is a checkout of
 
1535
  a public branch.
 
1536
 
 
1537
  Because of defaults, you can type a single message into commit and
 
1538
  pqm-commit will reuse that.
 
1539
 
 
1540
 
 
1541
Tracking Change Acceptance
 
1542
--------------------------
 
1543
 
 
1544
The web interface to PQM is https://pqm.bazaar-vcs.org/. After submitting
 
1545
a change, you can visit this URL to confirm it was received and placed in
 
1546
PQM's queue.
 
1547
 
 
1548
When PQM completes processing a change, an email is sent to you with the
 
1549
results.
 
1550
 
 
1551
 
 
1552
Reviewing Blueprints
 
1553
====================
 
1554
 
 
1555
Blueprint Tracking Using Launchpad
 
1556
----------------------------------
 
1557
 
 
1558
New features typically require a fair amount of discussion, design and
 
1559
debate. For Bazaar, that information is often captured in a so-called
 
1560
"blueprint" on our Wiki. Overall tracking of blueprints and their status
 
1561
is done using Launchpad's relevant tracker,
 
1562
https://blueprints.launchpad.net/bzr/. Once a blueprint for ready for
 
1563
review, please announce it on the mailing list.
 
1564
 
 
1565
Alternatively, send an email begining with [RFC] with the proposal to the
 
1566
list. In some cases, you may wish to attach proposed code  or a proposed
 
1567
developer document if that best communicates the idea. Debate can then
 
1568
proceed using the normal merge review processes.
 
1569
 
 
1570
 
 
1571
Recording Blueprint Review Feedback
 
1572
-----------------------------------
 
1573
 
 
1574
Unlike its Bug Tracker, Launchpad's Blueprint Tracker doesn't currently
 
1575
(Jun 2007) support a chronological list of comment responses. Review
 
1576
feedback can either be recorded on the Wiki hosting the blueprints or by
 
1577
using Launchpad's whiteboard feature.
 
1578
 
 
1579
 
 
1580
Planning Releases
 
1581
=================
 
1582
 
 
1583
Roadmaps
 
1584
--------
 
1585
 
 
1586
As the two senior developers, Martin Pool and Robert Collins coordinate
 
1587
the overall Bazaar product development roadmap. Core developers provide
 
1588
input and review into this, particularly during sprints. It's totally
 
1589
expected that community members ought to be working on things that
 
1590
interest them the most. The roadmap is valuable though because it provides
 
1591
context for understanding where the product is going as a whole and why.
 
1592
 
 
1593
 
 
1594
Using Releases and Milestones in Launchpad
 
1595
------------------------------------------
 
1596
 
 
1597
TODO ... (Exact policies still under discussion)
 
1598
 
 
1599
 
 
1600
Bug Triage
 
1601
----------
 
1602
 
 
1603
Keeping on top of bugs reported is an important part of ongoing release
 
1604
planning. Everyone in the community is welcome and encouraged to raise
 
1605
bugs, confirm bugs raised by others, and nominate a priority. Practically
 
1606
though, a good percentage of bug triage is often done by the core
 
1607
developers, partially because of their depth of product knowledge.
 
1608
 
 
1609
With respect to bug triage, core developers are encouraged to play an
 
1610
active role with particular attention to the following tasks:
 
1611
 
 
1612
* keeping the number of unconfirmed bugs low
 
1613
* ensuring the priorities are generally right (everything as critical - or
 
1614
  medium - is meaningless)
 
1615
* looking out for regressions and turning those around sooner rather than later.
 
1616
 
 
1617
.. note::
 
1618
  As well as prioritizing bugs and nominating them against a
 
1619
  target milestone, Launchpad lets core developers offer to mentor others in
 
1620
  fixing them. Nice.
 
1621
 
 
1622
 
 
1623
Managing a Release
 
1624
==================
 
1625
 
 
1626
Starting a Release
 
1627
------------------
 
1628
 
 
1629
TODO: Things to cover:
 
1630
 
 
1631
* RFI on release objectives
 
1632
* RFI on higher risk things that are best done early, e.g. changes to file
 
1633
  format defaults
 
1634
* Communication of proposed dates
 
1635
 
 
1636
 
 
1637
Weekly Status Updates
 
1638
---------------------
 
1639
 
 
1640
TODO: Things to cover:
 
1641
 
 
1642
* Early communication to downstream teams (e.g. Launchpad) about changes in dependencies.
 
1643
* Reminder re lifecycle and where we're up to right now
 
1644
* Summary of recent successes and pending work
 
1645
* Reminder re release objectives
 
1646
* Reminder re things needing attention, e.g. bug triage, reviews, testing of certain things, etc.
 
1647
 
 
1648
 
 
1649
Feature Freeze
 
1650
--------------
 
1651
 
 
1652
TODO: Get material from http://bazaar-vcs.org/FeatureFreeze.
 
1653
 
 
1654
 
 
1655
Release Candidates
 
1656
------------------
 
1657
 
 
1658
TODO: Get material from http://bazaar-vcs.org/ReleaseChecklist and clean
 
1659
it up to make it clearer what the RC vs final vs both tasks are.
 
1660
 
 
1661
 
 
1662
The Final Release
 
1663
-----------------
 
1664
 
 
1665
TODO: Get material from http://bazaar-vcs.org/ReleaseChecklist and clean
 
1666
it up to make it clearer what the RC vs final vs both tasks are.
 
1667
 
1290
1668
..
1291
1669
   vim: ft=rst tw=74 ai