One big working tree or many small ones?

Asked by Stephen

I am just starting to use Bazaar (so sorry for what I'm sure is a stupid question!), and am setting up version control for Python codes
I'll be working on over the next 3+ years of my PhD.

The problem I have is I'm not sure if it's best to set up one big working tree or many smaller ones. I tend to house all my codes in a parent directory (e.g. something like "Codes" which contains "Project 1", "Project 2", "Utilities", etc. which themselves may house subdirectories/subprojects). So my instinct was to version control from the parent down in one big working tree so that I can branch the whole thing if I want to work at home, etc.

However I'm not sure if this is actually a bad thing to do? Is there any downsides to how I'm doing it?

Sorry if this is a really stupid question, has been asked before (I did try searching for previous similar questions) or is unclear (just ask and I'd happily clear up any points raised).

Thanks in advance to any and all who help out a Bazaar newbie!

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Stephen
Solved:
Last query:
Last reply:
Revision history for this message
Vincent Ladeuil (vila) said :
#1

There is no perfect answer to that problem ;) It really depends on what workflow you want to use and who you will be working with.

Handling several subprojects instead of a big one means you'll have to commit in the subprojects before committing in the big one.

That's what 'Nested trees' is about for bzr but it hasn't been implemented in core, 'externals' and 'scmproj' (from
http://wiki.bazaar.canonical.com/BzrPlugins) are two attempts to address this feature in plugins.

Long story short: start with a single project, experiment and find the best workflow for your use cases (work from home, office, sync between the two, etc).

Once you become familiar with the various pitfalls (oops, I committed in the big project at home but forgot to commit in one subproject and now the code at work is broken, kind of things) you'll get a better idea of what you want to use.

Revision history for this message
Stephen (welshstephen) said :
#2

Thank you very much for the help!

Revision history for this message
Vnnere Fenners (ennererh) said :
#3

The problem I have is I'm not sure if it's best to set up one big working tree or many smaller ones. I tend to house all my codes in a parent directory (e.g. something like "Codes" which contains "Project 1", "Project 2", "Utilities", etc. which themselves may house subdirectories/subprojects). So my instinct was to version control from the parent down in one big working tree so that I can branch the whole thing if I want to work at home, etc.

There are other benefits of branching as well such as being able to roll back and undo changes made, etc., but in general, this method seems more straightforward for me, especially since I tend not to work on more than two https://sectionpedia.com/complain-about-a-section-8-neighbor/ projects at once anyway (although in some cases I do).

I also have a new project coming along that's a little more complex than what I've been working with so maybe branching will help me keep track of things better there too...