Type Definition libpijul_compat::MutTxn [] [src]

type MutTxn<'env, R> = GenericTxn<MutTxn<'env, ()>, R>;

A mutable transaction on a repository.

Methods

impl<'env, R: Rng> MutTxn<'env, R>
[src]

Branches and commits.

[src]

Open a branch by name, creating an empty branch with that name if the name doesn't exist.

[src]

Commit a branch. This is a extremely important thing to do on branches, and it is not done automatically when committing transactions.

I repeat: not calling this method before committing a transaction might cause database corruption.

[src]

Rename a branch. The branch still needs to be committed after this operation.

[src]

Commit a transaction. Be careful to commit all open branches before.

impl<'env, R: Rng> MutTxn<'env, R>
[src]

Low-level operations on mutable transactions.

[src]

Delete a branch, destroying its associated graph and patch set.

[src]

Add a binding to the graph of a branch. All edges must be inserted twice, once in each direction, and this method only inserts one direction.

[src]

Same as put_nodes, but also adds the reverse edge.

[src]

Delete a binding from a graph. If edge is None, delete the smallest binding with key at least key.

[src]

Same as del_nodes, but also deletes the reverse edge.

[src]

Add a file or directory into the tree database, with parent key.parent_inode, name key.basename and inode Inode (usually randomly generated, as Inodes have no relation with patches or branches).

All bindings inserted here must have the reverse inserted into the revtree database. If (key, edge) is inserted here, then (edge, key) must be inserted into revtree.

[src]

Delete a file or directory from the tree database. Similarly to the comments in the documentation of the put_tree method, the reverse binding must be delete from the revtree database.

[src]

Add a file into the revtree database (see the documentation of the put_tree method).

[src]

Delete a file from the revtree database (see the documentation of the put_tree method).

[src]

Delete a binding from the inodes database, i.e. the correspondence between branch graphs and the file tree.

All bindings in inodes must have their reverse in revinodes (without the FileMetadata). del_revinodes must be called immediately before or immediately after calling this method.

[src]

Replace a binding in the inodes database, or insert a new one if key doesn't exist yet in that database.

All bindings in inodes must have their reverse inserted in revinodes (without the FileMetadata).

[src]

Replace a binding in the revinodes database, or insert a new one if key doesnt exist yet in that database.

All bindings in revinodes must have their reverse inserted inodes (with an extra FileMetadata).

[src]

Delete a binding from the revinodes database, i.e. the correspondence between the file tree and branch graphs.

All bindings in revinodes must have their reverse in inodes (with an extra FileMetadata). del_inodes must be called immediately before or immediately after calling this method.

[src]

Add the contents of a line. Note that this table is common to all branches.

[src]

Remove the contents of a line.

[src]

Register the internal identifier of a patch. The put_external method must be called immediately after, or immediately before this method.

[src]

Unregister the internal identifier of a patch. Remember to also unregister its external id.

[src]

Register the extern identifier of a patch. The put_internal method must be called immediately after, or immediately before this method.

[src]

Unregister the extern identifier of a patch. Remember to also unregister its internal id.

[src]

Add a patch id to a branch. This doesn't apply the patch, it only registers it as applied. The put_revpatches method must be called on the same branch immediately before, or immediately after.

[src]

Delete a patch id from a branch. This doesn't unrecord the patch, it only removes it from the patch set. The del_revpatches method must be called on the same branch immediately before, or immediately after.

[src]

Add a patch id to a branch. This doesn't apply the patch, it only registers it as applied. The put_patches method must be called on the same branch immediately before, or immediately after.

[src]

Delete a patch id from a branch. This doesn't unrecord the patch, it only removes it from the patch set. The del_patches method must be called on the same branch immediately before, or immediately after.

[src]

Register a reverse dependency. All dependencies of all patches applied on at least one branch must be registered in this database, i.e. if a depends on b, then (b, a) must be inserted here.

[src]

Remove a reverse dependency. Only call this method when the patch with identifier patch is not applied to any branch.

[src]

Add an edge to the cemetery.

[src]

Delete an edge from the cemetery.

[src]

Allocate a string (to be inserted in the contents database).

impl<'env, R: Rng> MutTxn<'env, R>
[src]

[src]

Create an inode that doesn't exist in the repository, but doesn't put it into the repository.

[src]

[src]

[src]

[src]

[src]

Removes a file from the repository.

impl<'env, A: Rng> MutTxn<'env, A>
[src]

[src]

impl<'env, T: Rng> MutTxn<'env, T>
[src]

[src]

impl<'env, T: Rng> MutTxn<'env, T>
[src]

[src]

Applies a patch to a repository. "new_patches" are patches that just this repository has, and the remote repository doesn't have.

[src]

Add pseudo edges from all keys of parents to all dest of the edges in children, with the same edge flags as in children, plus PSEUDO_EDGE.

impl<'env, T: Rng> MutTxn<'env, T>
[src]

[src]

Forget edges, delete all pseudo-edges to the target of the edges, and then rebuild the pseudo-edges by collecting the alive ancestors. This ensures that any transitive relation introduced by these edges is forgotten, and the alive component is still connected.

impl<'env, T: Rng> MutTxn<'env, T>
[src]

[src]

Assumes all patches have been downloaded. The third argument remote_patches needs to contain at least all the patches we want to apply, and the fourth one local_patches at least all the patches the other repository doesn't have.

[src]

Lower-level applier. This function only applies patches as found in patches_dir, following dependencies recursively. It outputs neither the repository nor the "changes file" of the branch, necessary to exchange patches locally or over HTTP.

[src]

Apply a patch from a local record: register it, give it a hash, and then apply.

impl<'env, T: Rng> MutTxn<'env, T>
[src]

[src]

Returns the path's inode

[src]

Collect all the children of key key into files.

[src]

Collect names of files with conflicts

As conflicts have an internal representation, it can be determined exactly which files contain conflicts.

[src]

impl<'env, T: Rng> MutTxn<'env, T>
[src]

[src]

impl<'env, T: Rng> MutTxn<'env, T>
[src]

[src]

impl<'env, T: Rng> MutTxn<'env, T>
[src]

[src]

[src]

[src]

[src]

impl<'env, T: Rng> MutTxn<'env, T>
[src]

[src]

[src]

Unrecord the patch, returning true if and only if another branch still uses this patch.

impl<'env, T: Rng> MutTxn<'env, T>
[src]

[src]

[src]

[src]

[src]

[src]