[darcs-users] Setting up common ancestry between unrelated but identical files so patches can be shared between them

Asfand Yar Qazi ayqazi at gmail.com
Tue Nov 13 12:14:46 UTC 2007


On 13/11/2007, Ketil Malde <ketil.malde at bccs.uib.no> wrote:
> "Asfand Yar Qazi" <ayqazi at gmail.com> writes:
>
> > Where I work, we're in a bit of a predicament.  We've been using
> > subversion for a long time, and maintain 2 different products that
> > both sell stuff using a common 'ordering model' that is mostly shared
> > between them by way of a third repository - lets call it 'the lib' -
> > with the use of externals.
>
> > Any idea how this can be made to work?  Thanks
>
> It seems to me the most obvious solution would be to use two repos for
> each project, separating the 'lib' and application, so that patches
> can be shared for the common 'lib' part.
>
> Or you could start with repos containing just 'lib' for each
> application, and add the application specific stuff to each separate
> project.  You'd need to be careful so that no patches intended to be
> pulled by the other project incorporated hunks relating to the
> applicaiton specific parts (or it'd pull with it the whole thing).
>

We actually want to forget about 'lib' sharing, and just make a
'reference' application that every app we develop has in some way been
cloned from and had bits added to them.

We use Ruby on Rails engines for 'lib', so and defines a file
containing a class with some methods in it, and the application can
create a new file of the same name in its own directory, redefine the
class and effectively add new methods to it or override existing ones.
 We want darcs to take over this role, so the 'reference application'
will have all common methods in one file, the applications will add
patches that add/remove/replace methods, and common methods can be
shared between applications.


More information about the darcs-users mailing list