Crate libpijul_compat
source ·Expand description
This crate contains the core API to access Pijul repositories.
The key object is a Repository
, on which Txn
(immutable
transactions) and MutTxn
(mutable transactions) can be started,
to perform a variety of operations.
Another important object is a Patch
, which encodes two different pieces of information:
-
Information about deleted and inserted lines between two versions of a file.
-
Information about file moves, additions and deletions.
The standard layout of a repository is defined in module
fs_representation
, and mainly consists of a directory called
.pijul
at the root of the repository, containing:
-
a directory called
pristine
, containing a Sanakirja database storing most of the repository information. -
a directory called
patches
, actually containing the patches, where each patch is a gzipped compression of the bincode encoding of thepatch::Patch
type.
At the moment, users of this library, such as the Pijul
command-line tool, may use other files in the .pijul
directory,
such as user preferences, or information about remote branches and
repositories.
Re-exports
pub use patch::Patch;
pub use patch::PatchHeader;
Modules
.pijul
) on the disk. This
module exports both high-level functions that require no knowledge
of the repository, and lower-level constants documented on
pijul.org/documentation/repository,
used for instance for downloading files from remote repositories.Structs
MutTxn
) and immutable
transaction (Txn
). All of Txn
’s methods are also MutTxn
’s
methods.SmallStr
.Enums
Hash
.Constants
Inode
representing the root of the repository (on the
actual file system).Traits
Result
, for easy interaction with this crate.Functions
apply_resize
with the patches list already loaded.increase
bytes.Type Definitions
std::Result
.