Expand description

Layout of a repository (files in .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.

Constants

Name of the root directory, i.e. .pijul.

Functions

Basename of the changes file for branch br. This file is only used when pulling/pushing over HTTP (where calling remote programs to list patches is impossible).
Changes file from the repository root and branch name.
Create a repository. dir must be the repository root (a ".pijul" directory will be created in dir).
Find the repository root from one of its descendant directories. Return None iff dir is not in a repository.
The id file is used for remote operations, to identify a repository and save bandwidth when the remote state is partially known.
The meta file, where user preferences are stored.
Basename of the patch corresponding to the given patch hash.
Directory where the patches are. patches_dir("/a/b") = "/a/b/.pijul/patches".
Directory where the pristine is, from the root of the repository. For instance, if the repository in in /a/b, pristine_dir("/a/b") returns /a/b/.pijul/pristine`.
Read a patch, but without the “changes” part, i.e. the actual contents of the patch.
Read a complete patch.
Read a patch, but without the “changes” part, i.e. the actual contents of the patch.
Concatenate the parameter with PIJUL_DIR_NAME.