Is this possible?
Neil Martinsen-Burrell
nmb at wartburg.edu
Wed May 7 18:02:36 BST 2008
Russel Winder <russel.winder <at> concertant.com> writes:
> I have a central, master Bazaar branch that is being used as a central
> repository instead of using a Subversion repository. I want to extract
> one of the directories (and everything under it as a sub-tree) out into
> a new branch so that the material can be published separately from
> everything else. Clearly it is possible to extract the current state of
> the sub-tree and make that revision 1 of the new branch, i.e. loose the
> history. However, is it possible to extract the history of the sub-tree
> as well as the current state?
Not as far as I know. I have done a similar thing with a single Subversion
repository and a python script to filter a dump file which can then be reloaded
to give the full history of that subdirectory (and everything that ever copied
into it). In fact, I did that before migrating myself to Bazaar so that I
*could* have individual branches for each "project" (where project is a loose
term for an academic who loves version control for grades, exams, papers,
data-processing code, convenience scripts, etc.)
> I am guessing that the answer is no but possibly, i.e. there is no
> simple way of doing it, but one may be able to write a Python program to
> filter the history and changesets from the origjnal branch so as to
> build the required branch of the sub-tree.
>
> Or perhaps this is a sufficiently common thing that someone already has
> the program?
Try the ``bzr split`` command. Judging by the help, it does what you want.
But, I'm not sure how it scales with respect to the history of the other parts
of the branch. Others here will know more accurately. (Or search the mailing
list archives, split comes up with some regularity.)
-Neil
More information about the bazaar
mailing list