Struct rsure::BkStore
[−]
[src]
pub struct BkStore { pub base: PathBuf, pub name: String, // some fields omitted }
A Store
that stores trees as deltas in a Bitkeeper repository.
BitKeeper is a revision control system, predating git. Although it's (pre-open-source)
existence was some of the inspiration behind git, the way it stores file delta information is
quite different. It is based on the SCCS system, which stores all revisions in a single file
in a "weave" format. Until weaving is directly implemented in rsure, the BkStore
type allows
us to take advantage of this format to store lots of deltas compactly (typically using much
less space than a delta-based storage, such as git).
Aside from having a requirement that the commandline bk
program for bitkeeper be installed in
the path, trees written to the BkStore
must always have a tag with the name name
and a
unique value. This field will be used to retrieve that particular revision later. Within
Bitkeeper, the name
tag will be used as the commit text, and can be listed, and found later.
Fields
base: PathBuf
The directory where the bitkeeper repository lives.
name: String
The particular filename for this Store
within that repo. A given repo can hold multiple
Store
s.
Methods
impl BkStore
[src]
pub fn new(base: &Path, name: &str) -> BkStore
[src]
Construct a new in-memory Store
to refer to a Bitkeeper store.
The base
should be the directory containing the Bitkeeper repository itself (which should
have been created by bk_setup
.
The name
names a single store within this respository. A given store is intended to hold
tree snapshots over time for a single filesystem. This should be a plain filename with no
extension.
impl BkStore
[src]
pub fn query(&self) -> Result<Vec<BkSureFile>>
[src]
Query to determine all file versions that have been saved. This can be used to list snapshots that have been taken.
Trait Implementations
impl Store for BkStore
[src]
fn write_new(&self, tree: &SureTree, tags: &StoreTags) -> Result<()>
[src]
Write a new SureTree to the store. The store may write the tags in the version to help identify information about what was captured. Read more
fn load(&self, version: Version) -> Result<SureTree>
[src]
Attempt to load a sure version, based on the descriptor given.
fn get_versions(&self) -> Result<Vec<StoreVersion>>
[src]
Retrieve the available versions, in the store. These should be listed, newest first.