[darcs-users] several variants and developers at the same time

Thomas Hafner thomas at hafner.NL.EU.ORG
Sun Nov 19 18:12:46 UTC 2006


Hello darcs users,

how can variants handled with darcs? What's a resonable workflow, if
there at least two developers are involved?

Here's a very simple example with only two source files:
- settings.h has different content for customers A and B.
- foo.c never depends on the customer (no variants, but just the same
  revision history for all customers).

I'll try to guess how it could be, please correct me if I'm wrong.

First of all there should be a main repository. I call it ``trunk'':
trunk/settings.h: template for future variants (e.g. customer C).
trunk/foo.c: common source for all variants.

Then there should be a branch for customer A. I call it
``branches/A'':
branches/A/settings.h: special variant for customer A.
branches/A/foo.c: copy of trunk/foo.c

Then there should be a branch for customer B. I call it
``branches/B'':
branches/B/settings.h: special variant for customer B.
branches/B/foo.c: copy of trunk/foo.c

The repositories trunk, branches/A and branches/B do not yet reflect,
that there is more than one developer, i.e. dev1 and dev2. Every
developer should have his private repositories. Maybe like this:

/home/dev1/trunk
/home/dev1/branches/A
/home/dev1/branches/B
/home/dev2/trunk
/home/dev2/branches/A
/home/dev2/branches/B

If these steps has to be done in that order ...
  1. dev1 modifies settings.h for customer A and foo.c
  2. dev2 modifies settings.h for customer B and foo.c
  3. dev1 modifies settings.h for customer B and foo.c
  4. dev2 modifies settings.h for customer A and foo.c
... and each step depend on the former steps, which darcs-commands
have to be launched exactly to achieve versioning, integration and
propagation correctly?

Regards
  Thomas





More information about the darcs-users mailing list