Nested Trees and History after Splitting

Alexander Belchenko bialix at ukr.net
Sat Oct 3 13:39:22 BST 2009


A. S. Budden пишет:
> I have just split several parts of my project into separate "library
> modules" that will be used in a number of projects.  However, despite
> the code size being less than 700 k (in one example) and the files
> having only changed about once in the entire project history, the .bzr
> folder is 19 MB.  This is because the 'split' project has taken all of
> the history of the parent project, including the history of all the
> files that have absolutely nothing to do with the library module.
> Given that the modules may be downloaded over the network for lots of
> projects and there may be quite a lot of library modules, this could
> result in quite a long check-out time: if one project requires five of
> the library modules, it'll have to download five copies of the
> original project's history, taking about 100 MB!
> 
> Is there any way to delete all history that doesn't relate to the
> files that are present in the working directory at the moment?

Deleting history means create new incompatible branch. This means that you will be unable to merge
changes between branch with full pre-split history and post-split branch with filtered history.

If you understand this issue and anyway wnat to filter out the unrelated history then you have to
use fast-import plugin for bzr instead of `bzr split` command. Fast-import plugin has filter
feature. But after filtering you'll have totally brand new branch completely unrelated to original.

> On a separate note, I've been reading
> http://bazaar-vcs.org/NestedTreesDesign and we are quite keen to use
> this.  Where we have library modules, they will be kept in a
> particular place on our shared repository but it would be good for the
> projects using those libraries to have a built in way to refer to
> them.  It would be really nice if the project check-out from the
> shared repository automatically grabbed the appropriate version of the
> library modules at the same time.  Obviously this could be bodged with
> a script to retrieve the modules if they're not present when the
> project is compiled, but the "join --reference" thing sounded much
> more promising.  The option "--reference" doesn't seem to be mentioned
> in "bzr help join" though and when I tried it, it just did a
> conventional join (although there was no error about an unsupported
> command).  Am I doing something wrong?

Nested trees feature does not present in bzr yet. There is branch(es) of Aaron Bentley waiting for
merge, but the work on this feature is stalled. Maybe Aaron can say more on this topic.

> Also, are the split and join options likely to go into TortoiseBzr?
> Most of my coworkers prefer GUIs and if we are going to switch from
> the hideous PVCS to the wonderful Bazaar, they'll probably need to do
> everything in GUI land!

I think split and join are very rare operations so unlikely you will need special GUI to use them.
Native nested trees after join worked as usual branches, so all operations will be transparent.

> Thanks in advance,

Because I need some sort of nested trees and I can't wait, I've wrote scmproj plugin with emulation
of nested trees behavior. It's unrelated to native nested trees. But AFAIK nobody but me and my
company using this plugin today. IIUC, other people waiting for native support.




More information about the bazaar mailing list