Displaying errors returned by the server in the protocol

[?]
Jan 9, 2021, 10:07 PM
2GQCLJZGIXMTKDVMYIIQJDOR5EXGBZS5FKH2S4DTN25WKKBUMQQQC

Dependencies

  • [2] MU5GSJAW Partial push and pull (WARNING: breaks the existing protocol)
  • [3] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [*] FBXYP7QM Forgot to add remote::http

Change contents

  • edit in pijul/src/remote/ssh.rs at line 708
    [2.769]
    [2.769]
    super::ListLine::Error(err) => {
    bail!(err)
    }
  • edit in pijul/src/remote/mod.rs at line 672
    [2.3339]
    [2.3339]
    Error(String),
  • replacement in pijul/src/remote/mod.rs at line 683
    [2.3716][2.3716:3780]()
    n: caps.name("num").unwrap().as_str().parse()?,
    [2.3716]
    [2.3780]
    n: caps.name("num").unwrap().as_str().parse().unwrap(),
  • edit in pijul/src/remote/mod.rs at line 689
    [2.3850]
    [2.3850]
    if data.starts_with("error:") {
    return Ok(ListLine::Error(data.split_at(6).1.to_string()));
    }
  • replacement in pijul/src/remote/mod.rs at line 698
    [3.79713][2.4146:4202]()
    bail!("Protocol error, offending line: {:?}", data)
    [3.79713]
    [3.79731]
    debug!("offending line: {:?}", data);
    bail!("Protocol error")
  • edit in pijul/src/remote/http.rs at line 196
    [2.6342]
    [2.6342]
    }
    super::ListLine::Error(e) => {
    let mut stderr = std::io::stderr();
    writeln!(stderr, "{}", e)?;