Re: Changelogs on kernel.org

Larry McVoy (lm@bitmover.com)
Wed, 15 May 2002 13:34:32 -0700


On Wed, May 15, 2002 at 09:15:37PM +0100, David Woodhouse wrote:
> lm@bitmover.com said:
> > It's probably best if you simply view this as a BK limitation which
> > isn't going away any time soon and don't put junk changesets in the
> > middle of your stream of changes. It's easy enough to export the
> > change you want as a patch, export the comments in the form that bk
> > comments wants, undo the junk changeset, import the patch, and set the
> > comments. Yeah, it's awkward; consider that a feedback loop which
> > encourages you to think a bit more about what you put in the tree.
>
> What it actually encourages is for people to have multiple throwaway trees.
> (Which isn't quite so much of a BK turnoff once you discover compilercache.)

Yup, we use that here, works great.

> If the tree's going to be thrown away anyway, it doesn't matter if it gets
> confused -- how about making it a little easier to backport changesets --
> surely it should be possible to make BK import a changeset iff all the
> affected files are identical in both trees before the changeset?

We've already built all the interfaces you need to do this, so would
you be interested in writing the shell script that does it? The
interfaces you will want:

bk export -tpatch
bk import -tpatch
bk comments
bk changes -v

You'll want this, I believe that you can take the output of this command
and feed it into bk comments and have that be a noop. If that works, this
is what you need to save as the comments part of the patch, and now it's
pretty trivial to move the patch backwards.

bk changes -r+ -vd'### Comments for :GFILE:|+\n$each(:C:){(:C:)\n}'

If you do write this, let me know if you want it included as a "bk backport"
command.

Also note that there is a `bk bin`/bk.script which is a set of shell script
functions. Many BK commands start out their life as

# bk backport - cherry pick a change out of tree A and put it in tree B
# usage: bk backport -r<rev> from to
_backport() {
}

If you start the command with a underscore, then BK will autotranslate that
into a command that you can use like

bk backport ....

If you prefer a standalone command (for licensing reasons, perhaps), then
make it a standalone shell script, put it in `bk bin`, and bk will find it.

-- 
---
Larry McVoy            	 lm at bitmover.com           http://www.bitmover.com/lm 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/