[darcs-users] definition of "depends on"?

Jason Dagit dagit at codersbase.com
Sat Apr 28 22:14:59 UTC 2007


On 4/28/07, Adam Megacz <megacz at cs.berkeley.edu> wrote:
>
> Darcs has a "depends-on" relationship between patches; if patch A
> depends-on patch B, then A cannot be pulled without B.

Each patch has a context in which it can be correctly applied to a
repository.  The context is essentially a sequences of patches which
must be applied for the patch to make sense.  In this case, B is in
the context of A.  I think darcs tries to find a "minimal" context so
that cherry picking is pleasant but much of the time context is
unavoidable.  For example, renaming a file only makes sense if the
file exists.  So a rename patch would have an addfile patch in its
context.  Similarly adding or removing content to a file requires the
file and/or contents to exist.

> This has been causing me a bit of frustration lately.  Is there a
> precise statement anywhere of exactly how darcs decides if one patch
> depends-on another?  Is there any way to "un-depend" one patch from
> another?

I think the only precise statement is to learn about darcs patch
theory.  You can find a section on this subject in the darcs manual:
http://www.darcs.net/manual/node8.html

If you have questions about the material please ask, we can use your
questions to improve the material.

I don't think an un-depend is possible without creating some sort of
stand-in context, which I'm guessing would defeat the purpose of what
you want?

Can you elaborate on the frustration?  Perhaps someone on the list can
offer advice.

I hope that helps,
Jason



More information about the darcs-users mailing list