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

License | GPL-2
Safe Haskell | None
Language | Haskell2010

Darcs.Repository.Packs

Description

Packs are an optimization that enable faster repository cloning over HTTP. A pack is actually a `tar.gz` file that contains many files that would otherwise have to be transfered one by one (which is much slower over HTTP).

Two packs are created at the same time by `createPacks`:

1. The basic pack, contains the pristine tree.
2. The patches pack, contains the set of patches of the repository.

The paths of these files are `_darcs/packs/basic.tar.gz` and `_darcs/packs/patches.tar.gz`. There is also `_darcs/packs/pristine` which indicates the pristine hash at the moment of the creation of the packs. This last file is useful to determine whether the basic pack is in sync with the current pristine of the repository.

Synopsis

- fetchAndUnpackBasic :: Cache -> FilePath -> IO ()
- fetchAndUnpackPatches :: [InventoryHash] -> [PatchHash] -> Cache -> FilePath -> IO ()
- packsDir :: String
- createPacks :: forall (p :: Type -> Type -> Type) wU wR. RepoPatch p => Repository 'RW p wU wR -> IO ()

# Documentation

fetchAndUnpackBasic :: Cache -> FilePath -> IO () #

fetchAndUnpackPatches :: [InventoryHash] -> [PatchHash] -> Cache -> FilePath -> IO () #

packsDir :: String #

createPacks :: forall (p :: Type -> Type -> Type) wU wR. RepoPatch p => Repository 'RW p wU wR -> IO () #

Create packs from the current recorded version of the repository.