BK kernel workflow

Jeff Garzik
2004-10-19T16:09:54Z

Although tangential to the problem, I thought LKML and BitMover (and
maybe Andrew or Linus as well) might be interested in a general
description of my workflow.

For net drivers in the Linux kernel, there exists two patch queues,
net-drivers-2.6 and netdev-2.6 (and corresponding 2.4 versions).
net-drivers-2.6 could be described as the "upstream immediately" or "for
Linus" queue, and netdev-2.6 could be described as the "testing" queue.

When receive a patch from some random person on the Internet, fixing a
net driver bug in the "8139too" driver, I do

1) create "topic-specific" repo, if it doesn't already exist

Key point: when dealing with a large number of incoming changes, like I
do, sorting the changes locally into logically separate _sets of
changes_ (one set per repo) has a lot of advantages, given that
BitKeeper doesn't allow changeset "cherrypicking".

cd /spare/repo/netdev-2.6 # not a repo, just a subdir
bk clone -ql ../linux-2.6 8139too

2) move the email containing the patch, in my MUA, to 25_Patches mbox

3) merge the patch into the topic-specific repo, using Linus's patch
importing tools,

cd 8139too && dotest < /garz/nsmail/25_Patches

4) pull the topic-specific repo into "collector" repo, and merge conflicts

cd ALL && bk pull ../8139too

5) build and test 'ALL' repo [heh... usually...]

6) push 'ALL' to external netdev-2.6 repos on gkernel.bkbits.net and
kernel.bkbits.net

7) Andrew's workflow includes automatically pulling netdev-2.6 repo into
his more-experimental "-mm" tree for wider review and testing.

[time passes]

8) Linus and Andrew release the latest and greatest 2.6.N stable release.

9) every day or so, I 'bk pull' a few "topic-specific" repos into a
local clone of net-drivers-2.6, test that, and send it off to Linus/Andrew.

Key point: thanks to the daily snapshots, my changes show up broken up
across several daily snapshots, rather than "one big huge lump of
changes that's been waiting to go in".

cd /spare/repo
bk clone -ql linux-2.6 net-drivers-2.6
bk pull ../netdev-2.6/8139too
bk pull ../netdev-2.6/viro-sparse-annotations
bk pull ../netdev-2.6/janitor
bk pull ../netdev-2.6/misc
bk push && bk push kernel.bkbits.net:net-drivers-2.6

# and then email Linus/Andrew the output of
# bk-make-sum + gcapatch (see Documentation/BK-usage)