Hi,
I’ve been testing BitKeeper on several git mirrors using fast-import
, and it’s working quite well! I’ve also been using this opportunity to use Nested repositories, and I have a question.
The LLVM project is really a collection of nested repositories, that require a specific organization to build. It looks like this (where each entry is actually a separate repository as of now):
./llvm # top-level LLVM repository
./llvm/projects/openmp # OpenMP library
./llvm/projects/compiler-rt # Runtime library
./llvm/tools/clang # Clang compiler
./llvm/tools/polly # Polly optimizer
./llvm/tools/lldb # Debugger
... etc ...
So this seems like a perfect opportunity for nested repositories. I used fast-import
on some git mirrors (https://github.com/llvm-mirror, a mirror of their SVN, i.e. no octo-merges the importer fails on, etc) and have a collection of non-nested repositories now, but there’s a minor snag:
How do I turn the top level llvm
repository into a product? The documentation says this needs to be done with bk setup -P
to specifically mark the repository as a product, but the importer doesn’t allow you to do this on a repository it creates.
One trick I thought up was to use bk partition
with a components file that was:
-
Empty (e.g. implicitly collected all paths into the product)
-
Only had the entry “
.
” (no quotes), i.e. the explicit collection of all paths into the product. -
Only had the entry “
/
” (no quotes), i.e. the explicit collection of all paths into the product (part 2, electric boogaloo).
All three of these failed in a few various ways; I don’t have the errors on hand, but I’ll report back with them shortly.
Naturally, as an obvious workaround I can do this (assuming fresh imports are under /srv/repos/bk/llvm/*
):
$ bk setup -P llvm.nested
$ cd llvm.nested
$ bk attach /srv/repos/bk/llvm/llvm && cd llvm/projects
$ bk attach /srv/repos/bk/llvm/compiler-rt && cd ..
$ bk attach /srv/repos/bk/llvm/openmp && cd ../tools
$ bk attach /srv/repos/bk/llvm/clang && cd ../
$ bk attach /srv/repos/bk/llvm/lldb && cd ../
$ ... etc etc ...
And this works great, although it means I have to cd
into the top level repository under llvm
first.
In the mean time: is there any way to work around this?
And: as a convenient feature request, it would be great if fast-import
could mark a repository as a product. (If this is easy, I could try to write a patch myself.)