darcs-2.12.5: a distributed, interactive, smart revision control system

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.Index.Types

Synopsis

- data FileId = FileId {
  - cname :: FileName
  - count :: Int
  }
- parseFileId :: String -> FileId
- showFileId :: FileId -> String
- newtype PatchId = PID {
  - patchId :: SHA1
  }
- pid2string :: PatchId -> String
- data DatedFilePath = DatedFilePath FilePath (Maybe PatchId)
- data PatchMod a
  - = PTouch a
  - | PCreateFile a
  - | PCreateDir a
  - | PRename a a
  - | PRemove a
  - | PInvalid a
  - | PDuplicateTouch a
- makePatchID :: PatchInfo -> PatchId
- short :: PatchId -> Word32

# Documentation

data FileId #

The FileId for a file consists of the FilePath (creation name) and an index. The index denotes how many files with the same name have been added before (and subsequently deleted or moved)

Constructors

FileId |
Fields cname :: FileName count :: Int

Instances

Eq FileId # |
Methods (==) :: FileId -> FileId -> Bool # (/=) :: FileId -> FileId -> Bool #
Ord FileId # |
Methods compare :: FileId -> FileId -> Ordering # (<) :: FileId -> FileId -> Bool # (<=) :: FileId -> FileId -> Bool # (>) :: FileId -> FileId -> Bool # (>=) :: FileId -> FileId -> Bool # max :: FileId -> FileId -> FileId # min :: FileId -> FileId -> FileId #
Show FileId # |
Methods showsPrec :: Int -> FileId -> ShowS # show :: FileId -> String # showList :: [FileId] -> ShowS #
Binary FileId # |
Methods put :: FileId -> Put # get :: Get FileId # putList :: [FileId] -> Put #

parseFileId :: String -> FileId #

Parse FileId from a string

showFileId :: FileId -> String #

Convert FileId to string

newtype PatchId #

The PatchId identifies a patch and can be created from a PatchInfo with makePatchname

Constructors

PID |
Fields patchId :: SHA1

Instances

Eq PatchId # |
Methods (==) :: PatchId -> PatchId -> Bool # (/=) :: PatchId -> PatchId -> Bool #
Ord PatchId # |
Methods compare :: PatchId -> PatchId -> Ordering # (<) :: PatchId -> PatchId -> Bool # (<=) :: PatchId -> PatchId -> Bool # (>) :: PatchId -> PatchId -> Bool # (>=) :: PatchId -> PatchId -> Bool # max :: PatchId -> PatchId -> PatchId # min :: PatchId -> PatchId -> PatchId #
Show PatchId # |
Methods showsPrec :: Int -> PatchId -> ShowS # show :: PatchId -> String # showList :: [PatchId] -> ShowS #
Binary PatchId # |
Methods put :: PatchId -> Put # get :: Get PatchId # putList :: [PatchId] -> Put #

pid2string :: PatchId -> String #

data DatedFilePath #

describes a filepath that is interpreted relative to a certain point in the history of the repository. The point is given by Just pid which denotes the history up to (including) pid or Nothing which denotes the history including the last patch

Constructors

DatedFilePath FilePath (Maybe PatchId) |

data PatchMod a #

This is used to track changes to files

Constructors

PTouch a |
PCreateFile a |
PCreateDir a |
PRename a a |
PRemove a |
PInvalid a | This is an invalid patch e.g. there is a patch 'Move Autoconf.lhs Autoconf.lhs.in' where there is no Autoconf.lhs in the darcs repo
PDuplicateTouch a | this is used for duplicate patches that don't have any effect, but we still want to keep track of them

Instances

Functor PatchMod # |
Methods fmap :: (a -> b) -> PatchMod a -> PatchMod b # (<$) :: a -> PatchMod b -> PatchMod a #
Eq a => Eq (PatchMod a) # |
Methods (==) :: PatchMod a -> PatchMod a -> Bool # (/=) :: PatchMod a -> PatchMod a -> Bool #
Show a => Show (PatchMod a) # |
Methods showsPrec :: Int -> PatchMod a -> ShowS # show :: PatchMod a -> String # showList :: [PatchMod a] -> ShowS #
MonadState (Set FileName, [PatchMod FileName]) FileModMonad # |
Methods get :: FileModMonad (Set FileName, [PatchMod FileName]) # put :: (Set FileName, [PatchMod FileName]) -> FileModMonad () # state :: ((Set FileName, [PatchMod FileName]) -> (a, (Set FileName, [PatchMod FileName]))) -> FileModMonad a #

makePatchID :: PatchInfo -> PatchId #

short :: PatchId -> Word32 #