darcs-beta- a distributed, interactive, smart revision control system




data IsConflictedPrim whereSource


IsC :: !ConflictState -> !Prim -> IsConflictedPrim 

data Perhaps a Source


Succeeded a 

isSimilar :: Prim -> Prim -> BoolSource

Tells you if two patches are in the same category, human-wise. Currently just returns true if they are filepatches on the same file.

sortCoalesceFL :: FL Prim -> FL PrimSource

sortCoalesceFL ps coalesces as many patches in ps as possible, sorting the results according to the scheme defined in comparePrim

canonizeFL :: FL Prim -> FL PrimSource

canonizeFL ps puts a sequence of primitive patches into canonical form. Even if the patches are just hunk patches, this is not necessarily the same set of results as you would get if you applied the sequence to a specific tree and recalculated a diff.

Note that this process does not preserve the commutation behaviour of the patches and is therefore not appropriate for use when working with already recorded patches (unless doing amend-record or the like).

class FromPrims p whereSource


fromPrims :: FL Prim -> pSource

joinPatches :: FL p -> pSource


class FromPrim p => ToFromPrim p whereSource


toPrim :: p -> Maybe PrimSource

class (Invert p, Commute p, Effect p) => Conflict p whereSource


listConflictedFiles :: p -> [FilePath]Source

resolveConflicts :: p -> [[Sealed (FL Prim)]]Source

commuteNoConflicts :: (p :> p) -> Maybe (p :> p)Source

If commuteNoConflicts x :> y succeeds, we know that that x commutes past y without any conflicts. This function is useful for patch types for which commute is defined to always succeed; so we need some way to pick out the specific cases where commutation succeeds without any conflicts.

Consider the commute square with patch names written in capital letters and repository states written in small letters.

       |     |
    Y' v     v Y
       |     |

The default definition of this function checks that we can mirror the commutation with patch inverses (written with the negative sign)

         -X     X
       |     |     |
   Y'' v  Y' v     v Y
       |     |     |
         (-X)'  X'

We check that commuting X and Y succeeds, as does commuting -X and Y'. It also checks that Y'' == Y and that -(X') is the same as (-X)'

conflictedEffect :: p -> [IsConflictedPrim]Source

isInconsistent :: p -> Maybe DocSource

class Effect p whereSource

Patches whose concrete effect which can be expressed as a list of primitive patches.

A minimal definition would be either of effect or effectRL.