views:

161

answers:

2

I develop in Windows, C language using Codeblocks. Last week I started to use darcs.

My application has 20 source code files. I am the only developer; it is a home project. What I usually have is a main version, and then have a few branches in parallel which are those I am coding in that moment. When I have finished a feature and have tested it, then I add it to main version as a patch.

Let me explain the environment I work:

I have the main repository in my USB stick with the current state of the develop, tagged when last release was made. Then, I have in my d: unit as many directories as features I am developing in parallel. Each directory is a copy of the last-released version with new changes.

I am forced to create a project from Codeblocks ide each time I setup a new branch/feature code for each directory, so I have multiple projects in Codeblocks. I don't know if this is the best practice. Is there any way to only have a directory with any option to switch between "current feauture develop version"? What are the best practices here? Do you record non-code files (those generated by ide)?

Is creating a Codeblock project for each branch the way to do it?

+2  A: 

I don't know anything about Codeblocks, but as far as darcs is concerned it's feasible, but not necessarily easy, to just work in a single directory. The way I would accomplish this is with a tag; while working on feature X I would regularly tag with 'featureX' (reusing the same tag name each time). Then when you want to switch feature, push all your patches somewhere central, obliterate back to the last tagged release, then pull all the patches for 'featureY'.

If features X and Y are likely to have significant numbers of conflicts during the development process then make sure to use darcs 2 format repositories as the central repository will perform much better in this scenario. Also, make sure you record all your current work before switching features.

As an alternative to tagging and one central repository, you can keep each feature in a different directory.

I would record any file that is not auto-generated, if it logically belongs with my code.

Ganesh Sittampalam
A: 

I'm using Netbeans for PHP and Python projects, using one project pr. branch/version (this works OK as I only have a few branches open at a time).

I don't record generated project files.

martineg