BitKeeper

How to apply (export/import) a patch in BitKeeper

Posted on December 4th, 2009 by David Luhman and tagged .

Let's say you need to backport a fix from one BitKeeper repository to another. Here's one way to do it. I suppose there are other or better ways to apply a patch, especially if you have a lot of changesets to backport. But if you're limited to a few changesetd, this seems to work for me.

The following documentation is useful :
http://www.bitkeeper.com/Documentation.FAQS.Linux.html

1. Create personal clone of target repository :

 
$ pwd
/usr/me 
$ mkdir target
$ cd target
$ bk clone /share/source/code code

"Local branches" and BitKeeper

Posted on June 24th, 2009 by David Luhman and tagged , .

As far as I know, BitKeeper does not seem to support the notion of "local" (intra-repository) branches.

Git supports these, and I've found them very useful. With Git, you can easily have debug/test branches without the overhead or config issues of an entirely different repo. I've even used one branch per bug so I can have several things in the air before merging them into the master branch.

The only way I can see to do this in BitKeeper is to have separate repos, which wastes disk space and adds the trouble of creating and managing separate directory trees in the file system.

Handling BitKeeper merge conflicts

Posted on June 24th, 2009 by David Luhman and tagged , .

I'm more familiar with Git and its merge process, but I also use BitKeeper and sometimes run into merge conflicts. Here's some info on how to handle them.

Unlike Git, BitKeeper doesn't have the notion of "local" branches, so all merges are from push/pull operations. BitKeeper has a merge command, but it's for merging single files, rather than merging one local branch into another.

Using Git with a legacy BitKeeper backend

Posted on June 8th, 2009 by David Luhman and tagged , .

Let's say that you have a backend build system with BitKeeper dependencies. If you want to do most of your development with Git, while still keeping the BitKeeper backend, here's one way how to do it.

The basic strategy here is to create a new BK repository which will have a git index inside it.

Clone BK repository

$ bk clone /code /home/usr/dkl/repos/code
$ touch /code/mycode/.gitignore
$ bk ignore .gitignore
$ bk ignore 'mycode/.git -prune'
$ bk citool (check in these ignores)