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R5UILYZ73GISHAKJA6KIZGC5M2MFAC
7A2TSC4PAKK3WOH3DMAJASCEC6D5JLJWNFWJTEEBE4CVS4K76PPQC
3AMEP2Y5J6GA4AWQONF4JVA3XSR3ASLHHKMYG44R72SOUY3UQCDAC
QMTANHVNRPQ5IX66FYQBFRBDCTN6YKMNCO6OHTQ6QCUASPWWXJKAC
EQLDTLXVCARE36EJE3S6SNEVTW2JJY4EYD36EX7WSIFLG2XMKKQAC
65S67T3EKKLFRBCU73Z542V7A4JSMGP37OJINON6N563UIBQAITAC
2BKYJ2JM5PTXWO6HTVBKFQANWWSCJ4UHJYKAXWGTVZB35AZJ76CQC
HW5Q7GGYDMCQQYDBFLDAWCTNQQMIQHJ77UOSPN5BHMSD3KMO2O3AC
OUWD436ATBTZJR53B6XDSI5SXRRNZV7YGRUEA5ACHZC2RUDP7G5QC
let db: ::sanakirja::Db<git2::Oid, libpijul::Merkle> = if let Some(db) = txn_git.root(0) {
db
} else {
txn_git.create_db()?
};
let db: ::sanakirja::btree::UDb<Oid, libpijul::pristine::SerializedMerkle> =
if let Some(db) = txn_git.root(0) {
::sanakirja::btree::UDb::from_page(db)
} else {
::sanakirja::btree::create_db_(&mut txn_git)?
};
let mut db: ::sanakirja::Db<git2::Oid, libpijul::Merkle> = if let Some(db) = txn.root(0) {
db
} else {
txn.create_db()?
};
txn.put(&mut rand::thread_rng(), &mut db, *oid, state)?;
txn.set_root(0, db);
let mut db: ::sanakirja::btree::UDb<Oid, libpijul::pristine::SerializedMerkle> =
if let Some(db) = txn.root(0) {
::sanakirja::btree::UDb::from_page(db)
} else {
::sanakirja::btree::create_db_(&mut txn)?
};
::sanakirja::btree::put(&mut txn, &mut db, &Oid(*oid), &state.into())?;
txn.set_root(0, db.db);
::sanakirja::debug::debug(&txn.txn, &[
txn.graph(&channel.borrow()),
txn.graph(&channel2.borrow()),
], "debug_sanakirja", true);
::sanakirja::debug::debug(
&txn.txn,
&[txn.graph(&channel.borrow()), txn.graph(&channel2.borrow())],
"debug_sanakirja",
true,
);
output::output_repository_no_pending(&mut repo, &changes, &mut txn, &mut channel, "", true, None)
.unwrap();
output::output_repository_no_pending(
&mut repo,
&changes,
&mut txn,
&mut channel,
"",
true,
None,
)
.unwrap();
output::output_repository_no_pending(&mut repo, &changes, &mut txn, &mut channel, "", true, None)
.unwrap();
output::output_repository_no_pending(
&mut repo,
&changes,
&mut txn,
&mut channel,
"",
true,
None,
)
.unwrap();
output::output_repository_no_pending(&mut repo, &changes, &mut txn, &mut channel, "", true, None)
.unwrap();
output::output_repository_no_pending(
&mut repo,
&changes,
&mut txn,
&mut channel,
"",
true,
None,
)
.unwrap();
output::output_repository_no_pending(&mut repo, &changes, &mut txn, &mut channel, "", true, None)
.unwrap();
output::output_repository_no_pending(
&mut repo,
&changes,
&mut txn,
&mut channel,
"",
true,
None,
)
.unwrap();
Entry::Vacant(v) => {
match btree::get(&self.txn, &self.remotes, &name, None)? {
Some((name_, remote)) if name.as_ref() == name_ => {
debug!("load_remote: {:?} {:?}", name_, remote);
let r = Remote {
remote: UDb::from_page(remote.0[0].into()),
rev: UDb::from_page(remote.0[1].into()),
states: UDb::from_page(remote.0[2].into()),
};
for x in btree::iter(&self.txn, &r.remote, None).unwrap() {
debug!("remote -> {:?}", x);
}
for x in btree::iter(&self.txn, &r.rev, None).unwrap() {
debug!("rev -> {:?}", x);
}
for x in btree::iter(&self.txn, &r.states, None).unwrap() {
debug!("states -> {:?}", x);
}
Entry::Vacant(v) => match btree::get(&self.txn, &self.remotes, &name, None)? {
Some((name_, remote)) if name.as_ref() == name_ => {
debug!("load_remote: {:?} {:?}", name_, remote);
let r = Remote {
remote: UDb::from_page(remote.0[0].into()),
rev: UDb::from_page(remote.0[1].into()),
states: UDb::from_page(remote.0[2].into()),
};
for x in btree::iter(&self.txn, &r.remote, None).unwrap() {
debug!("remote -> {:?}", x);
}
for x in btree::iter(&self.txn, &r.rev, None).unwrap() {
debug!("rev -> {:?}", x);
}
for x in btree::iter(&self.txn, &r.states, None).unwrap() {
debug!("states -> {:?}", x);
}
for x in self.iter_remote(&r.remote, 0).unwrap() {
debug!("ITER {:?}", x);
}
let r = RemoteRef {
db: Rc::new(RefCell::new(r)),
name: name.clone(),
};
Ok(Some(v.insert(r).clone()))
for x in self.iter_remote(&r.remote, 0).unwrap() {
debug!("ITER {:?}", x);
Entry::Vacant(v) => {
match btree::get(&self.txn, &self.remotes, &name, None)? {
Some((name_, remote)) if name_ == name.as_ref() => {
let r = RemoteRef {
db: Rc::new(RefCell::new(Remote {
remote: UDb::from_page(remote.0[0].into()),
rev: UDb::from_page(remote.0[1].into()),
states: UDb::from_page(remote.0[2].into()),
})),
name: name.clone(),
};
v.insert(r);
}
_ => return Ok(None),
Entry::Vacant(v) => match btree::get(&self.txn, &self.remotes, &name, None)? {
Some((name_, remote)) if name_ == name.as_ref() => {
let r = RemoteRef {
db: Rc::new(RefCell::new(Remote {
remote: UDb::from_page(remote.0[0].into()),
rev: UDb::from_page(remote.0[1].into()),
states: UDb::from_page(remote.0[2].into()),
})),
name: name.clone(),
};
v.insert(r);
let r =
match btree::get(&self.txn, &self.channels, &name, None)? {
Some((name_, b)) => {
assert_eq!(name_, name.as_ref());
ChannelRef {
r: Rc::new(RefCell::new(Channel {
graph: Db::from_page(b.0[0].into()),
changes: Db::from_page(b.0[1].into()),
revchanges: UDb::from_page(b.0[2].into()),
states: UDb::from_page(b.0[3].into()),
apply_counter: b.0[4].into(),
name: name.clone(),
last_modified: b.0[5].into(),
})),
}
}
_ => {
let br = ChannelRef {
r: Rc::new(RefCell::new(Channel {
graph: btree::create_db_(&mut self.txn)?,
changes: btree::create_db_(&mut self.txn)?,
revchanges: btree::create_db_(&mut self.txn)?,
states: btree::create_db_(&mut self.txn)?,
apply_counter: 0,
name: name.clone(),
last_modified: 0,
})),
};
commit = Some(br.clone());
br
let r = match btree::get(&self.txn, &self.channels, &name, None)? {
Some((name_, b)) => {
assert_eq!(name_, name.as_ref());
ChannelRef {
r: Rc::new(RefCell::new(Channel {
graph: Db::from_page(b.0[0].into()),
changes: Db::from_page(b.0[1].into()),
revchanges: UDb::from_page(b.0[2].into()),
states: UDb::from_page(b.0[3].into()),
apply_counter: b.0[4].into(),
name: name.clone(),
last_modified: b.0[5].into(),
})),
};
}
_ => {
let br = ChannelRef {
r: Rc::new(RefCell::new(Channel {
graph: btree::create_db_(&mut self.txn)?,
changes: btree::create_db_(&mut self.txn)?,
revchanges: btree::create_db_(&mut self.txn)?,
states: btree::create_db_(&mut self.txn)?,
apply_counter: 0,
name: name.clone(),
last_modified: 0,
})),
};
commit = Some(br.clone());
br
}
};
let r =
match btree::get(&self.txn, &self.remotes, &name, None)? {
Some((name_, remote)) if name_ == name.as_ref() => {
RemoteRef {
db: Rc::new(RefCell::new(Remote {
remote: UDb::from_page(remote.0[0].into()),
rev: UDb::from_page(remote.0[1].into()),
states: UDb::from_page(remote.0[2].into()),
})),
name: name.clone(),
}
}
_ => {
let br = RemoteRef {
db: Rc::new(RefCell::new(Remote {
remote: btree::create_db_(&mut self.txn)?,
rev: btree::create_db_(&mut self.txn)?,
states: btree::create_db_(&mut self.txn)?,
})),
name: name.clone(),
};
commit = Some(br.clone());
br
}
};
let r = match btree::get(&self.txn, &self.remotes, &name, None)? {
Some((name_, remote)) if name_ == name.as_ref() => RemoteRef {
db: Rc::new(RefCell::new(Remote {
remote: UDb::from_page(remote.0[0].into()),
rev: UDb::from_page(remote.0[1].into()),
states: UDb::from_page(remote.0[2].into()),
})),
name: name.clone(),
},
_ => {
let br = RemoteRef {
db: Rc::new(RefCell::new(Remote {
remote: btree::create_db_(&mut self.txn)?,
rev: btree::create_db_(&mut self.txn)?,
states: btree::create_db_(&mut self.txn)?,
})),
name: name.clone(),
};
commit = Some(br.clone());
br
}
};
btree::put(
&mut self.txn,
&mut self.channels,
&channel.name,
&t6,
)?;
btree::put(&mut self.txn, &mut self.channels, &channel.name, &t6)?;
) -> Result<Cursor<T, &'txn T, T::RevchangesetCursor, L64, Pair<ChangeId, SerializedMerkle>>, TxnErr<T::GraphError>>
{
) -> Result<
Cursor<T, &'txn T, T::RevchangesetCursor, L64, Pair<ChangeId, SerializedMerkle>>,
TxnErr<T::GraphError>,
> {
let name = std::str::from_utf8(
&change_contents[add.start.us() + 2..add.end.us()],
)
.unwrap();
let name =
std::str::from_utf8(&change_contents[add.start.us() + 2..add.end.us()])
.unwrap();
let name = std::str::from_utf8(
&change_contents[n.start.us() + 2..n.end.us()],
)
.unwrap();
let name = std::str::from_utf8(&change_contents[n.start.us() + 2..n.end.us()])
.unwrap();
txn.del_tree(
&OwnedPathId::inode(inode),
Some(&inode),
)?;
txn.del_tree(&OwnedPathId::inode(inode), Some(&inode))?;
Some((Edge {
dest: graph.lines[chi].vertex.start_pos(),
flag: EdgeFlags::empty(),
introduced_by: ChangeId(4165u64.into()),
}).into()),
Some(
(Edge {
dest: graph.lines[chi].vertex.start_pos(),
flag: EdgeFlags::empty(),
introduced_by: ChangeId(4165u64.into()),
})
.into(),
),