use ed25519_dalek::SigningKey;
use rand::rngs::OsRng;
use triblespace::core::repo::memoryrepo::MemoryRepo;
use triblespace::core::repo::Repository;
use triblespace::prelude::*;
fn main() {
let mut repo = Repository::new(MemoryRepo::default(), SigningKey::generate(&mut OsRng), TribleSet::new()).unwrap();
let branch_id = repo.create_branch("feature", None).expect("create branch");
let mut workspace = repo.pull(*branch_id).expect("pull");
workspace.commit(TribleSet::new(), "start feature work");
while let Some(mut incoming) = repo.try_push(&mut workspace).expect("push") {
incoming.merge(&mut workspace).expect("merge");
workspace = incoming;
}
println!("pushed");
}