Integrating identity malleability
[?]
Jun 28, 2021, 8:59 AM
A3RM526Y7LUXNYW4TL56YKQ5GVOK2R5D7JJVTSQ6TT5MEXIR6YAACDependencies
- [2]
R245EVN3Do not print anything on broken pipe errors - [3]
G6YXRFH2Channel drop with tags - [4]
TFK7CYFQ`pijul channel new` to create new, empty channels - [5]
5OGOE4VWStore the current channel in the pristine - [6]
SMMBFECLConverting to the new patch format "online" - [7]
IXC43DSHFixing a bug in unrecord - [8]
SAGSYAPXVarious version bumps - [9]
PSKXR4QEDo not load the entire change in memory in log - [10]
ENKQ3QZGForward the exit status messages from the SSH background loop to the client (solving hangs) - [11]
EGSVRZJVAvoid converting between base32 and hash in pijul::commands::unrecord - [12]
5BB266P6Optional colours in the global config file - [13]
SZWBLWZ4Reading ~/.ssh/config - [14]
Y6EVFMTADon't output files if they aren't in the current channel - [15]
6HNRL5RTdetect non-utf8 text files - [16]
3S6LU2U5abstract out FileMetadata (de)serialistion - [17]
ZSF3YFZTencoded file deletion - [18]
3FTEGCMRadd timestamp_validator to tag --timestamp option - [19]
6YMDOZIBRefactoring apply - [20]
7ZFRYVVQCargo.nix and formatting - [21]
RRCSHAYZFormatting - [22]
LBVUI6AXRename `ls` command to `list` - [23]
OCBM7IFENew release: pijul-1.0.0-alpha.8 - [24]
3WIQYEISFixing conflicts in Cargo.lock - [25]
CCFJ7VO3Renaming "Record" to "Hunk" in the changes - [26]
WEHUTJUKLockfile update - [27]
6DOXSHWGCleanup, and version bump - [28]
JMBGCWM5Fixing a zombie, probably due to the new conflict algorithm - [29]
UNZXTNSJChange text format: order dependencies in the order they were on the channel at record time - [30]
H3NAKE2IAdding num_cpus to Cargo.lock - [31]
G65S7FAWVersion bump and cleanup - [32]
2D7P2VKJChange completions (where the whole progress bar story started) - [33]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [34]
ZBNKSYA6Fixing a bus error when starting a transaction on a full disk - [35]
KLBWKCUZuse ssh url syntax like git - [36]
2RXOCWUWMaking libpijul deterministic (and getting rid of `rand`) - [37]
CIEUBH46Fixing an index-out-of-bounds error when serialising bad changes - [38]
23LVKATNUse pager crate for log output - [39]
I24UEJQLVarious post-fire fixes - [40]
H62VFFJECargo.nix, and solving conflicts - [41]
3AMEP2Y5More convenient interface for channels - [42]
367UBQ6KForwarding SSH stderr, and progress bar for push - [43]
GHO6DWPIRefactoring iterators - [44]
TZ42DX3BProperly dropping a channel - [45]
PJ7T2VFLDo not hang on locked repositories - [46]
ZRUPLBBTColours in diff and change: separating concerns and dependencies - [47]
A3DMBJJAUpgrading the `git` subcommand to the latest Sanakirja and Libpijul - [48]
MU5GSJAWPartial push and pull (WARNING: breaks the existing protocol) - [49]
VO5OQW4WRemoving anyhow in libpijul - [50]
Y7YAFMFFFix path prefix striping on Windows. - [51]
WKX5S4Z4remove unneccesary explicit lifetimes - [52]
VQPAUKBQchannel switch as an alias to reset - [53]
XWETQ4DEUpgrading versions - [54]
I52XSRUHMassive cleanup, and simplification - [55]
TKEVOH7HFixing a bug when downloading changes, and making change download more efficient (more async) - [56]
PGERZ3KJChannel renaming (also do not create a new channel when recording on a channel that doesn't exist) - [57]
HDGRZISMVersion updates - [58]
BZSC7VMYaddress clippy lints - [59]
RXNT67OTSanakirja version, and removing an unwrap - [60]
76PCXGMLPushing to, and pulling from the local repository - [61]
AAXP2534Tags: completing the subcommand - [62]
WZVCLZKYaddress clippy lints - [63]
SLJ3OHD4unrecord: show list of changes if none were given as arguments - [64]
H23LO7U7a few more clippy lints addressed - [65]
MFTN7GBWPre-tags cleanup + fast Sanakirja - [66]
IUGP6ZGBAdd support for ~/.config/pijul even on macos - [67]
FE5ES6Q4Stop pushing/pulling if the remote returns an error - [68]
TPEH2XNB1.0.0-alpha.28, with Tokio 1.0 - [69]
UFCZKKLXUpgrading to the latest Sanakirja/Rand - [70]
B3QWIGDEFixing the Git features with the latest Pijul (+ conflicts in Cargo.toml) - [71]
VYHHOEYHVersions and formatting - [72]
W5HHTRPKRename the `mv` command to `move` - [73]
X6YFD4WVDo not download changes if we already have them - [74]
TVVW53HZConflict resolution - [75]
EEBKW7VTKeys and identities - [76]
JL4WKA5PImplement the Sanakirja concurrency model in a cross-process way - [77]
33SQMZYXNew versions of dependencies - [78]
JACZWIJ6Version bump - [79]
YN63NUZOSanakirja 1.0 - [80]
VZL5OHF5Remove the obsolete `remote list` command - [81]
QL6K2ZM3Tags - [82]
IIV3EL2XCleanup, formatting, and fixing the Git feature - [83]
GYXIF25TProper parsing of URLs - [84]
TFPETWTVAdd config options for patch message templates - [85]
VMPAOJS2Don't output after pushing to a local channel - [86]
I7VL7VPZMinor cleanup - [87]
JRENVH5DReqwest 0.11 - [88]
UDHP4ZVBFixing SSH asynchronicity issues - [89]
Q45QHPO4Feedback on network stuff - [90]
T3S4P4ETVersion updates - [91]
NS36CJCOValidating timestamps in record - [92]
XSEODPNEFixing conflicts - [93]
7S4YD633Change in semantic of the new Sanakirja compared to the previous one (get returns Some(…) even if the key is not found) - [94]
SE4RJYBZNo pager on Windows (really not) - [95]
K6GWUOD5Styling progress bars - [96]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [*]
BNPSVXICFriendlier progress bars - [*]
HXEIH4UQPulling more than 100 changes at once - [*]
FBXYP7QMForgot to add remote::http - [*]
KI2AFWOSFixing a panic in pull - [*]
SNZ3OAMCuse native external subcommand support instead of hand-rolled one - [*]
F6V27C3MFixing the "old file optimisation" in record, after the move to parallelisable records - [*]
OUWD436AVersion bump
Change contents
- replacement in pijul/src/repository.rs at line 46
pub async fn find_root(cur: Option<PathBuf>) -> Result<Self, anyhow::Error> {Self::find_root_with_dot_dir(cur, DOT_DIR).awaitpub fn find_root(cur: Option<PathBuf>) -> Result<Self, anyhow::Error> {Self::find_root_with_dot_dir(cur, DOT_DIR) - replacement in pijul/src/repository.rs at line 50
pub async fn find_root_with_dot_dir(pub fn find_root_with_dot_dir( - edit in pijul/src/remote/ssh.rs at line 35
).unwrap();static ref ADDRESS_NOPATH: Regex = Regex::new(r#"(ssh://)?((?P<user>[^@]+)@)?((?P<host>(\[([^\]]+)\])|([^:/]+)))(:(?P<port>\d+))?"# - replacement in pijul/src/remote/ssh.rs at line 52
pub fn ssh_remote(addr: &str) -> Option<Remote> {let cap = ADDRESS.captures(addr)?;pub fn ssh_remote(addr: &str, with_path: bool) -> Option<Remote> {let cap = if with_path {ADDRESS.captures(addr)?} else {ADDRESS_NOPATH.captures(addr)?}; - replacement in pijul/src/remote/ssh.rs at line 70
let path = {let path = if with_path { - edit in pijul/src/remote/ssh.rs at line 83
} else {"" - edit in pijul/src/remote/ssh.rs at line 296
Id {sender: Option<tokio::sync::oneshot::Sender<Option<libpijul::pristine::RemoteId>>>,}, - edit in pijul/src/remote/ssh.rs at line 319
Prove {key: libpijul::key::SKey,sender: Option<tokio::sync::oneshot::Sender<()>>,signed: bool,},Identities {sender: Option<tokio::sync::mpsc::Sender<crate::Identity>>,buf: Vec<u8>,}, - replacement in pijul/src/remote/ssh.rs at line 438
session: thrussh::client::Session,mut session: thrussh::client::Session, - edit in pijul/src/remote/ssh.rs at line 457
} else {sender.send(None).unwrap_or(());}}}State::Id { ref mut sender } => {debug!("state: State {:?}", data);if let Some(sender) = sender.take() {let line = if data.last() == Some(&10) {libpijul::pristine::RemoteId::from_base32(&data[..data.len() - 1])} else {None};if let Some(b) = line {sender.send(Some(b)).unwrap_or(()); - edit in pijul/src/remote/ssh.rs at line 602
State::Prove {ref mut key,ref mut sender,ref mut signed,} => {if let Ok(data) = std::str::from_utf8(&data) {if *signed && !data.trim().is_empty() {std::io::stderr().write_all(data.as_bytes())?;} else {let data = data.trim();debug!("signing {:?}", data);let s = key.sign_raw(data.as_bytes())?;session.data(channel,thrussh::CryptoVec::from_slice(format!("prove {}\n", s).as_bytes()),);if let Some(sender) = sender.take() {sender.send(()).unwrap_or(());}*signed = true;}}}State::Identities {ref mut sender,ref mut buf,} => {debug!("data = {:?}", data);if data.ends_with(&[10]) {let buf = if buf.is_empty() {&data} else {buf.extend(&data);&buf};for data in data.split(|c| *c == 10) {if let Ok(p) = serde_json::from_slice(&buf) {debug!("p = {:?}", p);if let Some(ref mut sender) = sender {sender.send(p).await?;}} else {debug!("could not parse {:?}", std::str::from_utf8(&data));*sender = None;break;}}} else {buf.extend(&data);}} - edit in pijul/src/remote/ssh.rs at line 730
pub async fn get_id(&mut self) -> Result<Option<libpijul::pristine::RemoteId>, anyhow::Error> {let (sender, receiver) = tokio::sync::oneshot::channel();*self.state.lock().await = State::Id {sender: Some(sender),};self.run_protocol().await?;self.c.data(format!("id {}\n", self.channel).as_bytes()).await?;Ok(receiver.await?)}pub async fn prove(&mut self, key: libpijul::key::SKey) -> Result<(), anyhow::Error> {debug!("get_state");let (sender, receiver) = tokio::sync::oneshot::channel();let k = serde_json::to_string(&key.public_key())?;*self.state.lock().await = State::Prove {key,sender: Some(sender),signed: false,};self.run_protocol().await?;self.c.data(format!("challenge {}\n", k).as_bytes()).await?;Ok(receiver.await?)} - edit in pijul/src/remote/ssh.rs at line 976
}pub async fn update_identities(&mut self,rev: Option<u64>,mut path: PathBuf,) -> Result<u64, anyhow::Error> {let (sender_, mut recv) = tokio::sync::mpsc::channel(100);*self.state.lock().await = State::Identities {sender: Some(sender_),buf: Vec::new(),};self.run_protocol().await?;if let Some(rev) = rev {self.c.data(format!("identities {}\n", rev).as_bytes()).await?;} else {self.c.data("identities\n".as_bytes()).await?;}let mut revision = 0;std::fs::create_dir_all(&path)?;while let Some(id) = recv.recv().await {path.push(&id.public_key.key);debug!("recv identity: {:?} {:?}", id, path);let mut id_file = std::fs::File::create(&path)?;serde_json::to_writer_pretty(&mut id_file, &id)?;path.pop();revision = revision.max(id.last_modified);}debug!("done receiving");Ok(revision) - edit in pijul/src/remote/mod.rs at line 40
with_path: bool, - replacement in pijul/src/remote/mod.rs at line 43
unknown_remote(self_path, name, channel, no_cert_check).awaitunknown_remote(self_path, name, channel, no_cert_check, with_path).await - replacement in pijul/src/remote/mod.rs at line 45
unknown_remote(self_path, name, channel, no_cert_check).awaitunknown_remote(self_path, name, channel, no_cert_check, with_path).await - edit in pijul/src/remote/mod.rs at line 55
with_path: bool, - replacement in pijul/src/remote/mod.rs at line 70
return if let Some(mut ssh) = ssh_remote(name) {return if let Some(mut ssh) = ssh_remote(name, with_path) { - replacement in pijul/src/remote/mod.rs at line 104
if let Some(mut ssh) = ssh_remote(name) {if let Some(mut ssh) = ssh_remote(name, with_path) { - replacement in pijul/src/remote/mod.rs at line 169
let name = if let Some(name) = self.name() {namelet id = if let Some(id) = self.get_id(txn).await? {id - replacement in pijul/src/remote/mod.rs at line 174
let mut remote = txn.open_or_create_remote(name).unwrap();let mut remote = txn.open_or_create_remote(id, self.name().unwrap()).unwrap(); - edit in pijul/src/remote/mod.rs at line 258
} else {Ok(None)}}RemoteRepo::None => unreachable!(),}}async fn get_id<T: libpijul::TxnTExt>(&mut self,txn: &T,) -> Result<Option<libpijul::pristine::RemoteId>, anyhow::Error> {match *self {RemoteRepo::Local(ref l) => l.get_id(),RemoteRepo::Ssh(ref mut s) => s.get_id().await,RemoteRepo::Http(ref h) => h.get_id().await,RemoteRepo::LocalChannel(ref channel) => {if let Some(channel) = txn.load_channel(&channel)? {Ok(Some(*txn.id(&*channel.read().unwrap()))) - edit in pijul/src/remote/mod.rs at line 373
}async fn update_identities(&mut self,rev: Option<u64>,path: PathBuf,) -> Result<u64, anyhow::Error> {let r = match *self {RemoteRepo::Local(ref mut l) => l.update_identities(rev, path).await?,RemoteRepo::Ssh(ref mut s) => s.update_identities(rev, path).await?,RemoteRepo::Http(ref mut h) => h.update_identities(rev, path).await?,RemoteRepo::LocalChannel(_) => 0,RemoteRepo::None => unreachable!(),};Ok(r) - edit in pijul/src/remote/mod.rs at line 392
remote: &RemoteRef<T>, - edit in pijul/src/remote/mod.rs at line 495
- edit in pijul/src/remote/mod.rs at line 500
debug!("Downloading identities");let mut id_path = repo.path.clone();id_path.push(DOT_DIR);id_path.push("identities");remote.set_id_revision(self.update_identities(None, id_path).await?)?; - edit in pijul/src/remote/mod.rs at line 584
let id = self.get_id(txn).await?.unwrap(); - replacement in pijul/src/remote/mod.rs at line 586
let name = self.name().unwrap();let remote = txn.open_or_create_remote(name).unwrap();let remote = txn.open_or_create_remote(id, self.name().unwrap()).unwrap(); - replacement in pijul/src/remote/mod.rs at line 601
self.pull(repo, txn, channel, &to_pull, &HashSet::new(), true)self.pull(&remote, repo, txn, channel, &to_pull, &HashSet::new(), true) - replacement in pijul/src/remote/mod.rs at line 700
for x in txn.iter_remote(&remote_changes.lock()?.remote, 0)? {let (_, p) = x?;pullable.push(p.a.into()){let rem = remote_changes.lock()?;for x in txn.iter_remote(&rem.remote, 0)? {let (_, p) = x?;pullable.push(p.a.into())} - replacement in pijul/src/remote/mod.rs at line 707
self.pull(repo, txn, local_channel, &pullable, &inodes, true).await?;self.pull(&remote_changes,repo,txn,local_channel,&pullable,&inodes,true,).await?; - edit in pijul/src/remote/local.rs at line 43
pub fn get_id(&self) -> Result<Option<libpijul::pristine::RemoteId>, anyhow::Error> {let txn = self.pristine.txn_begin()?;if let Some(channel) = txn.load_channel(&self.channel)? {Ok(Some(*txn.id(&*channel.read().unwrap())))} else {Ok(None)}} - edit in pijul/src/remote/local.rs at line 91
debug!("from = {:?}", from); - replacement in pijul/src/remote/local.rs at line 94[7.10802]→[7.81477:81504](∅→∅),[7.81477]→[7.81477:81504](∅→∅),[7.81705]→[7.10803:10869](∅→∅),[7.10869]→[7.81770:81807](∅→∅),[7.81770]→[7.81770:81807](∅→∅),[7.81807]→[7.10870:10952](∅→∅),[7.10952]→[7.8775:8838](∅→∅),[7.8838]→[7.11016:11116](∅→∅),[7.11016]→[7.11016:11116](∅→∅),[7.11116]→[7.81959:81977](∅→∅),[7.81959]→[7.81959:81977](∅→∅),[7.81977]→[7.8839:8909](∅→∅),[7.8909]→[7.82033:82051](∅→∅),[7.82033]→[7.82033:82051](∅→∅)
if n >= from {let h_int = remote_txn.get_internal(h)?.unwrap();if paths_.is_empty()|| paths_.iter().any(|x| {remote_txn.get_touched_files(x, Some(h_int)).unwrap().is_some()}){txn.put_remote(remote, n, (h.into(), m.into()))?;}assert!(n >= from);let h_int = remote_txn.get_internal(h)?.unwrap();if paths_.is_empty()|| paths_.iter().any(|x| {remote_txn.get_touched_files(x, Some(h_int)).unwrap().is_some()}){debug!("put_remote {:?} {:?} {:?}", n, h, m);txn.put_remote(remote, n, (h.into(), m.into()))?; - edit in pijul/src/remote/local.rs at line 186
pub async fn update_identities(&mut self,_rev: Option<u64>,mut path: PathBuf,) -> Result<u64, anyhow::Error> {let mut other_path = self.root.join(DOT_DIR);other_path.push("identities");let r = if let Ok(r) = std::fs::read_dir(&other_path) {r} else {return Ok(0);};std::fs::create_dir_all(&path)?;for id in r {let id = id?;let m = id.metadata()?;let p = id.path();path.push(p.file_name().unwrap());if let Ok(ml) = std::fs::metadata(&path) {if ml.modified()? < m.modified()? {std::fs::remove_file(&path)?;} else {continue;}}if std::fs::hard_link(&p, &path).is_err() {std::fs::copy(&p, &path)?;}path.pop();}Ok(0)} - edit in pijul/src/remote/http.rs at line 271
pub async fn get_id(&self) -> Result<Option<libpijul::pristine::RemoteId>, anyhow::Error> {debug!("get_state {:?}", self.url);let url = format!("{}/{}", self.url, super::DOT_DIR);let q = [("channel", self.channel.clone()), ("id", String::new())];let res = self.client.get(&url).query(&q).header(reqwest::header::USER_AGENT, USER_AGENT).send().await?;if !res.status().is_success() {bail!("HTTP error {:?}", res.status())}let resp = res.bytes().await?;debug!("resp = {:?}", resp);Ok(libpijul::pristine::RemoteId::from_bytes(&resp))} - edit in pijul/src/remote/http.rs at line 341
}pub async fn update_identities(&mut self,rev: Option<u64>,mut path: PathBuf,) -> Result<u64, anyhow::Error> {let url = {let mut p = self.url.path().to_string();if !p.ends_with("/") {p.push('/')}p.push_str(super::DOT_DIR);let mut u = self.url.clone();u.set_path(&p);u};let res = self.client.get(url).query(&[("identities",if let Some(rev) = rev {format!("{}", rev)} else {String::new()},)]).header(reqwest::header::USER_AGENT, USER_AGENT).send().await?;if !res.status().is_success() {bail!("HTTP error {:?}", res.status())}use serde_derive::*;#[derive(Debug, Deserialize)]struct Identities {id: Vec<crate::Identity>,rev: u64,}let resp: Identities = res.json().await?;std::fs::create_dir_all(&path)?;for id in resp.id.iter() {path.push(&id.public_key.key);debug!("recv identity: {:?} {:?}", id, path);let mut id_file = std::fs::File::create(&path)?;serde_json::to_writer_pretty(&mut id_file, &id)?;path.pop();}Ok(resp.rev) - edit in pijul/src/main.rs at line 145
log::debug!("{:?}", e); - replacement in pijul/src/config.rs at line 20
pub key_path: String,pub short_name: String,pub key_path: Option<String>,pub name: String, - replacement in pijul/src/config.rs at line 55
pub fn load() -> Result<Global, anyhow::Error> {pub fn load() -> Result<(Global, u64), anyhow::Error> { - replacement in pijul/src/config.rs at line 58
let s = std::fs::read(&dir)let (s, meta) = std::fs::read(&dir).and_then(|x| Ok((x, std::fs::metadata(&dir)?))) - replacement in pijul/src/config.rs at line 66
std::fs::read(&dir)std::fs::read(&dir).and_then(|x| Ok((x, std::fs::metadata(&dir)?))) - replacement in pijul/src/config.rs at line 75
std::fs::read(&dir)std::fs::read(&dir).and_then(|x| Ok((x, std::fs::metadata(&dir)?))) - replacement in pijul/src/config.rs at line 82
Ok(t)let ts = meta.modified()?.duration_since(std::time::SystemTime::UNIX_EPOCH).unwrap().as_secs();Ok((t, ts)) - replacement in pijul/src/commands/unrecord.rs at line 36
let mut repo = Repository::find_root(self.repo_path).await?;let mut repo = Repository::find_root(self.repo_path)?; - replacement in pijul/src/commands/unrecord.rs at line 60
let cfg = crate::config::Global::load()?;let (cfg, _) = crate::config::Global::load()?; - replacement in pijul/src/commands/tag.rs at line 53
let mut repo = Repository::find_root(self.repo_path).await?;let mut repo = Repository::find_root(self.repo_path)?; - edit in pijul/src/commands/tag.rs at line 157
use libpijul::change::Author;let mut b = std::collections::BTreeMap::new(); - replacement in pijul/src/commands/tag.rs at line 160
authors.push(a.to_string().into());b.insert("name".to_string(), a.to_string()); - replacement in pijul/src/commands/tag.rs at line 165
authors.push(k.key.into())b.insert("key".to_string(), k.key);} else {bail!("No identity configured yet. Please use `pijul key` to create one") - edit in pijul/src/commands/tag.rs at line 170
authors.push(Author(b)); - replacement in pijul/src/commands/reset.rs at line 41
let repo = Repository::find_root(self.repo_path).await?;let repo = Repository::find_root(self.repo_path)?; - replacement in pijul/src/commands/record.rs at line 63
let repo = Repository::find_root(self.repo_path.clone()).await?;let repo = Repository::find_root(self.repo_path.clone())?; - replacement in pijul/src/commands/record.rs at line 139
let key = if let Some(mut dir) = crate::config::global_config_dir() {dir.push("secretkey.json");if let Ok(key) = std::fs::File::open(&dir) {let k: libpijul::key::SecretKey = serde_json::from_reader(key)?;let pass = if k.encryption.is_some() {Some(rpassword::read_password_from_tty(Some(&format!("Password for {:?}: ",dir)))?)} else {None};k.load(pass.as_deref())?} else {bail!("Secret key not found, please use `pijul key generate` and try again")}} else {bail!("Secret key not found, please use `pijul key generate` and try again")};let key = super::load_key()?; - edit in pijul/src/commands/record.rs at line 162
let mut path = repo.path.join(libpijul::DOT_DIR);path.push("identities");std::fs::create_dir_all(&path)?;path.push("publickey.json");std::fs::File::create(&path)?; - edit in pijul/src/commands/record.rs at line 208
let mut b = std::collections::BTreeMap::new(); - replacement in pijul/src/commands/record.rs at line 210
authors.push(a.clone().into());b.insert("name".to_string(), a.clone()); - replacement in pijul/src/commands/record.rs at line 215
authors.push(k.key.into())b.insert("key".to_string(), k.key); - replacement in pijul/src/commands/record.rs at line 220
let templates = config.as_ref().ok().and_then(|cfg| cfg.template.as_ref());authors.push(Author(b));let templates = config.as_ref().ok().and_then(|(cfg, _)| cfg.template.as_ref()); - replacement in pijul/src/commands/pushpull.rs at line 36
let repo = Repository::find_root(self.repo_path).await?;let repo = Repository::find_root(self.repo_path)?; - replacement in pijul/src/commands/pushpull.rs at line 42
for r in txn.iter_remotes("")? {for r in txn.iter_remotes(&libpijul::pristine::RemoteId::nil())? { - replacement in pijul/src/commands/pushpull.rs at line 44
writeln!(stdout, " {}", r.name())?;writeln!(stdout, " {}: {}", r.id(), r.lock().unwrap().path.as_str())?; - edit in pijul/src/commands/pushpull.rs at line 48
let remote =if let Some(r) = libpijul::pristine::RemoteId::from_base32(remote.as_bytes()) {r} else {bail!("Could not parse identifier: {:?}", remote)}; - replacement in pijul/src/commands/pushpull.rs at line 55
if !txn.drop_named_remote(&remote)? {writeln!(std::io::stderr(), "Remote not found: {:?}", remote)?if !txn.drop_named_remote(remote)? {bail!("Remote not found: {:?}", remote) - replacement in pijul/src/commands/pushpull.rs at line 130
let repo = Repository::find_root(self.repo_path).await?;let repo = Repository::find_root(self.repo_path)?; - edit in pijul/src/commands/pushpull.rs at line 166
true, - replacement in pijul/src/commands/pushpull.rs at line 291
let mut repo = Repository::find_root(self.repo_path).await?;let mut repo = Repository::find_root(self.repo_path)?; - edit in pijul/src/commands/pushpull.rs at line 321
true, - edit in pijul/src/commands/pushpull.rs at line 327
let remote_changes = remote.update_changelist(&mut txn, &self.path).await?; - edit in pijul/src/commands/pushpull.rs at line 329
let remote_changes = remote.update_changelist(&mut txn, &self.path).await?; - replacement in pijul/src/commands/pushpull.rs at line 331
if let Some((inodes_, remote_changes)) = remote_changes {if let Some((inodes_, remote_changes)) = remote_changes.as_ref() { - edit in pijul/src/commands/pushpull.rs at line 408
&remote_changes.as_ref().unwrap().1, - edit in pijul/src/commands/protocol.rs at line 30
static ref ID: Regex = Regex::new(r#"id\s+(\S+)\s+"#).unwrap();static ref IDENTITIES: Regex = Regex::new(r#"identities(\s+([0-9]+))?\s+"#).unwrap(); - replacement in pijul/src/commands/protocol.rs at line 53
let mut repo = Repository::find_root(self.repo_path).await?;let mut repo = Repository::find_root(self.repo_path)?; - replacement in pijul/src/commands/protocol.rs at line 67
if let Some(cap) = STATE.captures(&buf) {if let Some(cap) = ID.captures(&buf) {let channel = load_channel(&txn, &cap[1])?;let c = channel.read().unwrap();writeln!(o, "{}", c.id)?;o.flush()?;} else if let Some(cap) = STATE.captures(&buf) { - edit in pijul/src/commands/protocol.rs at line 241
} else if let Some(cap) = IDENTITIES.captures(&buf) {let last_touched: u64 = if let Some(last) = cap.get(2) {last.as_str().parse().unwrap()} else {0};let mut id_dir = repo.path.clone();id_dir.push(DOT_DIR);id_dir.push("identities");let r = if let Ok(r) = std::fs::read_dir(&id_dir) {r} else {continue;};for id in r {let id = id?;let m = id.metadata()?;let p = id.path();debug!("{:?}", p);let mod_ts = m.modified()?.duration_since(std::time::SystemTime::UNIX_EPOCH).unwrap().as_secs();if mod_ts >= last_touched {let mut done = HashSet::new();if p.file_name() == Some("publickey.json".as_ref()) {let public_key: libpijul::key::PublicKey =if let Some(mut dir) = crate::config::global_config_dir() {dir.push("publickey.json");let mut pkf = std::fs::File::open(&dir)?;serde_json::from_reader(&mut pkf)?} else {continue;};if !done.insert(public_key.key.clone()) {continue;}if let Ok((config, last_modified)) = crate::config::Global::load() {serde_json::to_writer(&mut o,&crate::Identity {public_key,email: config.author.email,name: config.author.full_name,login: config.author.name,origin: String::new(),last_modified,},).unwrap();writeln!(o)?;o.flush()?;} else {debug!("no global config");}} else {let mut idf = if let Ok(f) = std::fs::File::open(&p) {f} else {continue;};let id: Result<crate::Identity, _> = serde_json::from_reader(&mut idf);if let Ok(id) = id {if !done.insert(id.public_key.key.clone()) {continue;}serde_json::to_writer(&mut o, &id).unwrap();writeln!(o)?;o.flush()?;}}}}writeln!(o)?;o.flush()?; - edit in pijul/src/commands/mod.rs at line 1
use anyhow::bail; - replacement in pijul/src/commands/mod.rs at line 190
write!(v, "{}", a.name).unwrap();if let Some(s) = a.0.get("name") {write!(v, "{}", s).unwrap()} else if let Some(k) = a.0.get("key") {write!(v, "{}", k).unwrap()} - replacement in pijul/src/commands/mod.rs at line 229
public_key: libpijul::key::PublicKey,name: String,pub public_key: libpijul::key::PublicKey,pub login: String,#[serde(default, skip_serializing_if = "Option::is_none")]pub name: Option<String>, - replacement in pijul/src/commands/mod.rs at line 234
origin: String,pub origin: String, - replacement in pijul/src/commands/mod.rs at line 236
email: Option<String>,pub email: Option<String>,pub last_modified: u64,}fn load_key() -> Result<libpijul::key::SKey, anyhow::Error> {if let Some(mut dir) = crate::config::global_config_dir() {dir.push("secretkey.json");if let Ok(key) = std::fs::File::open(&dir) {let k: libpijul::key::SecretKey = serde_json::from_reader(key)?;let pass = if k.encryption.is_some() {Some(rpassword::read_password_from_tty(Some(&format!("Password for {:?}: ",dir)))?)} else {None};Ok(k.load(pass.as_deref())?)} else {bail!("Secret key not found, please use `pijul key generate` and try again")}} else {bail!("Secret key not found, please use `pijul key generate` and try again")} - replacement in pijul/src/commands/log.rs at line 34
let repo = unsafe { Repository::find_root(self.repo_path).await? };let repo = Repository::find_root(self.repo_path)?; - replacement in pijul/src/commands/log.rs at line 57
let mut id_path = if let Some(mut dir) = crate::config::global_config_dir() {dir.push("identities");Some(dir)} else {None};let mut id_path = repo.path.join(libpijul::DOT_DIR);id_path.push("identities"); - replacement in pijul/src/commands/log.rs at line 68
for auth in header.authors.into_iter() {let auth = match authors.entry(auth.name) {Entry::Occupied(e) => e.into_mut(),Entry::Vacant(e) => {let mut id = None;if let Some(ref mut p) = id_path {p.push(e.key());if let Ok(f) = std::fs::File::open(&p) {for mut auth in header.authors.into_iter() {let auth = if let Some(k) = auth.0.remove("key") {match authors.entry(k) {Entry::Occupied(e) => e.into_mut(),Entry::Vacant(e) => {let mut id = None;id_path.push(e.key());if let Ok(f) = std::fs::File::open(&id_path) { - replacement in pijul/src/commands/log.rs at line 82
p.pop();}if let Some(id) = id {e.insert(id.name)} else {let k = e.key().to_string();e.insert(k)id_path.pop();if let Some(id) = id {e.insert(id.login)} else {let k = e.key().to_string();e.insert(k)} - edit in pijul/src/commands/log.rs at line 91
} else {auth.0.get("name").unwrap() - edit in pijul/src/commands/key.rs at line 2
use crate::repository::Repository; - edit in pijul/src/commands/key.rs at line 4
use chrono::Datelike; - edit in pijul/src/commands/key.rs at line 6
- replacement in pijul/src/commands/key.rs at line 21
name: String,login: String,},Prove {#[clap(short = 'k')]no_cert_check: bool,remote: String, - replacement in pijul/src/commands/key.rs at line 33
Some(SubCommand::Generate { email, name }) => {Some(SubCommand::Generate { email, login }) => { - edit in pijul/src/commands/key.rs at line 42
let expires = chrono::Utc::now();let expires = expires.with_year(expires.year() + 1).unwrap(); - replacement in pijul/src/commands/key.rs at line 51
let k = libpijul::key::SKey::generate(expires);let k = libpijul::key::SKey::generate(None); - replacement in pijul/src/commands/key.rs at line 76
name,login, - edit in pijul/src/commands/key.rs at line 78
name: None,last_modified: std::time::SystemTime::now().duration_since(std::time::SystemTime::UNIX_EPOCH).unwrap().as_secs(), - edit in pijul/src/commands/key.rs at line 88
Some(SubCommand::Prove {remote,no_cert_check,}) => {let mut remote = if let Ok(repo) = Repository::find_root(None) {use crate::remote::*;if let RemoteRepo::Ssh(ssh) = repo.remote(None, &remote, crate::DEFAULT_CHANNEL, no_cert_check, false).await?{ssh} else {bail!("No such remote: {}", remote)}} else if let Some(mut ssh) = crate::remote::ssh::ssh_remote(&remote, false) {ssh.connect(&remote, crate::DEFAULT_CHANNEL).await?} else {bail!("No such remote: {}", remote)};let key = super::load_key()?;remote.prove(key).await?;} - replacement in pijul/src/commands/fork.rs at line 26
let repo = Repository::find_root(self.repo_path).await?;let repo = Repository::find_root(self.repo_path)?; - replacement in pijul/src/commands/file_operations.rs at line 29
let repo = Repository::find_root(self.repo_path.clone()).await?;let repo = Repository::find_root(self.repo_path.clone())?; - replacement in pijul/src/commands/file_operations.rs at line 103
let repo = unsafe { Repository::find_root(self.repo_path).await? };let repo = Repository::find_root(self.repo_path)?; - replacement in pijul/src/commands/file_operations.rs at line 131
let repo = Repository::find_root(self.repo_path.clone()).await?;let repo = Repository::find_root(self.repo_path.clone())?; - replacement in pijul/src/commands/file_operations.rs at line 198
let repo = Repository::find_root(self.repo_path.clone()).await?;let repo = Repository::find_root(self.repo_path.clone())?; - replacement in pijul/src/commands/diff.rs at line 37
let repo = Repository::find_root(self.repo_path.clone()).await?;let repo = Repository::find_root(self.repo_path.clone())?; - replacement in pijul/src/commands/diff.rs at line 270
if let Ok(global) = crate::config::Global::load() {if let Ok((global, _)) = crate::config::Global::load() { - replacement in pijul/src/commands/debug.rs at line 21
let repo = Repository::find_root(self.repo_path).await?;let repo = Repository::find_root(self.repo_path)?; - edit in pijul/src/commands/debug.rs at line 39
libpijul::pristine::debug_remotes(&txn); - replacement in pijul/src/commands/credit.rs at line 28
let repo = Repository::find_root(self.repo_path).await?;let repo = Repository::find_root(self.repo_path)?; - replacement in pijul/src/commands/clone.rs at line 38
let mut remote =crate::remote::unknown_remote(None, &self.remote, &self.channel, self.no_cert_check).await?;let mut remote = crate::remote::unknown_remote(None,&self.remote,&self.channel,self.no_cert_check,true,).await?; - replacement in pijul/src/commands/channel.rs at line 42
let repo = Repository::find_root(self.repo_path).await?;let repo = Repository::find_root(self.repo_path)?; - replacement in pijul/src/commands/channel.rs at line 57
let repo = Repository::find_root(self.repo_path).await?;let repo = Repository::find_root(self.repo_path)?; - replacement in pijul/src/commands/channel.rs at line 79
let repo = Repository::find_root(self.repo_path).await?;let repo = Repository::find_root(self.repo_path)?; - replacement in pijul/src/commands/channel.rs at line 99
let repo = Repository::find_root(self.repo_path).await?;let repo = Repository::find_root(self.repo_path)?; - replacement in pijul/src/commands/change.rs at line 22
let repo = unsafe { Repository::find_root(self.repo_path.clone()).await? };let repo = Repository::find_root(self.repo_path.clone())?; - edit in pijul/src/commands/archive.rs at line 87
true, - replacement in pijul/src/commands/archive.rs at line 107
if let Ok(repo) = Repository::find_root(self.repo_path.clone()).await {if let Ok(repo) = Repository::find_root(self.repo_path.clone()) { - replacement in pijul/src/commands/apply.rs at line 31
let repo = Repository::find_root(self.repo_path).await?;let repo = Repository::find_root(self.repo_path)?; - replacement in pijul/Cargo.toml at line 66
reqwest = { version = "0.11", features = [ "stream" ] }reqwest = { version = "0.11", features = [ "stream", "json" ] } - edit in libpijul/src/tag.rs at line 216
id: {let mut rng = rand::thread_rng();use rand::Rng;let mut m = crate::pristine::RemoteId([0; 16]);for m in m.0.iter_mut() {*m = rng.gen()}m}, - replacement in libpijul/src/pristine/sanakirja.rs at line 269
channels: UDb<SmallStr, T8>,remotes: UDb<SmallStr, T3>,channels: UDb<SmallStr, SerializedChannel>,remotes: UDb<RemoteId, SerializedRemote>, - replacement in libpijul/src/pristine/sanakirja.rs at line 273
open_remotes: Mutex<HashMap<SmallString, RemoteRef<Self>>>,open_remotes: Mutex<HashMap<RemoteId, RemoteRef<Self>>>, - edit in libpijul/src/pristine/sanakirja.rs at line 278
direct_repr!(SerializedPublicKey); - replacement in libpijul/src/pristine/sanakirja.rs at line 318
let graph: Db<Vertex<ChangeId>, SerializedEdge> = Db::from_page(tup.0[0].into());let changes: Db<ChangeId, L64> = Db::from_page(tup.0[1].into());let graph: Db<Vertex<ChangeId>, SerializedEdge> = Db::from_page(tup.graph.into());let changes: Db<ChangeId, L64> = Db::from_page(tup.changes.into()); - replacement in libpijul/src/pristine/sanakirja.rs at line 321[7.7710]→[7.7710:7759](∅→∅),[7.7759]→[7.62893:62979](∅→∅),[7.62893]→[7.62893:62979](∅→∅),[7.62979]→[7.22832:22914](∅→∅)
UDb::from_page(tup.0[2].into());let states: UDb<SerializedMerkle, L64> = UDb::from_page(tup.0[3].into());let tags: UDb<L64, SerializedHash> = UDb::from_page(tup.0[4].into());UDb::from_page(tup.revchanges.into());let states: UDb<SerializedMerkle, L64> = UDb::from_page(tup.states.into());let tags: UDb<L64, SerializedHash> = UDb::from_page(tup.tags.into()); - replacement in libpijul/src/pristine/sanakirja.rs at line 339
debug!("check: remote name: {:?}", name.as_str());let remote: UDb<SmallStr, T3> = UDb::from_page(tup.0[0].into());let rev: UDb<SerializedHash, L64> = UDb::from_page(tup.0[1].into());let states: UDb<SerializedMerkle, L64> = UDb::from_page(tup.0[2].into());debug!("check: remote name: {:?}", name);let remote: UDb<RemoteId, SerializedRemote> = UDb::from_page(tup.remote.into());let rev: UDb<SerializedHash, L64> = UDb::from_page(tup.rev.into());let states: UDb<SerializedMerkle, L64> = UDb::from_page(tup.states.into()); - edit in libpijul/src/pristine/sanakirja.rs at line 678
pub id: RemoteId, - edit in libpijul/src/pristine/sanakirja.rs at line 691
}fn id<'a>(&self, c: &'a Self::Channel) -> &'a RemoteId {&c.id - replacement in libpijul/src/pristine/sanakirja.rs at line 1120
graph: Db::from_page(tup.0[0].into()),changes: Db::from_page(tup.0[1].into()),revchanges: UDb::from_page(tup.0[2].into()),states: UDb::from_page(tup.0[3].into()),tags: UDb::from_page(tup.0[4].into()),apply_counter: tup.0[5].into(),last_modified: tup.0[6].into(),graph: Db::from_page(tup.graph.into()),changes: Db::from_page(tup.changes.into()),revchanges: UDb::from_page(tup.revchanges.into()),states: UDb::from_page(tup.states.into()),tags: UDb::from_page(tup.tags.into()),apply_counter: tup.apply_counter.into(),last_modified: tup.last_modified.into(),id: tup.id, - replacement in libpijul/src/pristine/sanakirja.rs at line 1244
fn load_remote(&self, name: &str) -> Result<Option<RemoteRef<Self>>, TxnErr<Self::GraphError>> {let name = SmallString::from_str(name);fn load_remote(&self,name: &RemoteId,) -> Result<Option<RemoteRef<Self>>, TxnErr<Self::GraphError>> {let name = name.to_owned(); - replacement in libpijul/src/pristine/sanakirja.rs at line 1251
Some((name_, remote)) if name.as_ref() == name_ => {Some((name_, remote)) if name == *name_ => { - replacement in libpijul/src/pristine/sanakirja.rs at line 1254
remote: UDb::from_page(remote.0[0].into()),rev: UDb::from_page(remote.0[1].into()),states: UDb::from_page(remote.0[2].into()),remote: UDb::from_page(remote.remote.into()),rev: UDb::from_page(remote.rev.into()),states: UDb::from_page(remote.states.into()),id_rev: remote.id_rev.into(),path: remote.path.to_owned(), - replacement in libpijul/src/pristine/sanakirja.rs at line 1276
name: name.clone(),id: name, - replacement in libpijul/src/pristine/sanakirja.rs at line 1287
type Channels = UDb<SmallStr, T8>;type ChannelsCursor = ::sanakirja::btree::cursor::Cursor<SmallStr, T8, UP<SmallStr, T8>>;sanakirja_cursor!(channels, SmallStr, T8,);type Channels = UDb<SmallStr, SerializedChannel>;type ChannelsCursor = ::sanakirja::btree::cursor::Cursor<SmallStr,SerializedChannel,UP<SmallStr, SerializedChannel>,>;sanakirja_cursor!(channels, SmallStr, SerializedChannel); - replacement in libpijul/src/pristine/sanakirja.rs at line 1304
type Remotes = UDb<SmallStr, T3>;type RemotesCursor = ::sanakirja::btree::cursor::Cursor<SmallStr, T3, UP<SmallStr, T3>>;sanakirja_cursor!(remotes, SmallStr, T3);type Remotes = UDb<RemoteId, SerializedRemote>;type RemotesCursor = ::sanakirja::btree::cursor::Cursor<RemoteId,SerializedRemote,UP<RemoteId, SerializedRemote>,>;sanakirja_cursor!(remotes, RemoteId, SerializedRemote); - replacement in libpijul/src/pristine/sanakirja.rs at line 1313
start: &str,start: &RemoteId, - edit in libpijul/src/pristine/sanakirja.rs at line 1315
let name = SmallString::from_str(start); - replacement in libpijul/src/pristine/sanakirja.rs at line 1316
cursor.set(&self.txn, &name, None)?;cursor.set(&self.txn, start, None)?; - replacement in libpijul/src/pristine/sanakirja.rs at line 1367
name: &str,name: RemoteId, - replacement in libpijul/src/pristine/sanakirja.rs at line 1369
let name = SmallString::from_str(name);let name = name.to_owned(); - replacement in libpijul/src/pristine/sanakirja.rs at line 1372
Some((name_, remote)) if name_ == name.as_ref() => {Some((name_, remote)) if *name_ == name => { - replacement in libpijul/src/pristine/sanakirja.rs at line 1375
remote: UDb::from_page(remote.0[0].into()),rev: UDb::from_page(remote.0[1].into()),states: UDb::from_page(remote.0[2].into()),remote: UDb::from_page(remote.remote.into()),rev: UDb::from_page(remote.rev.into()),states: UDb::from_page(remote.states.into()),id_rev: remote.id_rev.into(),path: remote.path.to_owned(), - replacement in libpijul/src/pristine/sanakirja.rs at line 1381
name: name.clone(),id: name, - replacement in libpijul/src/pristine/sanakirja.rs at line 1774
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()),tags: UDb::from_page(b.0[4].into()),apply_counter: b.0[5].into(),last_modified: b.0[6].into(),graph: Db::from_page(b.graph.into()),changes: Db::from_page(b.changes.into()),revchanges: UDb::from_page(b.revchanges.into()),states: UDb::from_page(b.states.into()),tags: UDb::from_page(b.tags.into()),apply_counter: b.apply_counter.into(),last_modified: b.last_modified.into(),id: b.id, - edit in libpijul/src/pristine/sanakirja.rs at line 1793
id: {let mut rng = rand::thread_rng();use rand::Rng;let mut x = RemoteId([0; 16]);for x in x.0.iter_mut() {*x = rng.gen()}x}, - edit in libpijul/src/pristine/sanakirja.rs at line 1850
id: {let mut rng = rand::thread_rng();use rand::Rng;let mut x = RemoteId([0; 16]);for x in x.0.iter_mut() {*x = rng.gen()}x}, - replacement in libpijul/src/pristine/sanakirja.rs at line 1923
Db::from_page(chan.0[0].into()),Db::from_page(chan.0[1].into()),UDb::from_page(chan.0[2].into()),UDb::from_page(chan.0[3].into()),UDb::from_page(chan.0[4].into()),Db::from_page(chan.graph.into()),Db::from_page(chan.changes.into()),UDb::from_page(chan.revchanges.into()),UDb::from_page(chan.states.into()),UDb::from_page(chan.tags.into()), - replacement in libpijul/src/pristine/sanakirja.rs at line 1986
fn open_or_create_remote(&mut self, name: &str) -> Result<RemoteRef<Self>, Self::GraphError> {let name = crate::small_string::SmallString::from_str(name);fn open_or_create_remote(&mut self,id: RemoteId,path: &str,) -> Result<RemoteRef<Self>, Self::GraphError> { - replacement in libpijul/src/pristine/sanakirja.rs at line 1992
match self.open_remotes.lock().unwrap().entry(name.clone()) {match self.open_remotes.lock().unwrap().entry(id) { - replacement in libpijul/src/pristine/sanakirja.rs at line 1994
let r = match btree::get(&self.txn, &self.remotes, &name, None)? {Some((name_, remote)) if name_ == name.as_ref() => RemoteRef {let r = match btree::get(&self.txn, &self.remotes, &id, None)? {Some((name_, remote)) if *name_ == id => RemoteRef { - replacement in libpijul/src/pristine/sanakirja.rs at line 1997
remote: UDb::from_page(remote.0[0].into()),rev: UDb::from_page(remote.0[1].into()),states: UDb::from_page(remote.0[2].into()),remote: UDb::from_page(remote.remote.into()),rev: UDb::from_page(remote.rev.into()),states: UDb::from_page(remote.states.into()),id_rev: remote.id_rev.into(),path: SmallString::from_str(path), - replacement in libpijul/src/pristine/sanakirja.rs at line 2003
name: name.clone(),id, - edit in libpijul/src/pristine/sanakirja.rs at line 2011
id_rev: 0u64.into(),path: SmallString::from_str(path), - replacement in libpijul/src/pristine/sanakirja.rs at line 2014
name: name.clone(),id, - replacement in libpijul/src/pristine/sanakirja.rs at line 2027
Ok(selfOk(self.open_remotes.lock().unwrap().get(&id).unwrap().clone())}fn drop_remote(&mut self, remote: RemoteRef<Self>) -> Result<bool, Self::GraphError> {let r = self - replacement in libpijul/src/pristine/sanakirja.rs at line 2035[7.67788]→[7.67788:67856](∅→∅),[7.67856]→[7.569559:569566](∅→∅),[7.569559]→[7.569559:569566](∅→∅),[7.569566]→[7.53284:53375](∅→∅),[7.16397]→[7.569654:569694](∅→∅),[7.53375]→[7.569654:569694](∅→∅),[7.569654]→[7.569654:569694](∅→∅),[7.569694]→[7.67857:67931](∅→∅)
.get(&name).unwrap().clone())}fn drop_remote(&mut self, remote: RemoteRef<Self>) -> Result<bool, Self::GraphError> {let name = remote.name.clone();let r = self.open_remotes.lock().unwrap().remove(&name).unwrap();.remove(&remote.id).unwrap(); - replacement in libpijul/src/pristine/sanakirja.rs at line 2039
Ok(btree::del(&mut self.txn, &mut self.remotes, &name, None)?)Ok(btree::del(&mut self.txn, &mut self.remotes, &r.id, None)?) - replacement in libpijul/src/pristine/sanakirja.rs at line 2042[7.570030]→[7.53376:53460](∅→∅),[7.16477]→[7.570111:570159](∅→∅),[7.53460]→[7.570111:570159](∅→∅),[7.570111]→[7.570111:570159](∅→∅),[7.570159]→[7.67982:68057](∅→∅)
fn drop_named_remote(&mut self, name: &str) -> Result<bool, Self::GraphError> {let name = SmallString::from_str(name);if let Some(r) = self.open_remotes.lock().unwrap().remove(&name) {fn drop_named_remote(&mut self, id: RemoteId) -> Result<bool, Self::GraphError> {if let Some(r) = self.open_remotes.lock().unwrap().remove(&id) { - replacement in libpijul/src/pristine/sanakirja.rs at line 2046
Ok(btree::del(&mut self.txn, &mut self.remotes, &name, None)?)Ok(btree::del(&mut self.txn, &mut self.remotes, &id, None)?) - edit in libpijul/src/pristine/sanakirja.rs at line 2096
- replacement in libpijul/src/pristine/sanakirja.rs at line 2113
graph: Db::from_page(c.0[0].into()),changes: Db::from_page(c.0[1].into()),revchanges: UDb::from_page(c.0[2].into()),states: UDb::from_page(c.0[3].into()),tags: UDb::from_page(c.0[4].into()),apply_counter: c.0[5].into(),last_modified: c.0[6].into(),graph: Db::from_page(c.graph.into()),changes: Db::from_page(c.changes.into()),revchanges: UDb::from_page(c.revchanges.into()),states: UDb::from_page(c.states.into()),tags: UDb::from_page(c.tags.into()),apply_counter: c.apply_counter.into(),last_modified: c.last_modified.into(),id: c.id, - replacement in libpijul/src/pristine/sanakirja.rs at line 2144[7.13754]→[7.26317:26339](∅→∅),[7.26339]→[7.94110:94266](∅→∅),[7.94110]→[7.94110:94266](∅→∅),[7.94266]→[7.26340:26376](∅→∅),[7.26376]→[7.94266:94350](∅→∅),[7.94266]→[7.94266:94350](∅→∅),[7.94350]→[7.26377:26402](∅→∅),[7.26402]→[7.94350:94362](∅→∅),[7.94350]→[7.94350:94362](∅→∅),[7.94362]→[7.26403:26479](∅→∅)
let t8 = T8([channel.graph.db.into(),channel.changes.db.into(),channel.revchanges.db.into(),channel.states.db.into(),channel.tags.db.into(),channel.apply_counter.into(),channel.last_modified.into(),0u64.into(),]);btree::put(&mut self.txn, &mut self.channels, &channel.name, &t8)?;let sc = SerializedChannel {graph: channel.graph.db.into(),changes: channel.changes.db.into(),revchanges: channel.revchanges.db.into(),states: channel.states.db.into(),tags: channel.tags.db.into(),apply_counter: channel.apply_counter.into(),last_modified: channel.last_modified.into(),id: channel.id,};btree::put(&mut self.txn, &mut self.channels, &channel.name, &sc)?; - replacement in libpijul/src/pristine/sanakirja.rs at line 2170
btree::del(&mut self.txn, &mut self.remotes, &remote.name, None)?;btree::del(&mut self.txn, &mut self.remotes, &remote.id, None)?; - replacement in libpijul/src/pristine/sanakirja.rs at line 2173[7.68708]→[7.94733:94780](∅→∅),[7.575536]→[7.94733:94780](∅→∅),[7.94780]→[7.575585:575616](∅→∅),[7.575585]→[7.575585:575616](∅→∅),[7.575616]→[7.94781:94807](∅→∅),[7.94807]→[7.13908:13984](∅→∅),[7.13984]→[7.575729:575741](∅→∅),[7.94945]→[7.575729:575741](∅→∅),[7.575729]→[7.575729:575741](∅→∅)
btree::put(&mut self.txn,&mut self.remotes,&remote.name,&T3([r.remote.db.into(), r.rev.db.into(), r.states.db.into()]),)?;let rr = OwnedSerializedRemote {_remote: r.remote.db.into(),_rev: r.rev.db.into(),_states: r.states.db.into(),_id_rev: r.id_rev.into(),_path: r.path.clone(),};debug!("put {:?}", rr);btree::put(&mut self.txn, &mut self.remotes, &remote.id, &rr)?; - replacement in libpijul/src/pristine/sanakirja.rs at line 2187
std::mem::drop(self.open_remotes.lock().unwrap().remove(&remote.name));std::mem::drop(self.open_remotes.lock().unwrap().remove(&remote.id)); - replacement in libpijul/src/pristine/sanakirja.rs at line 2291
direct_repr!(T3);direct_repr!(T8);[7.97813]impl Storable for SerializedRemote {type PageReferences = std::iter::Empty<u64>;fn page_references(&self) -> Self::PageReferences {std::iter::empty()}fn compare<T: LoadPage>(&self, _t: &T, b: &Self) -> core::cmp::Ordering {self.cmp(b)}}impl UnsizedStorable for SerializedRemote {const ALIGN: usize = 8;fn size(&self) -> usize {33 + self.path.len()}unsafe fn onpage_size(p: *const u8) -> usize {33 + (*p.add(32)) as usize}unsafe fn from_raw_ptr<'a, T>(_: &T, p: *const u8) -> &'a Self {let len = *p.add(32) as usize;let m: &SerializedRemote =std::mem::transmute(std::slice::from_raw_parts(p, 1 + len as usize));m}unsafe fn write_to_page(&self, p: *mut u8) {std::ptr::copy(&self.remote as *const L64 as *const u8,p,33 + self.path.len(),);debug!("write_to_page: {:?}",std::slice::from_raw_parts(p, 33 + self.path.len()));}}#[derive(Debug)]struct OwnedSerializedRemote {_remote: L64,_rev: L64,_states: L64,_id_rev: L64,_path: SmallString,}impl std::ops::Deref for OwnedSerializedRemote {type Target = SerializedRemote;fn deref(&self) -> &Self::Target {let len = 33 + self._path.len() as usize;unsafe {std::mem::transmute(std::slice::from_raw_parts(self as *const Self as *const u8,len,))}}}direct_repr!(SerializedChannel);direct_repr!(RemoteId); - replacement in libpijul/src/pristine/mod.rs at line 113
#[derive(Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq)]#[derive(Debug, PartialOrd, Ord, PartialEq, Eq)] - replacement in libpijul/src/pristine/mod.rs at line 115
pub struct T3([L64; 3]);pub struct SerializedRemote {remote: L64,rev: L64,states: L64,id_rev: L64,path: SmallStr,} - replacement in libpijul/src/pristine/mod.rs at line 125
pub struct T8([L64; 8]);pub struct SerializedChannel {graph: L64,changes: L64,revchanges: L64,states: L64,tags: L64,apply_counter: L64,last_modified: L64,id: RemoteId,} - replacement in libpijul/src/pristine/mod.rs at line 176
pub fn name(&self) -> &str {self.name.as_str()pub fn id(&self) -> &RemoteId {&self.id - edit in libpijul/src/pristine/mod.rs at line 183
pub fn id_revision(&self) -> Result<u64, PoisonError> {Ok(self.lock()?.id_rev.into())}pub fn set_id_revision(&self, rev: u64) -> Result<(), PoisonError> {self.lock()?.id_rev = rev.into();Ok(())} - edit in libpijul/src/pristine/mod.rs at line 198
pub id_rev: L64,pub path: SmallString, - replacement in libpijul/src/pristine/mod.rs at line 204
name: SmallString,id: RemoteId, - replacement in libpijul/src/pristine/mod.rs at line 211
name: self.name.clone(),id: self.id.clone(),}}}#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]pub struct RemoteId(pub(crate) [u8; 16]);impl RemoteId {pub fn nil() -> Self {RemoteId([0; 16])}pub fn from_bytes(b: &[u8]) -> Option<Self> {if b.len() < 16 {return None;}let mut x = RemoteId([0; 16]);unsafe {std::ptr::copy_nonoverlapping(b.as_ptr(), x.0.as_mut_ptr(), 16);}Some(x)}pub fn as_bytes(&self) -> &[u8; 16] {&self.0}pub fn from_base32(b: &[u8]) -> Option<Self> {let mut bb = RemoteId([0; 16]);if data_encoding::BASE32_NOPAD.decode_mut(b, &mut bb.0).is_ok() {Some(bb)} else {None - edit in libpijul/src/pristine/mod.rs at line 244
}}impl std::fmt::Display for RemoteId {fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {write!(fmt, "{}", data_encoding::BASE32_NOPAD.encode(&self.0)) - edit in libpijul/src/pristine/mod.rs at line 327
fn id<'a>(&self, c: &'a Self::Channel) -> &'a RemoteId; - replacement in libpijul/src/pristine/mod.rs at line 571
cursor!(channels, SmallStr, T8);cursor!(channels, SmallStr, SerializedChannel); - replacement in libpijul/src/pristine/mod.rs at line 588
fn load_remote(&self, name: &str) -> Result<Option<RemoteRef<Self>>, TxnErr<Self::GraphError>>;fn load_remote(&self,name: &RemoteId,) -> Result<Option<RemoteRef<Self>>, TxnErr<Self::GraphError>>; - replacement in libpijul/src/pristine/mod.rs at line 602
start: &str,start: &RemoteId, - replacement in libpijul/src/pristine/mod.rs at line 606
cursor!(remotes, SmallStr, T3);cursor!(remotes, RemoteId, SerializedRemote); - replacement in libpijul/src/pristine/mod.rs at line 639
name: &str,name: RemoteId, - edit in libpijul/src/pristine/mod.rs at line 665
}#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]pub struct SerializedPublicKey {algorithm: crate::key::Algorithm,key: [u8; 32], - edit in libpijul/src/pristine/mod.rs at line 967
// #[cfg(debug_assertions)]pub fn debug_remotes<T: TxnT>(txn: &T) {for t in txn.iter_remotes(&RemoteId([0; 16])).unwrap() {let rem = t.unwrap();debug!("{:?}", rem.id());for x in txn.iter_remote(&rem.lock().unwrap().remote, 0).unwrap() {debug!(" {:?}", x.unwrap());}}} - replacement in libpijul/src/pristine/mod.rs at line 1564
Ok(Some((name, _))) => self.txn.load_remote(name.as_str()).transpose(),Ok(Some((name, _))) => self.txn.load_remote(name).transpose(), - replacement in libpijul/src/pristine/mod.rs at line 1702
fn open_or_create_remote(&mut self, name: &str) -> Result<RemoteRef<Self>, Self::GraphError>;fn open_or_create_remote(&mut self,id: RemoteId,path: &str,) -> Result<RemoteRef<Self>, Self::GraphError>; - replacement in libpijul/src/pristine/mod.rs at line 1723
fn drop_named_remote(&mut self, remote: &str) -> Result<bool, Self::GraphError>;fn drop_named_remote(&mut self, id: RemoteId) -> Result<bool, Self::GraphError>; - edit in libpijul/src/pristine/inode_metadata.rs at line 22
pub fn from_basename(b: &[u8]) -> Self {use byteorder::ByteOrder;InodeMetadata(byteorder::BigEndian::read_u16(b))} - edit in libpijul/src/key.rs at line 1
use ed25519_dalek::Signer; - edit in libpijul/src/key.rs at line 5
pub const CONTEXT: &'static [u8] = b"pijul"; - replacement in libpijul/src/key.rs at line 9
#[error("Base 32 decoding error")]Encoding,#[error("Base 58 decoding error")]Encoding(#[from] bs58::decode::Error), - edit in libpijul/src/key.rs at line 17
}impl From<data_encoding::DecodePartial> for KeyError {fn from(_: data_encoding::DecodePartial) -> Self {KeyError::Encoding}}impl From<data_encoding::DecodeError> for KeyError {fn from(_: data_encoding::DecodeError) -> Self {KeyError::Encoding} - replacement in libpijul/src/key.rs at line 23
pub expires: chrono::DateTime<chrono::Utc>,#[serde(default, skip_serializing_if = "Option::is_none")]pub expires: Option<chrono::DateTime<chrono::Utc>>, - replacement in libpijul/src/key.rs at line 33
expires: chrono::DateTime<chrono::Utc>,expires: Option<chrono::DateTime<chrono::Utc>>, - replacement in libpijul/src/key.rs at line 41
pub expires: chrono::DateTime<chrono::Utc>,#[serde(default, skip_serializing_if = "Option::is_none")]pub expires: Option<chrono::DateTime<chrono::Utc>>, - replacement in libpijul/src/key.rs at line 50
expires: chrono::DateTime<chrono::Utc>,expires: Option<chrono::DateTime<chrono::Utc>>, - replacement in libpijul/src/key.rs at line 89
if expires <= &chrono::Utc::now() {return Err(KeyError::Expired);if let Some(expires) = expires {if expires <= &chrono::Utc::now() {return Err(KeyError::Expired);} - replacement in libpijul/src/key.rs at line 94
let mut prehashed = ed25519_dalek::Sha512::new();prehashed.update(h);let sig = key.sign_prehashed(prehashed, Some(CONTEXT)).unwrap();Ok(data_encoding::BASE32_NOPAD.encode(&sig.to_bytes()))let sig = key.sign(&h);Ok(bs58::encode(&sig.to_bytes()).into_string()) - replacement in libpijul/src/key.rs at line 100
pub fn generate(expires: chrono::DateTime<chrono::Utc>) -> Self {pub fn generate(expires: Option<chrono::DateTime<chrono::Utc>>) -> Self { - replacement in libpijul/src/key.rs at line 135
key: data_encoding::BASE32_NOPAD.encode(&key),key: bs58::encode(&key).into_string(), - replacement in libpijul/src/key.rs at line 147
let mut prehashed = ed25519_dalek::Sha512::new();prehashed.update(&to_sign);let sig = key.sign_prehashed(prehashed, Some(CONTEXT)).unwrap();let sig = key.sign(&to_sign); - replacement in libpijul/src/key.rs at line 152
key: data_encoding::BASE32_NOPAD.encode(&key.public.clone().to_bytes()),signature: data_encoding::BASE32_NOPAD.encode(&sig.to_bytes()),key: bs58::encode(&key.public.clone().to_bytes()).into_string(),signature: bs58::encode(&sig.to_bytes()).into_string(), - replacement in libpijul/src/key.rs at line 165
let mut prehashed = ed25519_dalek::Sha512::new();prehashed.update(&to_sign);let sig = key.sign_prehashed(prehashed, Some(CONTEXT)).unwrap();let sig = key.sign(&to_sign); - replacement in libpijul/src/key.rs at line 169
signature: data_encoding::BASE32_NOPAD.encode(&sig.to_bytes()),signature: bs58::encode(&sig.to_bytes()).into_string(), - replacement in libpijul/src/key.rs at line 178
if self.expires <= chrono::Utc::now() {return Err(KeyError::Expired);if let Some(expires) = self.expires {if expires <= chrono::Utc::now() {return Err(KeyError::Expired);} - replacement in libpijul/src/key.rs at line 185
let mut key_enc = data_encoding::BASE32_NOPAD.decode(self.key.as_bytes())?;let mut key_enc = [0; 64];bs58::decode(self.key.as_bytes()).into(&mut key_enc)?; - replacement in libpijul/src/key.rs at line 211
let mut prehashed = ed25519_dalek::Sha512::new();prehashed.update(&signed);data_encoding::BASE32_NOPAD.encode(&prehashed.finalize())let mut hash = ed25519_dalek::Sha512::new();hash.update(&signed);bs58::encode(&hash.finalize()).into_string() - replacement in libpijul/src/key.rs at line 221
let key = ed25519_dalek::PublicKey::from_bytes(&data_encoding::BASE32_NOPAD.decode(self.key.as_bytes())?,)?;let mut key = [0; 32];bs58::decode(self.key.as_bytes()).into(&mut key)?;let key = ed25519_dalek::PublicKey::from_bytes(&key)?; - replacement in libpijul/src/key.rs at line 225
data_encoding::BASE32_NOPAD.decode_mut(self.signature.as_bytes(), &mut signature)?;bs58::decode(self.signature.as_bytes()).into(&mut signature)?; - replacement in libpijul/src/key.rs at line 228
let signed =let msg = - replacement in libpijul/src/key.rs at line 230
debug!("signed {:?}", signed);key.verify_strict(&signed, &signature)?;key.verify_strict(&msg, &signature)?; - replacement in libpijul/src/key.rs at line 253
key: data_encoding::BASE32_NOPAD.encode(key.as_bytes()),key: bs58::encode(key.as_bytes()).into_string(), - replacement in libpijul/src/key.rs at line 266
if expires <= date {return Err(KeyError::Expired);if let Some(expires) = expires {if expires <= date {return Err(KeyError::Expired);} - replacement in libpijul/src/key.rs at line 272
data_encoding::BASE32_NOPAD.decode_mut(signature.as_bytes(), &mut sig)?;bs58::decode(signature.as_bytes()).into(&mut sig)?; - replacement in libpijul/src/key.rs at line 274
let mut prehashed = ed25519_dalek::Sha512::new();prehashed.update(h);key.verify_prehashed(prehashed, Some(CONTEXT), &sig)?;key.verify_strict(&h, &sig)?; - replacement in libpijul/src/key.rs at line 298
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]#[repr(u8)] - edit in libpijul/src/key.rs at line 304
impl From<u8> for Algorithm {fn from(u: u8) -> Self {assert_eq!(u, 0);Algorithm::Ed25519}}impl From<Algorithm> for u8 {fn from(u: Algorithm) -> Self {match u {Algorithm::Ed25519 => 0,}}} - replacement in libpijul/src/changestore/mod.rs at line 100
debug!("filemetadata read: {:?}", buf);trace!("filemetadata read: {:?}", buf); - edit in libpijul/src/changestore/mod.rs at line 105
use byteorder::ByteOrder; - replacement in libpijul/src/changestore/mod.rs at line 106
metadata: InodeMetadata(byteorder::BigEndian::read_u16(a)),metadata: InodeMetadata::from_basename(a), - replacement in libpijul/src/changestore/mod.rs at line 117
debug!("filemetadata write: {:?}", &w[l..]);trace!("filemetadata write: {:?}", &w[l..]); - replacement in libpijul/src/change.rs at line 109
pub struct ChangeHeader {pub struct ChangeHeader_<Author> { - replacement in libpijul/src/change.rs at line 116[6.4972]→[6.4972:5351](∅→∅),[6.5351]→[7.834123:834125](∅→∅),[7.16417]→[7.834123:834125](∅→∅),[7.834123]→[7.834123:834125](∅→∅)
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Default)]pub struct Author {pub name: String,#[serde(default)]pub full_name: Option<String>,#[serde(default)]pub email: Option<String>,}impl From<String> for Author {fn from(name: String) -> Author {Author {name,..Author::default()}}}/// The header of a change contains all the metadata about a change/// (but not the actual contents of a change).pub type ChangeHeader = ChangeHeader_<Author>; - replacement in libpijul/src/change.rs at line 132
pub struct LocalChange<Hunk> {pub struct LocalChange<Hunk, Author> { - replacement in libpijul/src/change.rs at line 134
pub hashed: Hashed<Hunk>,pub hashed: Hashed<Hunk, Author>, - replacement in libpijul/src/change.rs at line 141
impl std::ops::Deref for LocalChange<Hunk<Option<Hash>, Local>> {type Target = Hashed<Hunk<Option<Hash>, Local>>;impl std::ops::Deref for LocalChange<Hunk<Option<Hash>, Local>, Author> {type Target = Hashed<Hunk<Option<Hash>, Local>, Author>; - replacement in libpijul/src/change.rs at line 148
impl std::ops::DerefMut for LocalChange<Hunk<Option<Hash>, Local>> {impl std::ops::DerefMut for LocalChange<Hunk<Option<Hash>, Local>, Author> { - edit in libpijul/src/change.rs at line 153
#[derive(Debug, Clone, Serialize, Deserialize)]pub struct Author(pub std::collections::BTreeMap<String, String>); - replacement in libpijul/src/change.rs at line 162
pub struct Hashed<Hunk> {pub struct Hashed<Hunk, Author> { - replacement in libpijul/src/change.rs at line 166
pub header: ChangeHeader,pub header: ChangeHeader_<Author>, - replacement in libpijul/src/change.rs at line 180
pub type Change = LocalChange<Hunk<Option<Hash>, Local>>;pub type Change = LocalChange<Hunk<Option<Hash>, Local>, Author>; - replacement in libpijul/src/change.rs at line 1193
impl LocalChange<Hunk<Option<Hash>, Local>> {impl LocalChange<Hunk<Option<Hash>, Local>, Author> { - replacement in libpijul/src/change.rs at line 1340
if offsets.version != VERSION {if offsets.version != VERSION && offsets.version != VERSION_NOENC { - replacement in libpijul/src/change.rs at line 1353
debug!("check_from_buffer, buf_ = {:?}", buf_);trace!("check_from_buffer, buf_ = {:?}", buf_); - replacement in libpijul/src/change.rs at line 1366
let hashed: Hashed<Hunk<Option<Hash>, Local>> = bincode::deserialize(&buf_)?;let hashed: Hashed<Hunk<Option<Hash>, Local>, Author> = if offsets.version == VERSION {bincode::deserialize(&buf_)?} else {let h: Hashed<noenc::Hunk<Option<Hash>, Local>, noenc::Author> =bincode::deserialize(&buf_)?;h.into()}; - replacement in libpijul/src/change.rs at line 1379
debug!("contents = {:?}", buf_);trace!("contents = {:?}", buf_); - replacement in libpijul/src/change.rs at line 1415
let hashed: Hashed<Hunk<Option<Hash>, Local>> = {let hashed: Hashed<Hunk<Option<Hash>, Local>, Author> = { - replacement in libpijul/src/change/text_changes.rs at line 38
impl LocalChange<Hunk<Option<Hash>, Local>> {impl LocalChange<Hunk<Option<Hash>, Local>, Author> { - replacement in libpijul/src/change/text_changes.rs at line 111
w.write_all(toml::ser::to_string_pretty(&self.header)?.as_bytes())?;w.write_all(b"\n")?;let s = toml::ser::to_string_pretty(&self.header)?;writeln!(w, "{}", s)?; - edit in libpijul/src/change/noenc.rs at line 61
let encoding = Some(crate::text_encoding::Encoding(encoding_rs::UTF_8)); - replacement in libpijul/src/change/noenc.rs at line 72
encoding: None,encoding, - replacement in libpijul/src/change/noenc.rs at line 82
encoding: None,encoding, - replacement in libpijul/src/change/noenc.rs at line 94
encoding: None,encoding, - replacement in libpijul/src/change/noenc.rs at line 103
encoding: None,encoding, - replacement in libpijul/src/change/noenc.rs at line 113
encoding: None,encoding, - replacement in libpijul/src/change/noenc.rs at line 124
encoding: None,encoding, - edit in libpijul/src/change/noenc.rs at line 139
debug!("offsets = {:?}", offsets); - replacement in libpijul/src/change/noenc.rs at line 142
let hashed: Hashed<Hunk<Option<Hash>, Local>> = {let hashed: Hashed<Hunk<Option<Hash>, Local>, Author> = { - replacement in libpijul/src/change/noenc.rs at line 170
debug!("unhashed = {:?}", unhashed);trace!("unhashed = {:?}", unhashed); - replacement in libpijul/src/change/noenc.rs at line 182
debug!("contents = {:?}", contents);trace!("contents = {:?}", contents); - replacement in libpijul/src/change/noenc.rs at line 193
impl From<Hashed<Hunk<Option<Hash>, Local>>> for Hashed<super::Hunk<Option<Hash>, Local>> {fn from(hashed: Hashed<Hunk<Option<Hash>, Local>>) -> Self {impl From<Hashed<Hunk<Option<Hash>, Local>, Author>>for Hashed<super::Hunk<Option<Hash>, Local>, super::Author>{fn from(hashed: Hashed<Hunk<Option<Hash>, Local>, Author>) -> Self { - replacement in libpijul/src/change/noenc.rs at line 201
header: hashed.header,header: hashed.header.into(), - edit in libpijul/src/change/noenc.rs at line 208[6.13030]
use super::ChangeHeader_;impl From<ChangeHeader_<Author>> for ChangeHeader_<super::Author> {fn from(c: ChangeHeader_<Author>) -> Self {ChangeHeader_ {message: c.message,description: c.description,timestamp: c.timestamp,authors: c.authors.into_iter().map(|x| x.into()).collect(),}}}#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Default)]pub struct Author {pub name: String,#[serde(default)]pub full_name: Option<String>,#[serde(default)]pub email: Option<String>,}impl From<String> for Author {fn from(name: String) -> Author {Author {name,..Author::default()}}}impl From<Author> for super::Author {fn from(c: Author) -> Self {let mut b = std::collections::BTreeMap::new();b.insert("name".to_string(), c.name);if let Some(n) = c.full_name {b.insert("full_name".to_string(), n);}if let Some(n) = c.email {b.insert("email".to_string(), n);}super::Author(b)}} - replacement in libpijul/src/change/change_file.rs at line 7
hashed: Hashed<Hunk<Option<Hash>, Local>>,hashed: Hashed<Hunk<Option<Hash>, Local>, Author>, - replacement in libpijul/src/change/change_file.rs at line 56
let hashed: Hashed<Hunk<Option<Hash>, Local>> = if offsets.version == VERSION {let hashed: Hashed<Hunk<Option<Hash>, Local>, Author> = if offsets.version == VERSION { - replacement in libpijul/src/change/change_file.rs at line 59
debug!("deserialize current version {:?}", buf2.len());trace!("deserialize current version {:?}", buf2.len()); - replacement in libpijul/src/change/change_file.rs at line 65
debug!("deserialize noenc {:?}", buf2.len());let h: Hashed<noenc::Hunk<Option<Hash>, Local>> = bincode::deserialize(&buf2)?;trace!("deserialize noenc {:?}", buf2.len());let h: Hashed<noenc::Hunk<Option<Hash>, Local>, noenc::Author> =bincode::deserialize(&buf2)?; - replacement in libpijul/src/change/change_file.rs at line 79
debug!("parsing unhashed: {:?}", std::str::from_utf8(&buf2));trace!("parsing unhashed: {:?}", std::str::from_utf8(&buf2)); - replacement in libpijul/src/change/change_file.rs at line 108
debug!("read_contents {:?} {:?}", offset, buf.len());trace!("read_contents {:?} {:?}", offset, buf.len()); - replacement in libpijul/src/change/change_file.rs at line 116
pub fn hashed(&self) -> &Hashed<Hunk<Option<Hash>, Local>> {pub fn hashed(&self) -> &Hashed<Hunk<Option<Hash>, Local>, Author> { - edit in libpijul/Cargo.toml at line 140
bs58 = "0.4" - edit in Cargo.lock at line 3
version = 3 - replacement in Cargo.lock at line 7
version = "0.15.1"version = "0.15.2" - replacement in Cargo.lock at line 9
checksum = "03345e98af8f3d786b6d9f656ccfa6ac316d954e92bc4841f0bba20789d5fb5a"checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a" - replacement in Cargo.lock at line 44
version = "1.0.40"version = "1.0.41" - replacement in Cargo.lock at line 46
checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b"checksum = "15af2628f6890fe2609a3b91bef4c83450512802e59489f9c1cb1fa5df064a61" - replacement in Cargo.lock at line 79
version = "0.3.59"version = "0.3.60" - replacement in Cargo.lock at line 81
checksum = "4717cfcbfaa661a0fd48f8453951837ae7e8f81e481fbb136e3202d72805a744"checksum = "b7815ea54e4d821e791162e078acbebfd6d8c8939cd559c9335dceb1c8ca7282" - edit in Cargo.lock at line 142
[[package]]name = "bs58"version = "0.4.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" - replacement in Cargo.lock at line 205
version = "0.1.12"version = "0.1.13" - replacement in Cargo.lock at line 207
checksum = "459978032e1aa8d5ca411ee0057ea84f98a93a648ff9f78654e53f33447cf0f9"checksum = "81a81b0d8f8ee23417182818b4f06312c5f535c2b04eef1773f7c24bbdf8c500" - replacement in Cargo.lock at line 302
version = "0.1.4"version = "0.1.5" - replacement in Cargo.lock at line 304
checksum = "ed00c67cb5d0a7d64a44f6ad2668db7e7530311dd53ea79bcd4fb022c64911c8"checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" - replacement in Cargo.lock at line 529
version = "0.8.3"version = "0.8.4" - replacement in Cargo.lock at line 531
checksum = "17392a012ea30ef05a610aa97dfb49496e71c9f676b27879922ea5bdf60d9d3f"checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" - replacement in Cargo.lock at line 569
"redox_syscall 0.2.8","redox_syscall 0.2.9", - replacement in Cargo.lock at line 793
version = "0.4.6"version = "0.4.8" - replacement in Cargo.lock at line 795
checksum = "c152169ef1e421390738366d2f796655fec62621dabbd0fd476f905934061e4a"checksum = "10463d9ff00a2a068db14231982f5132edebad0d7660cd956a1c30292dbcbfbd" - replacement in Cargo.lock at line 831
version = "0.3.2"version = "0.3.3" - replacement in Cargo.lock at line 833
checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac"checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" - replacement in Cargo.lock at line 840
version = "0.1.18"version = "0.1.19" - replacement in Cargo.lock at line 842
checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c"checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" - replacement in Cargo.lock at line 914
version = "0.14.8"version = "0.14.9" - replacement in Cargo.lock at line 916
checksum = "d3f71a7eea53a3f8257a7b4795373ff886397178cd634430ea94e12d7fe4fe34"checksum = "07d6baa1b441335f3ce5098ac421fb6547c46dda735ca1bc6d0153c838f9dd83" - replacement in Cargo.lock at line 928
"pin-project","pin-project-lite", - replacement in Cargo.lock at line 962
version = "0.4.17"version = "0.4.18" - replacement in Cargo.lock at line 964
checksum = "b287fb45c60bb826a0dc68ff08742b9d88a2fea13d6e0c286b3172065aaf878c"checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" - replacement in Cargo.lock at line 999
version = "2.3.0"version = "2.3.1" - replacement in Cargo.lock at line 1001
checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135"checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" - replacement in Cargo.lock at line 1035
version = "0.2.95"version = "0.2.97" - replacement in Cargo.lock at line 1037
checksum = "789da6d93f1b866ffe175afc5322a4d76c038605a1c3319bb57b06967ca98a36"checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6" - edit in Cargo.lock at line 1062[104.793][104.793]
"bs58", - replacement in Cargo.lock at line 1086
"rand_core 0.6.2","rand_core 0.6.3", - replacement in Cargo.lock at line 1105
version = "0.2.6"version = "0.2.7" - replacement in Cargo.lock at line 1107
checksum = "a685b64f837b339074115f2e7f7b431ac73681d08d75b389db7498b8892b8a58"checksum = "6b779387cd56adfbc02ea4a668e704f729be8d6a6abd2c27ca5ee537849a92fd" - edit in Cargo.lock at line 1112
"walkdir", - replacement in Cargo.lock at line 1241
version = "0.7.11"version = "0.7.13" - replacement in Cargo.lock at line 1243
checksum = "cf80d3e903b34e0bd7282b218398aec54e082c840d9baf8339e0080a0c542956"checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" - replacement in Cargo.lock at line 1351
version = "0.24.0"version = "0.25.3" - replacement in Cargo.lock at line 1353
checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170"checksum = "a38f2be3697a57b4060074ff41b44c16870d916ad7877c17696e063257482bc7"dependencies = ["memchr 2.4.0",] - replacement in Cargo.lock at line 1360
version = "1.7.2"version = "1.8.0" - replacement in Cargo.lock at line 1362
checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3"checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" - replacement in Cargo.lock at line 1372
version = "0.10.34"version = "0.10.35" - replacement in Cargo.lock at line 1374
checksum = "6d7830286ad6a3973c0f1d9b73738f69c76b739301d0229c4b96501695cbe4c8"checksum = "549430950c79ae24e6d02e0b7404534ecf311d94cc9f861e9e4020187d13d885" - replacement in Cargo.lock at line 1392
version = "0.9.63"version = "0.9.65" - replacement in Cargo.lock at line 1394
checksum = "b6b0d6fb7d80f877617dfcb014e605e2b5ab2fb0afdf27935219bb6bd984cb98"checksum = "7a7907e3bfa08bb85105209cdfcb6c63d109f8f6c1ed6ca318fff5c1853fbc1d" - replacement in Cargo.lock at line 1472
"redox_syscall 0.2.8","redox_syscall 0.2.9", - replacement in Cargo.lock at line 1535
"rand 0.8.3","rand 0.8.4", - edit in Cargo.lock at line 1565[7.1064668]→[7.1064668:1064689](∅→∅),[7.1064689]→[7.3737:3755](∅→∅),[7.3755]→[7.1065209:1065274](∅→∅),[7.155787]→[7.1065209:1065274](∅→∅),[7.1065209]→[7.1065209:1065274](∅→∅),[7.1065274]→[7.3756:3834](∅→∅),[7.3834]→[7.1065352:1065369](∅→∅),[7.155866]→[7.1065352:1065369](∅→∅),[7.1065352]→[7.1065352:1065369](∅→∅),[7.1065369]→[7.155867:155892](∅→∅),[7.155892]→[7.1065403:1065448](∅→∅),[7.1065403]→[7.1065403:1065448](∅→∅),[7.1065448]→[7.3835:3853](∅→∅),[7.312]→[7.1065466:1065531](∅→∅),[7.1252]→[7.1065466:1065531](∅→∅),[7.2055]→[7.1065466:1065531](∅→∅),[7.3853]→[7.1065466:1065531](∅→∅),[7.155911]→[7.1065466:1065531](∅→∅),[7.1065466]→[7.1065466:1065531](∅→∅),[7.1065531]→[7.3854:3932](∅→∅),[7.391]→[7.1065609:1065675](∅→∅),[7.1331]→[7.1065609:1065675](∅→∅),[7.2134]→[7.1065609:1065675](∅→∅),[7.3932]→[7.1065609:1065675](∅→∅),[7.155990]→[7.1065609:1065675](∅→∅),[7.1065609]→[7.1065609:1065675](∅→∅)
name = "pin-project"version = "1.0.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c7509cc106041c40a4518d2af7a61530e1eed0e6285296a3d8c5472806ccc4a4"dependencies = ["pin-project-internal",][[package]]name = "pin-project-internal"version = "1.0.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "48c950132583b500556b1efd71d45b319029f2b71518d979fcc208e16b42426f"dependencies = ["proc-macro2","quote","syn",][[package]] - replacement in Cargo.lock at line 1566
version = "0.2.6"version = "0.2.7" - replacement in Cargo.lock at line 1568
checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905"checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" - replacement in Cargo.lock at line 1670
version = "0.8.3"version = "0.8.4" - replacement in Cargo.lock at line 1672
checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e"checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" - replacement in Cargo.lock at line 1675[7.1068290]→[7.118628:118650](∅→∅),[7.118650]→[7.156187:156207](∅→∅),[7.9247]→[7.156187:156207](∅→∅),[7.156207]→[7.118651:118669](∅→∅)
"rand_chacha 0.3.0","rand_core 0.6.2","rand_hc 0.3.0","rand_chacha 0.3.1","rand_core 0.6.3","rand_hc 0.3.1", - replacement in Cargo.lock at line 1692
version = "0.3.0"version = "0.3.1" - replacement in Cargo.lock at line 1694
checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d"checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" - replacement in Cargo.lock at line 1697
"rand_core 0.6.2","rand_core 0.6.3", - replacement in Cargo.lock at line 1726
version = "0.6.2"version = "0.6.3" - replacement in Cargo.lock at line 1728
checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7"checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" - replacement in Cargo.lock at line 1744
version = "0.3.0"version = "0.3.1" - replacement in Cargo.lock at line 1746
checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73"checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" - replacement in Cargo.lock at line 1748
"rand_core 0.6.2","rand_core 0.6.3", - replacement in Cargo.lock at line 1759
version = "0.2.8"version = "0.2.9" - replacement in Cargo.lock at line 1761
checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc"checksum = "5ab49abadf3f9e1c4bc499e8845e152ad87d2ad2d30371841171169e9d75feee" - replacement in Cargo.lock at line 1773
"redox_syscall 0.2.8","redox_syscall 0.2.9", - replacement in Cargo.lock at line 1804
version = "0.11.3"version = "0.11.4" - replacement in Cargo.lock at line 1806
checksum = "2296f2fac53979e8ccbc4a1136b25dcefd37be9ed7e4a1f6b05a6029c84ff124"checksum = "246e9f61b9bb77df069a947682be06e31ac43ea37862e244a69f177694ea6d22" - edit in Cargo.lock at line 1826
"serde_json", - replacement in Cargo.lock at line 1849
version = "0.1.19"version = "0.1.20" - replacement in Cargo.lock at line 1851
checksum = "410f7acf3cb3a44527c5d9546bad4bf4e6c460915d5f9f2fc524498bfe8f70ce"checksum = "dead70b0b5e03e9c814bcb6b01e03e68f7c57a80aa48c72ec92152ab3e818d49" - replacement in Cargo.lock at line 1870
version = "1.2.4"version = "1.2.5" - replacement in Cargo.lock at line 1872
checksum = "0bbeaf95d57d98d57cc2f7f58bc0028e2e5a49e446bedb0288ed755238b60c32"checksum = "5503ef92c94be580857160eb38b30d4f662a718ef89cdd59798fbab0e4450835" - replacement in Cargo.lock at line 1911
version = "2.2.0"version = "2.3.1" - replacement in Cargo.lock at line 1913
checksum = "3670b1d2fdf6084d192bc71ead7aabe6c06aa2ea3fbd9cc3ac111fa5c2b1bd84"checksum = "23a2ac85147a3a11d77ecf1bc7166ec0b92febfa4461c37944e180f319ece467" - replacement in Cargo.lock at line 1924
version = "2.2.0"version = "2.3.0" - replacement in Cargo.lock at line 1926
checksum = "3676258fd3cfe2c9a0ec99ce3038798d847ce3e4bb17746373eb9f0f1ac16339"checksum = "7e4effb91b4b8b6fb7732e670b6cee160278ff8e6bf485c7805d9e319d76e284" - replacement in Cargo.lock at line 2054
version = "1.0.72"version = "1.0.73" - replacement in Cargo.lock at line 2056
checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82"checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" - replacement in Cargo.lock at line 2094
"rand 0.8.3","redox_syscall 0.2.8","rand 0.8.4","redox_syscall 0.2.9", - replacement in Cargo.lock at line 2263
version = "1.6.1"version = "1.7.1" - replacement in Cargo.lock at line 2265
checksum = "0a38d31d7831c6ed7aad00aa4c12d9375fd225a6dd77da1d25b707346319a975"checksum = "5fb2ed024293bb19f7a5dc54fe83bf86532a44c12a2bb8ba40d64a4509395ca2" - replacement in Cargo.lock at line 2397
version = "0.1.18"version = "0.1.19" - replacement in Cargo.lock at line 2399
checksum = "33717dca7ac877f497014e10d73f3acf948c342bee31b5ca7892faf94ccc6b49"checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" - replacement in Cargo.lock at line 2445
version = "0.2.13"version = "0.2.15" - replacement in Cargo.lock at line 2447
checksum = "025ce40a007e1907e58d5bc1a594def78e5573bb0b1160bc389634e8f12e4faa"checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"