Struct libpijul_compat::GenericTxn [] [src]

pub struct GenericTxn<T, R> { /* fields omitted */ }

Common type for both mutable transactions (MutTxn) and immutable transaction (Txn). All of Txn's methods are also MutTxn's methods.

Methods

impl<U: Transaction, R> GenericTxn<U, R>
[src]

[src]

impl<U: Transaction, R> GenericTxn<U, R>
[src]

[src]

Does this repository has a branch called name?

[src]

Get the branch with the given name, if it exists.

[src]

Return the first edge of this key if edge is None, and a pointer to the edge in the database if edge is Some.

[src]

An iterator over keys and edges, in branch branch, starting from key and edge specified by key. If key is None, the iterations start from the first key and first edge. If key is of the form Some(a, None), they start from the first edge of key a. If key is of the from Some(a, Some(b)), they start from the first key and edge that is at least (a, b).

[src]

An iterator over branches in the database, starting from the given branch name.

[src]

An iterator over patches in a branch, in the alphabetical order of their hash.

[src]

An iterator over patches in a branch, in the reverse order in which they were applied.

[src]

An iterator over patches in a branch in the order in which they were applied.

[src]

An iterator over files and directories currently tracked by Pijul, starting from the given FileId. The Inodes returned by the iterator can be used to form new FileIds and traverse the tree from top to bottom.

The set of tracked files is changed by the following operations: outputting the repository, adding, deleting and moving files. It is not related to branches, but only to the files actually present on the file system.

[src]

An iterator over files and directories, following directories in the opposite direction.

[src]

An iterator over the "inodes" database, which contains correspondences between files on the filesystem and the files in the graph.

[src]

Iterator over the PatchId to Hash correspondence.

[src]

Iterator over the Hash to PatchId correspondence.

[src]

Iterator over reverse dependencies ((k, v) is in the reverse dependency table if v depends on k, and both are in at least one branch).

[src]

An iterator over line contents (common to all branches).

[src]

An iterator over edges in the cemetery.

[src]

Get the Inode of a give FileId. A FileId is itself composed of an inode and a name, hence this can be used to traverse the tree of tracked files from top to bottom.

[src]

Get the parent FileId of a given Inode. A FileId is itself composed of an Inode and a name, so this can be used to traverse the tree of tracked files from bottom to top (starting from a leaf).

[src]

Get the key in branches for the given Inode, as well as meta-information on the file (permissions, and whether it has been moved or deleted compared to the branch).

This table is updated every time the repository is output, and when files are moved or deleted. It is meant to be synchronised with the current branch (if any).

[src]

Get the Inode corresponding to key in branches (see the documentation for get_inodes).

[src]

Get the contents of a line.

[src]

Get the PatchId (or internal patch identifier) of the provided patch hash.

[src]

Get the HashRef (external patch identifier) of the provided internal patch identifier.

[src]

Get the patch number in the branch. Patch numbers are guaranteed to always increase when a new patch is applied, but are not necessarily consecutive.

[src]

Get the smallest patch id that depends on patch (and is at least dep in alphabetical order if dep, is Some).

[src]

Dump the graph of a branch into a writer, in dot format.

[src]

Dump the graph of a branch into a writer, in dot format.

[src]

Is there an alive/pseudo edge from a to b.

[src]

Is there an alive/pseudo edge from a to b.

impl<A: Transaction, R> GenericTxn<A, R>
[src]

[src]

Returns a vector containing all files in the repository.

[src]

Returns a list of files under the given inode.

[src]

Returns a list of files under the given inode.

[src]

[src]

Find the inode corresponding to that path, or return an error if there's no such inode.

[src]

impl<U: Transaction, R> GenericTxn<U, R>
[src]

[src]

[src]

impl<A: Transaction, R> GenericTxn<A, R>
[src]

[src]

Gets the external key corresponding to the given key, returning an owned vector. If the key is just a patch internal hash, it returns the corresponding external hash.

[src]

[src]

Create a new internal patch id, register it in the "external" and "internal" bases, and write the result in its second argument ("result").

impl<A: Transaction, R> GenericTxn<A, R>
[src]

[src]

This function constructs a graph by reading the branch from the input key. It guarantees that all nodes but the first one (index 0) have a common descendant, which is index 0.

impl<'a, A: Transaction + 'a, R> GenericTxn<A, R>
[src]

[src]

impl<A: Transaction, R: Rng> GenericTxn<A, R>
[src]

[src]

impl<U: Transaction, R> GenericTxn<U, R>
[src]

[src]

Recursively find all ancestors by doing a DFS, and collect all edges until finding an alive ancestor.

[src]

Recursively find all descendants by doing a DFS on deleted edges (including folder edges), and collect all edges until finding an alive or zombie descendant.

[src]

Find the alive descendants of current. cache is here to avoid cycles, and alive is an accumulator of the result. Since this search stops at files, if the file containing these lines is ever hit, it will be put in file.

[src]

Find the alive ancestors of current. cache is here to avoid cycles, and alive is an accumulator of the result. Since this search stops at files, if the file containing these lines is ever hit, it will be put in file.

impl<U: Transaction, R> GenericTxn<U, R>
[src]

[src]

Return the patch id corresponding to e, or internal if e==None.

[src]

Fetch the internal key for this external key (or internal if key.patch is None).

[src]

impl<T: Transaction, R> GenericTxn<T, R>
[src]

[src]

Tells whether a key is alive in branch, i.e. is either the root, or all its ingoing edges are alive.

[src]

Tells whether a key is alive or zombie in branch, i.e. is either the root, or has at least one of its incoming alive edge is alive.

[src]

Test whether key has a neighbor with flag flag0. If include_pseudo, this includes pseudo-neighbors.

[src]

Tells which paths (of folder nodes) a key is in.

[src]