Stop pushing/pulling if the remote returns an error
[?]
Dec 11, 2020, 9:38 PM
FE5ES6Q46FMWYPNNNJLORY377QGDE57LBBDIVWDTC6Z7U4U73NEQCDependencies
- [2]
5QTMRUXNFixing a race condition between progress bars - [3]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [4]
76PCXGMLPushing to, and pulling from the local repository - [5]
K6GWUOD5Styling progress bars - [*]
L4JXJHWXpijul/*: reorganize imports and remove extern crate - [*]
UDHP4ZVBFixing SSH asynchronicity issues - [*]
SZWBLWZ4Reading ~/.ssh/config - [*]
KTTKF3RWLocking stderr and the progress bar in SSH - [*]
Q45QHPO4Feedback on network stuff
Change contents
- edit in pijul/src/remote/ssh.rs at line 7
use anyhow::bail; - edit in pijul/src/remote/ssh.rs at line 30
has_errors: Arc<Mutex<bool>>, - edit in pijul/src/remote/ssh.rs at line 79
let has_errors = Arc::new(Mutex::new(false)); - edit in pijul/src/remote/ssh.rs at line 85
has_errors: has_errors.clone(), - edit in pijul/src/remote/ssh.rs at line 120
has_errors, - edit in pijul/src/remote/ssh.rs at line 241
has_errors: Arc<Mutex<bool>>, - edit in pijul/src/remote/ssh.rs at line 326
self,_channel: thrussh::ChannelId,session: thrussh::client::Session,) -> Self::FutureUnit {Box::pin(async move {*self.state.lock().await = State::None;Ok((self, session))})}fn exit_status( - edit in pijul/src/remote/ssh.rs at line 339
_status: u32, - edit in pijul/src/remote/ssh.rs at line 344
*self.has_errors.lock().await = true; - edit in pijul/src/remote/ssh.rs at line 363
*super::SPINNER.lock().await = None;*self.has_errors.lock().await = true; - edit in pijul/src/remote/ssh.rs at line 698
if *self.has_errors.lock().await {bail!("Remote sent an error")} - edit in pijul/src/remote/mod.rs at line 9[11.573][7.456]
use tokio::sync::Mutex; - edit in pijul/src/remote/mod.rs at line 33
static ref SPINNER: Arc<Mutex<Option<indicatif::ProgressBar>>> = Arc::new(Mutex::new(None)); - edit in pijul/src/remote/mod.rs at line 173
*SPINNER.lock().await = Some(progress); - replacement in pijul/src/remote/mod.rs at line 194
progress.set_style(indicatif::ProgressStyle::default_spinner().template("✓ Updating remote changelist"),);progress.finish();if let Some(progress) = SPINNER.lock().await.take() {progress.set_style(indicatif::ProgressStyle::default_spinner().template("✓ Updating remote changelist"),);progress.finish();}