Branches with subsets of total code base

James Blackwell jblack at merconline.com
Mon Mar 6 02:07:08 GMT 2006


Joseph,

One of your projects is neural networks and the other is market
simulation?  Will you be a kind overlord after you've sent Warren Buffet
to the po' house? 

There is a planned mode of operation for Bazaar-NG branches coming in
which one branch is comprised of several branches. I.E.

BranchA/
  BranchB/
  BranchC/

When you get branchA you get branches B and C as well. I'm not quite sure
what will happen when you commit to BranchA. 


On Sun, Mar 05, 2006 at 06:16:21PM +0000, Joseph Wakeling wrote:
> Hello all,
> 
> I'm using bazaar-ng to keep track of the various code projects I have as
> part of my PhD research.  I want to have one huge codebase which covers
> *everything* I've written: the aim here is at some point to be able to
> make all code available via my website.
> 
> However, this will cover a lot of diverse projects, and I would like to
> be able to achieve, not just a "global" codebase, but separate branches
> for individual projects.  The problem is that code for these projects
> overlaps---for example I have random-number-generator modules, and graph
> generation code, which will be reused in different programs.
> 
> So, what I'd like to be able to do is create branches with just a subset
> of code---all that is needed for a given project---but which can push
> and pull revisions for relevant code back and forth from the main code
> base without having to worry about copying over all the other unrelated
> material stored there.
> 
> To what extent is this possible with bazaar-ng?
> 
> To take an example of what I want, here's how my repository is laid out:
> 
> ~/code/   --- home of my main branch.  Code is contained in the two
> following subdirectories:
> ~/code/src/   --- this and its subdirectories contains source code for
> different modules.
> ~/code/main/  --- contains main functions with makefiles etc., which tie
> the different modules together into working programs.
> 
> So, right now I have two projects which are called n0 (a neural network
> project) and MEGa (a financial market simulation).  By itself, n0 uses
> the contents of the following directories:
> 
> ~/code/main/n0/     --- the main program.
> ~/code/src/neuR0/   --- neural network function libraries
> ~/code/src/rng/       --- random number generators
> ~/code/src/error/     --- error recording functions
> 
> (There are a couple of others, but you get the idea.)  On the other hand
> the MEGa project uses,
> 
> ~/code/main/MEGa/
> ~/code/src/MEGa/
> ~/code/src/rng/
> ~/code/src/error/
> 
> Obviously if I'm doing work *just* on n0, or *just* on MEGa, it's a pain
> to have to branch the whole repository.  What I would like to be able to
> do is to create a branch like, n0_experimental, which will contain
> *just* the sources and other stuff needed to edit and test out n0 and
> not (for example) the code in the ~/code/src/MEGa directory.  But I'd
> like to be able to push and pull revisions cleanly back and forth
> between this branch and the main repository which contains not just the
> n0 code but also the MEGa code and others besides.
> 
> If projects were self-contained it would be easy, but I don't know how
> to deal with cases like this where there is code common to two different
> projects.  I *could* just create separate branches within each library's
> personal directory, like ~/code/src/neuR0/ or ~/code/src/rng/ , which
> would just cover that particular library, but I don't want to do that: I
> want branches to contain whole projects which can be compiled, run and
> tested.
> 
> Any suggestions on how to achieve these aims?  Note that I'm not a
> trained software engineer, so it may just be that I need education in
> how to set up projects. :-)
> 
> Many thanks,
> 
>         -- Joe
> 
> 
> 

-- 
My home page:   <a href="http://jblack.linuxguru.net">James Blackwell</a>
Gnupg 06357400  F-print AAE4 8C76 58DA 5902 761D  247A 8A55 DA73 0635 7400
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060305/4b289f5b/attachment.pgp 


More information about the bazaar mailing list