Fixing a race condition between progress bars
[?]
Dec 6, 2020, 9:21 PM
5QTMRUXNE2XNJCMLN6MQN24UEZ55EFC3LIR4PO6OPNTT5KEL7WXQCDependencies
- [2]
HXEIH4UQPulling more than 100 changes at once - [3]
KTTKF3RWLocking stderr and the progress bar in SSH - [4]
K6GWUOD5Styling progress bars - [5]
PCEJFKFXProgress bar for upload and apply - [6]
UDHP4ZVBFixing SSH asynchronicity issues - [7]
367UBQ6KForwarding SSH stderr, and progress bar for push - [8]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [9]
FBXYP7QMForgot to add remote::http - [10]
Q45QHPO4Feedback on network stuff - [*]
L4JXJHWXpijul/*: reorganize imports and remove extern crate - [*]
I52XSRUHMassive cleanup, and simplification
Change contents
- replacement in pijul/src/remote/ssh.rs at line 690
.template(" Uploading changes {wide_bar} {pos}/{len}"),.template(" Uploading changes {wide_bar} {pos:>5}/{len}"), - edit in pijul/src/remote/ssh.rs at line 692
let progress = super::PROGRESS.add(progress); - replacement in pijul/src/remote/ssh.rs at line 719
.template("✓ Uploading changes {wide_bar} {pos}/{len}"),.template("✓ Uploading changes {pos:>5}/{len}"), - replacement in pijul/src/remote/ssh.rs at line 777
.template(" Downloading changes {wide_bar} {pos}/{len}"),.template(" Downloading changes {wide_bar} {pos:>5}/{len}"), - replacement in pijul/src/remote/ssh.rs at line 798
.template("✓ Downloading changes {wide_bar} {pos}/{len}"),.template("✓ Downloading changes {pos:>5}/{len}"), - edit in pijul/src/remote/mod.rs at line 4[12.439][13.516]
use lazy_static::lazy_static; - edit in pijul/src/remote/mod.rs at line 28
}lazy_static! {static ref PROGRESS: Arc<indicatif::MultiProgress> = Arc::new(indicatif::MultiProgress::new()); - replacement in pijul/src/remote/mod.rs at line 468
.template(" Applying changes {wide_bar} {pos}/{len}"),.template(" Applying changes {wide_bar} {pos:>5}/{len}"), - replacement in pijul/src/remote/mod.rs at line 470
Some(p)Some(PROGRESS.add(p)) - edit in pijul/src/remote/mod.rs at line 474
let t_progress = std::thread::spawn(|| {PROGRESS.join().unwrap_or(());}); - replacement in pijul/src/remote/mod.rs at line 504
.template("✓ Applying changes {wide_bar} {pos}/{len}"),.template("✓ Applying changes {pos:>5}/{len}"), - edit in pijul/src/remote/mod.rs at line 511
t_progress.join().unwrap(); - replacement in pijul/src/remote/http.rs at line 26
.template(" Downloading changes {wide_bar} {pos}/{len}"),.template(" Downloading changes {wide_bar} {pos:>5}/{len}"), - edit in pijul/src/remote/http.rs at line 28
let progress = super::PROGRESS.add(progress); - replacement in pijul/src/remote/http.rs at line 66
.template("✓ Downloading changes {wide_bar} {pos}/{len}"),.template("✓ Downloading changes {pos:>5}/{len}"), - replacement in pijul/src/remote/http.rs at line 82
.template(" Uploading changes {wide_bar} {pos}/{len}"),.template(" Uploading changes {wide_bar} {pos:>5}/{len}"), - replacement in pijul/src/remote/http.rs at line 106
indicatif::ProgressStyle::default_bar().template("✓ Uploading changes {wide_bar} {pos}/{len}"),indicatif::ProgressStyle::default_bar().template("✓ Uploading changes {pos:>5}/{len}"),