[darcs-users] Patch Theory in action
David Roundy
droundy at jdj5.mit.edu
Fri Nov 21 12:38:45 UTC 2003
On Thu, Nov 20, 2003 at 07:57:41AM -0800, Kevin Smith wrote:
> David Roundy wrote:
> >The Change patch didn't depend on the Move patch, since it commutes with
> >the Move patch. In darcs terminology a dependency means that two
> >patches won't commute. So the Change patch depends on the add patch,
> >but not the Move patch--which means you can't pull the Change patch
> >without also pulling the Add patch.
>
> So the pull command effectively evaluates all patches older than the one
> specified to figure out which ones have implied dependencies and which
> ones do not. One simple indication of a dependency relationship between
> two patches is that applying two patches in opposite sequence would
> produce different outcomes.
I wouldn't put it that way. I'd say that you can only pull a patch whose
context is the same as your tree. When you pull a patch that is stored in
a different context on the remote repo, the patch must be commuted until
its context is the same as the contents of your repo (assuming no merging
for the moment).
If your repo is has
CBA
(where A is the first patch) and the remote repo has
EDCBA
if you want to pull E but not D, you need to commute the two of them to get
D'E'CBA
and now E' is a patch that can be applied to your repo (CBA). If this
commute fails, then E depends on D, so you can't pull E unless you first
pull E.
--
David Roundy
http://www.abridgegame.org
More information about the darcs-users
mailing list