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§
- PIJUL_
DIR_ NAME - Name of the root directory, i.e.
.pijul
.
Functions§
- branch_
changes_ base_ path - 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). - branch_
changes_ file - Changes file from the repository root and branch name.
- create
- Create a repository.
dir
must be the repository root (a".pijul"
directory will be created indir
). - find_
repo_ root - Find the repository root from one of its descendant
directories. Return
None
iffdir
is not in a repository. - get_
current_ branch - id_file
- The id file is used for remote operations, to identify a repository and save bandwidth when the remote state is partially known.
- ignore_
file - meta_
file - The meta file, where user preferences are stored.
- patch_
file_ name - Basename of the patch corresponding to the given patch hash.
- patches_
dir - Directory where the patches are.
patches_dir("/a/b") = "/a/b/.pijul/patches"
. - pristine_
dir - 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_
dependencies - Read a patch, but without the “changes” part, i.e. the actual contents of the patch.
- read_
patch - Read a complete patch.
- read_
patch_ nochanges - Read a patch, but without the “changes” part, i.e. the actual contents of the patch.
- repo_
dir - Concatenate the parameter with
PIJUL_DIR_NAME
. - set_
current_ branch - untracked_
files