What is the recommended workflow and repository layout for single developers?

Asked by Timmie

I am mostly working on my own projects without any collaboration on the coding side. The projects are rather small and mostly script orientated: I use some high-level languages (Python, IDL) to process scientific data. Nevertheless, I need a good and efficient source code management and want to use Bazaar which seems to be one of the easiest around. I have some questions regarding my workflow and repository (repo) layout.
** Should I have a repo in every directory where some development is taking place?
** How can I version all projects independantly and still keep the number of .bzr directories / repos to a minimum?
** I used to have one repo on the toplevel of my devel directory. Does this allow to version projects indepentantly?

Question information

English Edit question
Bazaar Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
John A Meinel (jameinel) said :

There are certainly a few ways to answer this. The ideal workflow that we have in mind has not quite been finished yet:

The idea with http://bazaar-vcs.org/NestedTrees is that you can have a project made up of subprojects. We have the internal infrastructure to support it, but we don't have all of the commands (push/pull/branch/etc need to be revised to handle when the branch is an aggregate branch).

In general, Bazaar (and pretty much all of the distributed VCSes) version the entire tree as a single entity. You might consider it a "project". So if you have libraries, etc, that you want to share between projects, then they would be considered a separate project.

If you work that out after the fact, we have written the "bzr split" command, which takes an existing tree, and 'splits' out a subdirectory into its own versioned branch.

I would also recommend having an overall Shared Repository (http://bazaar-vcs.org/SharedRepository) at the top, so that any branches you do create end up sharing storage.

Also, there is a slight terminology mismatch between DVCS. Bazaar considers a repository as only the location where data is stored, other systems mix that term with where your working files are, and where the branch pointers are. In Bazaar, the Repository doesn't have to be in the same location as the Branch or Working Tree, which is how you can have multiple Branches sharing the same Repository.

So your question of "should I have a repo in every directory..." is actually (in Bazaar terms) "should I have a separate Branch in every directory...".

Revision history for this message
Timmie (timmie) said :

> If you work that out after the fact, we have written the "bzr split" command, which takes an existing tree, and 'splits' out a subdirectory into its own versioned branch.

Where can I find this split command?

I cuurently have the following format:

$bzr info development
Standalone tree (format: dirstate)
  branch root: development

How do I convert this into a shared repository?

Revision history for this message
Martin Pool (mbp) said :

To move a branch into a shared directory, make a repository directory and branch into it, eg

  bzr init-repo ~/repo
  bzr branch ~/standalonebranch ~/repo/branch

then the revision data will be stored in ~/repo/.bzr, and used by all branches under that directory.

The 'split' command is built in to bzr -- see 'bzr help split'.

Revision history for this message
jpfle (jpfle) said :

I have a question about it too. I want to familiarise with code structure for programming. I start with very little projects to learn. There's a point that I don't understand. Suppose that I have a little shell program: 2 or 3 .sh files, a default .config file, an icon... How can I structure all this for development and testing? For example, programs are often installed in /usr/bin, user config files in ~/.program, icon in /usr/share/pixmaps... How can I put all these files of my program in the same place to develop it, test it and then manage its versions with bzr?


Can you help with this problem?

Provide an answer of your own, or ask Timmie for more information if necessary.

To post a message you must log in.