A branch from a sub-directory?

Gioele gioele at svario.it
Sun Feb 15 15:50:03 GMT 2009

Marius Kruger wrote:
>> Is there a way to create a branch from that directory without bringing in
>> the complete history of the previous branch but only the history of files
>> in that subdirectory?
> maybe `bzr split ...` would do the trick for you:
bzr split requires a rich-root repo, I'll convert my repo after a backup.
BTW, what do you suggest? --rich-root or --1.9-rich-root?

Anyway, there are things I can't understand in the description of bzr split:

> Description:
>   This command will produce a target tree in a format that supports
>   rich roots, like 'rich-root' or 'rich-root-pack'.  These formats cannot
>   be converted into earlier formats like 'dirstate-tags'.
"Will produce a target tree"? What does it mean? I think bzr split is
supposed to produce a new branch containing that tree only, isn't it?

>   The TREE argument should be a subdirectory of a working tree.  That
>   subdirectory will be converted into an independent tree, with its own
>   branch.
What does "independent tree" mean? Will all the history be preserved
or only the part related to that subdirectory?

>   Commits in the top-level tree will not apply to the new subtree.
I think that is obvious, those commits happens in another branch. Why
am I told of it then? Is there something I am missing?

Maybe this [1] suggestion is still valid (with tailor as filter):
  bzr fast-export > dump.txt
  filter dump.txt
  bzr fast-import < dump.txt
[1] https://lists.ubuntu.com/archives/bazaar/2008q2/041664.html

Gioele <gioele at svario.it>

More information about the bazaar mailing list