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

Nimrod A. Abing nimrod.abing at gmail.com
Wed Nov 22 02:06:38 UTC 2006


On 11/21/06, Ben Hood <Ben.Hood at voca.com> wrote:
> Hi,
>
> I'm new to darcs and am interested in this scenario as well.
>
> What if you did all of your common work in a parent repository and then
> cloned this to a child where you implement the specifics?

This is no different from my presented scenario earlier in this thread.

http://www.abridgegame.org/pipermail/darcs-users/2006-November/010634.html

> If and when you want to push back changes to the parent, can't you just
> cherry pick what should go back?

To make cherry picking easier, I recommend prefixing patch names for
local changes with something. In my case, I maintain a database of
client numbers. So patches for local changes that are specific to a
client (or project) get prefixed with something like:

C0001: <patch name here>

Then when I push I do:

darcs push --matches="not name C0001:"

This will make darcs ignore patches with the prefix during the push.
Of course this will break if one of your patches to your common source
tree depend on any of the "local" changes you made so you should make
sure that this does not happen in the first place. In this case, darcs
will not push anything that depends on the local patch due to the
---matches option you specified.

You could also do the reverse of what I am doing. That is, prefix
patch names for changes that should go into your common code base
(e.g., MAIN:). Then do:

darcs push --matches="name MAIN:"

But then this will make it more difficult to avoid pushing changes
that should stay in your local repository. If any of your patches
depend on a local patch, it will still be pushed into your common code
base.
-- 
_nimrod_a_abing_

[?] http://abing.gotdns.com




More information about the darcs-users mailing list