[darcs-devel] darcs patch: Added mergeFL and mergeFL_FL (and 4 more)

David Roundy droundy at darcs.net
Tue Jul 31 16:23:12 PDT 2007


On Sat, Jul 28, 2007 at 09:44:31PM +0200, Eric Y. Kow wrote:
> Sorry guys,
> 
> I'm not really in a position to review these properly.  I'm just going
> to push these in and take your word for it.

Sounds good.  Most of what would interest me to have reviewed is just that
this code doesn't modify existing behavior.  I'm pretty confident of this,
that if you never generate these new patch types (which darcs won't, yet),
you get no change of behavior, so pushing them in sounds good.

> Out of curiosity, though, what's the difference between :\./: and :\/:?
> Also, what are Marked and Cancelled patches and their relationship with
> Conflicted ones?  Cancelled patches, presumably, are patches which the
> user has de-selected in a conflicting situation.  And what are the
> Marked ones?

:\./: is a type for holding merges that we aren't quite sure we want to
actually use, Jason and I are doing some slightly exploratory coding here.

Marked patches aren't intended ever to be stored in a repository, it's just
a way for a function to go through a sequence of patches, and indicate
which ones need to be dealt with, so a later function can "deal" with
them.  We could deal with this by creating a [Bool] separately from a
sequence of patches, but that seems a bit ugly to me.  We could also have
created a type

data MarkedOrNot p C(a b) = Marked (p C(a b)) | Unmarked (p C(a b))

but then we'd have to write wrappers for all the commute functions, etc,
which seems to me like it's likely to be inconvenient.  On the other hand,
having an extra constructor is also pretty ugly.  It's just that most of
the code never touches Patch constructors, so the ugliness is pretty well
encapsulated.

Yes, Cancelled patches are ones that have been de-selected and haven't been
re-activated by a dependency.  Conflicted patches are patches that are in
an unresolved conflict.  Conflicted and Cancelled patches behave almost
identically, but are treated differently when computing merges.  A patch
that conflicts with a Conflicted patch is itself in conflict, while a patch
that only conflicts with Cancelled patches is not in conflict.
-- 
David Roundy
Department of Physics
Oregon State University
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.osuosl.org/pipermail/darcs-devel/attachments/20070731/8ba56013/attachment.pgp


More information about the darcs-devel mailing list