Change completions (where the whole progress bar story started)
[?]
Mar 1, 2021, 7:10 PM
2D7P2VKJASU7QDQZHGCLBIT6G2V5WUFYLWTCEVVEI2EZHGM6XYRACDependencies
- [2]
Y6EVFMTADon't output files if they aren't in the current channel - [3]
GNMZNKB4Cursors cleanup - [4]
TKEVOH7HFixing a bug when downloading changes, and making change download more efficient (more async) - [5]
I52XSRUHMassive cleanup, and simplification - [6]
VBMXB443Retrying if the HTTP connection drops while reading the body - [7]
TPEH2XNB1.0.0-alpha.28, with Tokio 1.0 - [8]
BNPSVXICFriendlier progress bars - [9]
MXQ3U2DPShorter progress bars - [10]
YN63NUZOSanakirja 1.0 - [11]
Q45QHPO4Feedback on network stuff - [12]
HXEIH4UQPulling more than 100 changes at once - [13]
WKX5S4Z4remove unneccesary explicit lifetimes - [14]
UDHP4ZVBFixing SSH asynchronicity issues - [15]
X6YFD4WVDo not download changes if we already have them - [16]
MU5GSJAWPartial push and pull (WARNING: breaks the existing protocol) - [17]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [18]
76PCXGMLPushing to, and pulling from the local repository - [19]
FBXYP7QMForgot to add remote::http - [20]
WLUID7NADo not block when downloading more than 100 changes over SSH - [21]
WTZXEWY7Flushing the futures pipeline when downloading over HTTP(S) - [22]
5QTMRUXNFixing a race condition between progress bars - [*]
L4JXJHWXpijul/*: reorganize imports and remove extern crate - [*]
MDADYULSFix a panic when switching between channels that have different files - [*]
LGEJSLTYFixing output (including its uses in reset and pull)
Change contents
- replacement in pijul/src/remote/ssh.rs at line 774
progress: Arc<std::sync::Mutex<crate::progress::InnerCursors>>,pro_n: usize, - replacement in pijul/src/remote/ssh.rs at line 780
self.download_changes_(progress, c, Some(sender), changes_dir, full)self.download_changes_(pro_n, c, Some(sender), changes_dir, full) - replacement in pijul/src/remote/ssh.rs at line 786
progress: Arc<std::sync::Mutex<crate::progress::InnerCursors>>,pro_n: usize, - replacement in pijul/src/remote/ssh.rs at line 811
progress.lock().unwrap()[0].incr();super::PROGRESS.borrow_mut().unwrap()[pro_n].incr(); - edit in pijul/src/remote/ssh.rs at line 818
let mut received = false; - edit in pijul/src/remote/ssh.rs at line 820
received = true; - edit in pijul/src/remote/ssh.rs at line 835
if !received {*self.state.lock().await = State::None;}; - edit in pijul/src/remote/mod.rs at line 22
use crate::progress::PROGRESS; - replacement in pijul/src/remote/mod.rs at line 332
progress: Arc<std::sync::Mutex<crate::progress::InnerCursors>>,pro_n: usize, - replacement in pijul/src/remote/mod.rs at line 340
RemoteRepo::Local(ref mut l) => {l.download_changes(progress, hashes, send, path).await?}RemoteRepo::Local(ref mut l) => l.download_changes(pro_n, hashes, send, path).await?, - replacement in pijul/src/remote/mod.rs at line 342
s.download_changes(progress, hashes, send, path, full).await?s.download_changes(pro_n, hashes, send, path, full).await? - replacement in pijul/src/remote/mod.rs at line 345
h.download_changes(progress, hashes, send, path, full).await?h.download_changes(pro_n, hashes, send, path, full).await? - replacement in pijul/src/remote/mod.rs at line 353
pub async fn pull<T: MutTxnTExt + TxnTExt>(pub async fn pull<T: MutTxnTExt + TxnTExt + GraphIter>( - replacement in pijul/src/remote/mod.rs at line 362
let progress = crate::progress::Cursors::new();{let mut pro = progress.borrow_mut().unwrap();pro.push(crate::progress::Cursor::Bar {let mut pro = PROGRESS.borrow_mut().unwrap();let pro_a = pro.push(crate::progress::Cursor::Bar {i: 0,n: to_apply.len(),pre: "Downloading changes".into(),});let pro_b = if do_apply {Some(pro.push(crate::progress::Cursor::Bar { - replacement in pijul/src/remote/mod.rs at line 372[4.2364]→[4.2364:2457](∅→∅),[4.2457]→[3.106:162](∅→∅),[3.162]→[4.2521:2674](∅→∅),[4.2521]→[4.2521:2674](∅→∅)
pre: "Downloading changes".into(),});if do_apply {pro.push(crate::progress::Cursor::Bar {i: 0,n: to_apply.len(),pre: "Applying".into(),});}}pre: "Applying".into(),}))} else {None};std::mem::drop(pro); - edit in pijul/src/remote/mod.rs at line 386
let progress_ = progress.inner.clone(); - replacement in pijul/src/remote/mod.rs at line 388
.download_changes(progress_,&mut hash_recv,&mut send,&mut change_path_,false,).download_changes(pro_a, &mut hash_recv, &mut send, &mut change_path_, false) - replacement in pijul/src/remote/mod.rs at line 446
if do_apply {if let Some(pro_b) = pro_b { - replacement in pijul/src/remote/mod.rs at line 448
progress.inner.lock().unwrap()[1].incr();PROGRESS.inner.lock().unwrap()[pro_b].incr(); - replacement in pijul/src/remote/mod.rs at line 460
progress.join();debug!("join");PROGRESS.join(); - replacement in pijul/src/remote/mod.rs at line 465
pub async fn clone_tag<T: MutTxnTExt + TxnTExt>(pub async fn clone_tag<T: MutTxnTExt + TxnTExt + GraphIter>( - replacement in pijul/src/remote/mod.rs at line 477
let progress = crate::progress::Cursors::new();let pro_n = {let mut pro = PROGRESS.borrow_mut().unwrap();pro.push(crate::progress::Cursor::Bar {i: 0,n: tag.len(),pre: "Downloading changes".into(),})}; - replacement in pijul/src/remote/mod.rs at line 489
progress.inner.clone(),pro_n, - replacement in pijul/src/remote/mod.rs at line 519
while let Some(hash) = hashes.pop() {txn.apply_change_ws(&repo.changes, channel, &hash, &mut ws)?;for hash in hashes.iter() {txn.apply_change_ws(&repo.changes, channel, hash, &mut ws)?; - edit in pijul/src/remote/mod.rs at line 524
self.complete_changes(repo, txn, channel, &hashes, false).await?; - replacement in pijul/src/remote/mod.rs at line 529
pub async fn clone_state<T: MutTxnTExt + TxnTExt>(pub async fn clone_state<T: MutTxnTExt + TxnTExt + GraphIter>( - edit in pijul/src/remote/mod.rs at line 554
.await?;self.complete_changes(repo, txn, channel, &to_pull, false) - replacement in pijul/src/remote/mod.rs at line 574
let progress = crate::progress::Cursors::new();let mut progress = PROGRESS.borrow_mut().unwrap();let pro_n = {progress.push(crate::progress::Cursor::Bar {i: 0,n: 0,pre: "Completing changes".into(),})};std::mem::drop(progress); - replacement in pijul/src/remote/mod.rs at line 585
.download_changes(progress.inner.clone(),&mut recv_hash,&mut send_sig,&mut changes_dir,true,).download_changes(pro_n, &mut recv_hash, &mut send_sig, &mut changes_dir, true) - edit in pijul/src/remote/mod.rs at line 602
PROGRESS.borrow_mut().unwrap()[pro_n].incr_len(); - edit in pijul/src/remote/mod.rs at line 627
PROGRESS.borrow_mut().unwrap()[pro_n].incr_len(); - edit in pijul/src/remote/mod.rs at line 636
PROGRESS.join(); - replacement in pijul/src/remote/mod.rs at line 640
pub async fn clone_channel<T: MutTxnTExt + TxnTExt>(pub async fn clone_channel<T: MutTxnTExt + TxnTExt + GraphIter>( - edit in pijul/src/remote/mod.rs at line 658
self.complete_changes(repo, txn, local_channel, &pullable, false).await?; - replacement in pijul/src/remote/local.rs at line 129
progress: Arc<std::sync::Mutex<crate::progress::InnerCursors>>,pro_n: usize, - replacement in pijul/src/remote/local.rs at line 137
progress.lock().unwrap()[0].incr();super::PROGRESS.borrow_mut().unwrap()[pro_n].incr(); - replacement in pijul/src/remote/http.rs at line 74
progress: std::sync::Arc<std::sync::Mutex<crate::progress::InnerCursors>>,pro_n: usize, - replacement in pijul/src/remote/http.rs at line 97
progress.lock().unwrap()[0].incr();super::PROGRESS.borrow_mut().unwrap()[pro_n].incr(); - replacement in pijul/src/remote/http.rs at line 110
progress.lock().unwrap()[0].incr();super::PROGRESS.borrow_mut().unwrap()[pro_n].incr(); - edit in pijul/src/progress.rs at line 1
use log::*; - edit in pijul/src/progress.rs at line 6
lazy_static::lazy_static! {pub static ref PROGRESS: crate::progress::Cursors = crate::progress::Cursors::new();} - replacement in pijul/src/progress.rs at line 12
t: std::thread::JoinHandle<()>,t: Mutex<Option<std::thread::JoinHandle<()>>>, - replacement in pijul/src/progress.rs at line 47
let inner_ = inner.clone();let t = std::thread::spawn(move || loop {let cursors = Cursors {inner,t: Mutex::new(None),};cursors.restart();cursors}fn restart(&self) {debug!("restart");let mut t = self.t.lock().unwrap();if t.is_some() {return;}let inner_ = self.inner.clone();*t = Some(std::thread::spawn(move || loop { - replacement in pijul/src/progress.rs at line 77
});Cursors { inner, t }})); - edit in pijul/src/progress.rs at line 81
debug!("stop"); - replacement in pijul/src/progress.rs at line 87
pub fn join(self) {pub fn join(&self) {debug!("join"); - replacement in pijul/src/progress.rs at line 90
self.t.join().unwrap();let mut t = self.t.lock().unwrap();if let Some(t) = t.take() {t.join().unwrap();} - edit in pijul/src/progress.rs at line 102
debug!("borrow_mut");self.restart(); - edit in pijul/src/progress.rs at line 105
m.stop = false; - edit in pijul/src/progress.rs at line 153
_ => {}}}pub fn incr_len(&mut self) {match self {Cursor::Bar { n, .. } => *n += 1, - replacement in pijul/src/progress.rs at line 205
let k = (wb as usize * *i) / (*n - 1);let k = (wb as usize * *i) / *n; - edit in pijul/src/commands/reset.rs at line 11
use crate::progress::PROGRESS; - edit in pijul/src/commands/reset.rs at line 146
PROGRESS.borrow_mut().unwrap().push(crate::progress::Cursor::Spin {i: 0,pre: "Outputting repository".into(),}); - edit in pijul/src/commands/reset.rs at line 174
PROGRESS.join(); - edit in pijul/src/commands/reset.rs at line 176
PROGRESS.borrow_mut().unwrap().push(crate::progress::Cursor::Spin {i: 0,pre: "Outputting repository".into(),}); - edit in pijul/src/commands/reset.rs at line 195
PROGRESS.join(); - edit in pijul/src/commands/pushpull.rs at line 14
use crate::progress::PROGRESS; - edit in pijul/src/commands/pushpull.rs at line 455
PROGRESS.borrow_mut().unwrap().push(crate::progress::Cursor::Spin {i: 0,pre: "Outputting repository".into(),}); - edit in pijul/src/commands/pushpull.rs at line 487[26.679][4.11126]
PROGRESS.join(); - edit in pijul/src/commands/clone.rs at line 82
- edit in pijul/src/commands/apply.rs at line 10
use crate::progress::PROGRESS; - edit in pijul/src/commands/apply.rs at line 93
PROGRESS.borrow_mut().unwrap().push(crate::progress::Cursor::Spin {i: 0,pre: "Outputting repository".into(),}); - edit in pijul/src/commands/apply.rs at line 120
PROGRESS.join();