Migrate from `pijul::progress` to `pijul_interaction::progress`

finchie
Jul 13, 2023, 2:40 PM
JUYSZJSHULJFR4HUJF72TEKKFMBPG4ZOGAGOJ2BX6P3D4DRZAU5QC

Dependencies

  • [2] 6HQHOC2Z Fixing terminal resizing in progress bars
  • [3] DFK4BTAA Better computation of the progress bar widths
  • [4] S4LQTDJI avoid outputting repo multiple times in channel switch
  • [5] BHFLDCFR Updating last_touched in one extra case in `reset`
  • [6] 2FZSXUGK fill 0/0 progress bars with `=` to look complete
  • [7] ISZ65SPQ Checking that `pijul apply` does not destroy unrecorded changes
  • [8] 5XCNW4EV Fixing a bug when outputting after a pull, when a path to be output is a string-prefix of another one without being a path-prefix of that other one
  • [9] XQHABMC2 Do not block when there is no patch to pull
  • [10] Z6ASIMOR Avoid increasing the download progress bar length if we need the same dependency more than once
  • [11] LZOGKBJX new command `pijul client` for authenticating to a HTTP server
  • [12] ILZ44DEY simplify outputting with no touched paths
  • [13] G65S7FAW Version bump and cleanup
  • [14] 3OF3DHLM Fixing a panic with narrow terminal windows
  • [15] EUZFFJSO Updating Pijul with the latest changes in Libpijul
  • [16] LGEJSLTY Fixing output (including its uses in reset and pull)
  • [17] QQZNSB26 Permission update (after #X243)
  • [18] L2VH4BYK Downloading changelists from channels without an id (Nest discussions)
  • [19] JZADJIA3 Handling HTTP errors
  • [20] MU5GSJAW Partial push and pull (WARNING: breaks the existing protocol)
  • [21] Y6EVFMTA Don't output files if they aren't in the current channel
  • [22] 5MQUX3TQ Correct spacing for zero-length progress bar
  • [23] I24UEJQL Various post-fire fixes
  • [24] I52XSRUH Massive cleanup, and simplification
  • [25] YN63NUZO Sanakirja 1.0
  • [26] 367UBQ6K Forwarding SSH stderr, and progress bar for push
  • [27] HDGRZISM Version updates
  • [28] FBXYP7QM Forgot to add remote::http
  • [29] HXEIH4UQ Pulling more than 100 changes at once
  • [30] ZDK3GNDB Tag transactions (including a massive refactoring of errors)
  • [31] ZWVYH7WP Pulling local tags
  • [32] 4HTHYIA3 Fixing HTTP download
  • [33] X6YFD4WV Do not download changes if we already have them
  • [34] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [35] C4MJ7D7Q Verbose printing of conflicts to stderr
  • [36] 5QTMRUXN Fixing a race condition between progress bars
  • [37] IQ4FCHPZ HTTP connections: pooling + retry on error
  • [38] PCEJFKFX Progress bar for upload and apply
  • [39] 3KRGVQFU Do not update the mtime of unmodified files
  • [40] X243Z3Y5 Recording only the required metadata (can even be changed later!)
  • [41] 6ZPDI7QG pull uses None as the base case path when outputing repo
  • [42] YTQS4ES3 Fixing a parsing problem (related to permissions), and the associated permissions
  • [43] TI7PCK7J Update `pijul/src/main.rs` to use new identity management
  • [44] 4XLHUME7 Fixing a interlocking when cloning from a particular patch
  • [45] DDJO7X2P Remove dependency on `num_cpus`
  • [46] WLUID7NA Do not block when downloading more than 100 changes over SSH
  • [47] WTZXEWY7 Flushing the futures pipeline when downloading over HTTP(S)
  • [48] 76PCXGML Pushing to, and pulling from the local repository
  • [49] 44BN7FWS Do not output files introduced by patches that were not applied during a push
  • [50] Q45QHPO4 Feedback on network stuff
  • [51] GNMZNKB4 Cursors cleanup
  • [52] QMTANHVN Reset: only output changed files
  • [53] OKE6SXPP improve docs, feedback for pijul key
  • [54] IBPVOKM5 Fixing a bug in patch download
  • [55] A6JQQNNJ More appropriate debug messages
  • [56] VBMXB443 Retrying if the HTTP connection drops while reading the body
  • [57] XSRTXUAS Pull: show progress bar when applying
  • [58] DO2Y5TY5 Tag synchronisation
  • [59] C3L2TLQW When downloading changes, check whether we have their dependencies and download them too
  • [60] 5SLOJYHG Fixing the Git feature
  • [61] LYTVEPH3 Avoid cloning into an existing path
  • [62] DVBSW7SI Bump dependencies with minor-level changes
  • [63] MDADYULS Fix a panic when switching between channels that have different files
  • [64] 2D7P2VKJ Change completions (where the whole progress bar story started)
  • [65] VMPAOJS2 Don't output after pushing to a local channel
  • [66] YWL2K3P7 Removing the `Direction` argument in pijul::remote::Repository::remote
  • [67] DFRNZLQ6 Fixing #798: overwrite check too strict in `pijul apply` when applying a patch adding new files
  • [68] A3RM526Y Integrating identity malleability
  • [69] 4KJ45IJL Implement new identity management
  • [70] XA23FMQM Reset only files that have been modified
  • [71] ZRUPLBBT Colours in diff and change: separating concerns and dependencies
  • [72] MXQ3U2DP Shorter progress bars
  • [73] KTTKF3RW Locking stderr and the progress bar in SSH
  • [74] TPEH2XNB 1.0.0-alpha.28, with Tokio 1.0
  • [75] IVLLXQ5Z Improved push/pull reporting
  • [76] UDHP4ZVB Fixing SSH asynchronicity issues
  • [77] ISCWVXO6 Progress bar for push
  • [78] BNPSVXIC Friendlier progress bars
  • [79] TYAKEAJL A better estimate of the maximum number of open patches we can keep (Unix-only at the moment)
  • [80] TKEVOH7H Fixing a bug when downloading changes, and making change download more efficient (more async)
  • [81] L4JXJHWX pijul/*: reorganize imports and remove extern crate
  • [82] JL4WKA5P Implement the Sanakirja concurrency model in a cross-process way
  • [83] ZSFJT4SF Allow remotes to have a different push and pull address
  • [*] AI73GKAO Adding a UserAgent header to the http downloader
  • [*] 2K7JLB4Z No pager on Windows
  • [*] J2D66R2D Enable the pager dependency on OSX, fixes build

Change contents

  • file deletion: progress.rs (----------)
    [12.21414][12.5309:5322](),[12.5322][12.5323:5323]()
    use std::borrow::Cow;
    use std::io::Write;
    use std::sync::{Arc, Mutex};
    pub struct Cursors {
    pub inner: Arc<Mutex<InnerCursors>>,
    }
    pub struct InnerCursors {
    drawn: usize,
    n_post: usize,
    n_pre: usize,
    w: usize,
    stop: bool,
    }
    impl Cursors {
    pub fn new() -> Self {
    let inner = Arc::new(Mutex::new(InnerCursors {
    drawn: 0,
    cursors: Vec::new(),
    n_post: 0,
    n_pre: 0,
    stop: false,
    w: 0,
    }));
    {
    let mut inner = if let Ok(inner) = inner_.lock() {
    inner
    } else {
    break;
    };
    if inner.stop {
    inner.render().unwrap();
    break;
    } else {
    inner.render().unwrap();
    }
    }
    std::thread::sleep(std::time::Duration::from_millis(100));
    }
    pub fn stop(&self) {
    if let Ok(mut n) = self.inner.lock() {
    n.stop = true
    }
    }
    self.stop();
    }
    pub fn borrow_mut(
    &self,
    ) -> Result<
    std::sync::MutexGuard<InnerCursors>,
    std::sync::PoisonError<std::sync::MutexGuard<'_, InnerCursors>>,
    > {
    let mut m = self.inner.lock()?;
    m.n_pre = 0;
    Ok(m)
    }
    }
    #[allow(dead_code)]
    pub enum Cursor {
    Static {
    pre: Cow<'static, str>,
    },
    Bar {
    pre: Cow<'static, str>,
    n: usize,
    i: usize,
    },
    Spin {
    pre: Cow<'static, str>,
    i: usize,
    },
    }
    impl Cursor {
    fn pre(&self) -> &str {
    match self {
    Cursor::Static { pre } => pre,
    Cursor::Bar { pre, .. } => pre,
    Cursor::Spin { pre, .. } => pre,
    }
    }
    fn n(&self) -> usize {
    match self {
    Cursor::Bar { n, .. } => {
    let mut n = *n;
    let mut r = 6;
    while n > 0 {
    n /= 10;
    r += 2
    }
    r
    }
    _ => 0,
    }
    }
    pub fn incr(&mut self) {
    match self {
    Cursor::Bar { i, .. } => *i += 1,
    _ => {}
    }
    }
    fn render<W: std::io::Write>(
    &mut self,
    stdout: &mut W,
    npre: usize,
    npost: usize,
    w: usize,
    ) -> Result<(), std::io::Error> {
    match self {
    Cursor::Static { pre } => {
    for _ in 0..npre - pre.chars().count() {
    stdout.write_all(b" ")?;
    }
    stdout.write_all(pre.as_bytes())?;
    // Fil the rest of the line with spaces.
    for _ in 0..w - npre {
    stdout.write_all(b" ")?;
    }
    Ok(())
    }
    Cursor::Bar { pre, i, n } => {
    for _ in 0..npre - pre.chars().count() {
    stdout.write_all(b" ")?;
    }
    // Comupte the appropriate width for the bar.
    // Output the bar.
    write!(stdout, "{} [", pre)?;
    let wb = (w as usize).min(50);
    }
    }
    write!(stdout, "] {}/{}", *i, *n)?;
    for _ in 0..nw {
    stdout.write_all(b" ")?;
    }
    Ok(())
    }
    Cursor::Spin { pre, i } => {
    for _ in 0..npre - pre.chars().count() {
    stdout.write_all(b" ")?;
    }
    stdout.write_all(pre.as_bytes())?;
    stdout.write_all(b" ")?;
    const SYM: [&str; 8] = ["←", "↖", "↑", "↗", "→", "↘", "↓", "↙"];
    stdout.write_all(SYM[*i].as_bytes())?;
    *i = (*i + 1) % SYM.len();
    // Fill the rest of the line with spaces.
    for _ in 0..w - npre - 2 {
    stdout.write_all(b" ")?;
    }
    Ok(())
    }
    }
    }
    }
    impl InnerCursors {
    fn render(&mut self) -> Result<(), std::io::Error> {
    use terminal_size::*;
    let mut stdout = std::io::stdout();
    if let Some((Width(w), _)) = terminal_size() {
    if self.n_pre == 0 {
    self.n_post = 0;
    for c in self.cursors.iter() {
    let n_pre = c.pre().chars().count();
    self.n_pre = self.n_pre.max(n_pre);
    self.n_post = self.n_post.max(c.n());
    }
    }
    stdout.write_all(b"\x1B[F")?;
    }
    for c in self.cursors.iter_mut() {
    // Clear the end of the line and move to the next one.
    stdout.write_all(b"\x1B[K\n")?;
    }
    self.drawn = self.cursors.len();
    // Erase the terminal after the cursor.
    stdout.write_all(b"\x1B[J")?;
    stdout.flush()?;
    }
    Ok(())
    }
    }
    c.render(&mut stdout, self.n_pre, self.n_post, w)?;
    self.w = w;
    let w = w as usize;
    for _ in 0..self.drawn {
    pub fn push(&mut self, c: Cursor) -> usize {
    let r = self.cursors.len();
    self.cursors.push(c);
    r
    }
    let nw = w + npost - wb - 6;
    if *n <= 1 {
    for _ in 0..wb as usize {
    }
    } else {
    for j in 0..wb as usize {
    if j < k {
    write!(stdout, "=")?;
    } else if j == k {
    write!(stdout, ">")?;
    } else {
    write!(stdout, " ")?
    }
    let k = (wb as usize * *i) / *n;
    stdout.write_all(filler.as_bytes())?;
    let filler = if *i == *n { "=" } else { " " };
    let w_digits = {
    let mut n = *n;
    let mut nd = if n == 0 { 1 } else { 0 } + if *i == 0 { 1 } else { 0 };
    while n > 0 {
    n /= 10;
    nd += 1
    }
    };
    let w = w - npre - npost - w_digits;
    nd * 2
    _ => {}
    }
    }
    pub fn incr_len(&mut self) {
    match self {
    Cursor::Bar { n, .. } => *n += 1,
    m.stop = false;
    debug!("borrow_mut");
    self.restart();
    let mut t = self.t.lock().unwrap();
    if let Some(t) = t.take() {
    t.join().unwrap();
    }
    pub fn join(&self) {
    debug!("join");
    debug!("stop");
    }));
    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 {
    }
    impl std::ops::Index<usize> for InnerCursors {
    type Output = Cursor;
    fn index(&self, i: usize) -> &Self::Output {
    self.cursors.index(i)
    }
    }
    impl std::ops::IndexMut<usize> for InnerCursors {
    fn index_mut(&mut self, i: usize) -> &mut Self::Output {
    self.cursors.index_mut(i)
    }
    cursors: Vec<Cursor>,
    t: Mutex<Option<std::thread::JoinHandle<()>>>,
    lazy_static::lazy_static! {
    pub static ref PROGRESS: crate::progress::Cursors = crate::progress::Cursors::new();
    }
    use log::*;
  • edit in pijul/src/remote/ssh.rs at line 21
    [12.23]
    [12.384]
    use pijul_interaction::progress::ProgressBar;
  • replacement in pijul/src/remote/ssh.rs at line 949
    [12.44372][12.0:22]()
    pro_n: usize,
    [12.44372]
    [12.44372]
    progress_bar: ProgressBar,
  • replacement in pijul/src/remote/ssh.rs at line 995
    [12.3688][12.23:88](),[12.45379][12.23:88]()
    super::PROGRESS.borrow_mut().unwrap()[pro_n].incr();
    [12.3688]
    [12.780]
    progress_bar.inc(1);
  • replacement in pijul/src/remote/ssh.rs at line 1002
    [12.45470][12.0:22]()
    pro_n: usize,
    [12.45470]
    [12.3689]
    progress_bar: ProgressBar,
  • replacement in pijul/src/remote/ssh.rs at line 1008
    [12.45564][12.23:97]()
    self.download_changes_(pro_n, c, Some(sender), changes_dir, full)
    [12.45564]
    [12.131]
    self.download_changes_(progress_bar, c, Some(sender), changes_dir, full)
  • replacement in pijul/src/remote/ssh.rs at line 1014
    [12.208][12.98:120]()
    pro_n: usize,
    [12.208]
    [12.3800]
    progress_bar: ProgressBar,
  • replacement in pijul/src/remote/ssh.rs at line 1038
    [12.738][12.121:190]()
    super::PROGRESS.borrow_mut().unwrap()[pro_n].incr();
    [12.738]
    [12.798]
    progress_bar.inc(1);
  • replacement in pijul/src/remote/mod.rs at line 27
    [12.344][12.344:375]()
    use crate::progress::PROGRESS;
    [12.344]
    [12.10383]
    use pijul_interaction::progress::{
    ProgressBar, Spinner, APPLY_MESSAGE, COMPLETE_MESSAGE, DOWNLOAD_MESSAGE, UPLOAD_MESSAGE,
    };
  • replacement in pijul/src/remote/mod.rs at line 1049
    [12.65324][12.89:352]()
    let pro_n = {
    let mut pro = PROGRESS.borrow_mut().unwrap();
    pro.push(crate::progress::Cursor::Bar {
    i: 0,
    n: changes.len(),
    pre: "Uploading changes".into(),
    })
    };
    [12.65324]
    [12.352]
    let upload_bar = ProgressBar::new(changes.len() as u64, UPLOAD_MESSAGE)?;
  • replacement in pijul/src/remote/mod.rs at line 1052
    [12.65345][12.354:452]()
    RemoteRepo::Local(ref mut l) => l.upload_changes(pro_n, local, to_channel, changes)?,
    [12.65345]
    [12.452]
    RemoteRepo::Local(ref mut l) => {
    l.upload_changes(upload_bar, local, to_channel, changes)?
    }
  • replacement in pijul/src/remote/mod.rs at line 1056
    [12.496][12.496:571]()
    s.upload_changes(pro_n, local, to_channel, changes).await?
    [12.496]
    [12.571]
    s.upload_changes(upload_bar, local, to_channel, changes)
    .await?
    }
    RemoteRepo::Http(ref h) => {
    h.upload_changes(upload_bar, local, to_channel, changes)
    .await?
  • edit in pijul/src/remote/mod.rs at line 1063
    [12.585][12.585:684]()
    RemoteRepo::Http(ref h) => h.upload_changes(pro_n, local, to_channel, changes).await?,
  • replacement in pijul/src/remote/mod.rs at line 1069
    [12.1023][12.685:767](),[12.2665][12.685:767]()
    local::upload_changes(pro_n, &store, txn, &mut channel, changes)?
    [12.1023]
    [12.2745]
    local::upload_changes(upload_bar, &store, txn, &mut channel, changes)?
  • edit in pijul/src/remote/mod.rs at line 1073
    [12.66580][12.768:793]()
    PROGRESS.join();
  • replacement in pijul/src/remote/mod.rs at line 1079
    [12.66710][12.376:398]()
    pro_n: usize,
    [12.66710]
    [12.15968]
    progress_bar: ProgressBar,
  • replacement in pijul/src/remote/mod.rs at line 1087
    [12.67232][12.399:497]()
    RemoteRepo::Local(ref mut l) => l.download_changes(pro_n, hashes, send, path).await?,
    [12.67232]
    [12.1807]
    RemoteRepo::Local(ref mut l) => {
    l.download_changes(progress_bar, hashes, send, path).await?
    }
  • replacement in pijul/src/remote/mod.rs at line 1091
    [12.1851][12.498:573]()
    s.download_changes(pro_n, hashes, send, path, full).await?
    [12.1851]
    [12.1950]
    s.download_changes(progress_bar, hashes, send, path, full)
    .await?
  • replacement in pijul/src/remote/mod.rs at line 1095
    [12.2009][12.574:649]()
    h.download_changes(pro_n, hashes, send, path, full).await?
    [12.2009]
    [12.2108]
    h.download_changes(progress_bar, hashes, send, path, full)
    .await?
  • replacement in pijul/src/remote/mod.rs at line 1147
    [12.16150][12.711:1024](),[12.1407][12.711:1024](),[12.105][12.2307:2364](),[12.1024][12.2307:2364](),[12.2307][12.2307:2364](),[12.2364][12.1025:1081]()
    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 {
    i: 0,
    n: to_apply.len(),
    pre: "Applying".into(),
    }))
    [12.16150]
    [12.1081]
    let apply_len = to_apply.len() as u64;
    let download_bar = ProgressBar::new(apply_len, DOWNLOAD_MESSAGE)?;
    let apply_bar = if do_apply {
    ProgressBar::new(apply_len, APPLY_MESSAGE)?
  • replacement in pijul/src/remote/mod.rs at line 1152
    [12.1098][12.1098:1115]()
    None
    [12.1098]
    [12.1115]
    ProgressBar::hidden()
  • edit in pijul/src/remote/mod.rs at line 1154
    [12.1126][12.1126:1155]()
    std::mem::drop(pro);
  • edit in pijul/src/remote/mod.rs at line 1162
    [12.1472]
    [12.1472]
    let cloned_download_bar = download_bar.clone();
  • replacement in pijul/src/remote/mod.rs at line 1165
    [12.1532][12.1156:1250]()
    .download_changes(pro_a, &mut hash_recv, &mut send, &mut change_path_, false)
    [12.1532]
    [12.1619]
    .download_changes(
    cloned_download_bar,
    &mut hash_recv,
    &mut send,
    &mut change_path_,
    false,
    )
  • edit in pijul/src/remote/mod.rs at line 1173
    [12.1644]
    [12.1644]
  • replacement in pijul/src/remote/mod.rs at line 1199
    [12.200][12.72:164]()
    .download_changes_rec(repo, hash_send, recv, send_ready, pro_a, waiting, asked)
    [12.200]
    [12.237]
    .download_changes_rec(
    repo,
    hash_send,
    recv,
    send_ready,
    download_bar,
    waiting,
    asked,
    )
  • replacement in pijul/src/remote/mod.rs at line 1246
    [12.2529][12.1251:1292]()
    if let Some(pro_b) = pro_b {
    [12.2529]
    [12.972]
    if let Some(apply_bar) = apply_bar.inner() {
  • replacement in pijul/src/remote/mod.rs at line 1248
    [12.1015][12.1293:1355]()
    PROGRESS.inner.lock().unwrap()[pro_b].incr();
    [12.1015]
    [12.3567]
    apply_bar.inc(1);
  • edit in pijul/src/remote/mod.rs at line 1264
    [12.588][12.1356:1405](),[12.7990][12.1356:1405](),[12.321][12.1356:1405]()
    debug!("join");
    PROGRESS.join();
  • replacement in pijul/src/remote/mod.rs at line 1273
    [12.392][12.800:822](),[12.800][12.800:822]()
    pro_n: usize,
    [12.392]
    [12.822]
    progress_bar: ProgressBar,
  • replacement in pijul/src/remote/mod.rs at line 1282
    [9.30][9.30:60]()
    return Ok(())
    [9.30]
    [9.60]
    return Ok(());
  • replacement in pijul/src/remote/mod.rs at line 1304
    [12.326][10.0:86]()
    PROGRESS.borrow_mut().unwrap()[pro_n].incr_len();
    [12.326]
    [12.326]
    progress_bar.inc(1);
  • edit in pijul/src/remote/mod.rs at line 1345
    [12.71386][12.1472:1733]()
    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(),
    })
    };
  • edit in pijul/src/remote/mod.rs at line 1346
    [12.3446]
    [12.71386]
    let download_bar = ProgressBar::new(tag.len() as u64, DOWNLOAD_MESSAGE)?;
    let cloned_download_bar = download_bar.clone();
  • replacement in pijul/src/remote/mod.rs at line 1352
    [12.3866][12.1735:1762]()
    pro_n,
    [12.3866]
    [12.3910]
    cloned_download_bar,
  • replacement in pijul/src/remote/mod.rs at line 1373
    [12.593][12.604:703]()
    .download_changes_rec(repo, send_hash, recv_signal, send_ready, pro_n, waiting, asked)
    [12.593]
    [12.3566]
    .download_changes_rec(
    repo,
    send_hash,
    recv_signal,
    send_ready,
    download_bar,
    waiting,
    asked,
    )
  • replacement in pijul/src/remote/mod.rs at line 1454
    [12.75363][12.2118:2410](),[12.2410][12.75363:75405](),[12.4279][12.75363:75405](),[12.75363][12.75363:75405](),[12.75405][12.2108:2126](),[12.2126][12.2411:2507](),[12.2507][12.2215:2282](),[12.4512][12.2215:2282](),[12.2215][12.2215:2282](),[12.2282][12.76064:76076](),[12.76064][12.76064:76076]()
    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);
    let t = tokio::spawn(async move {
    self_
    .download_changes(pro_n, &mut recv_hash, &mut send_sig, &mut changes_dir, true)
    .await?;
    Ok::<_, anyhow::Error>(self_)
    });
    [12.75363]
    [12.76076]
    let dummy_bar = ProgressBar::hidden();
    let _completion_spinner = Spinner::new(COMPLETE_MESSAGE)?;
    let t: tokio::task::JoinHandle<Result<RemoteRepo, anyhow::Error>> =
    tokio::spawn(async move {
    self_
    .download_changes(
    dummy_bar,
    &mut recv_hash,
    &mut send_sig,
    &mut changes_dir,
    true,
    )
    .await?;
    Ok::<_, anyhow::Error>(self_)
    });
  • edit in pijul/src/remote/mod.rs at line 1484
    [12.18716][12.2508:2574](),[12.4550][12.2508:2574]()
    PROGRESS.borrow_mut().unwrap()[pro_n].incr_len();
  • edit in pijul/src/remote/mod.rs at line 1507
    [12.18770][12.2575:2645](),[12.4592][12.2575:2645]()
    PROGRESS.borrow_mut().unwrap()[pro_n].incr_len();
  • edit in pijul/src/remote/mod.rs at line 1515
    [12.77704][12.2646:2671]()
    PROGRESS.join();
  • edit in pijul/src/remote/local.rs at line 11
    [12.20406]
    [12.79900]
    use pijul_interaction::progress::ProgressBar;
  • replacement in pijul/src/remote/local.rs at line 142
    [12.82143][12.809:831]()
    pro_n: usize,
    [12.82143]
    [12.82143]
    progress_bar: ProgressBar,
  • replacement in pijul/src/remote/local.rs at line 178
    [12.1124][12.832:910]()
    upload_changes(pro_n, &store, &mut *txn.write(), &channel, changes)?;
    [12.1124]
    [12.1204]
    upload_changes(progress_bar, &store, &mut *txn.write(), &channel, changes)?;
  • replacement in pijul/src/remote/local.rs at line 196
    [12.83512][12.2838:2860]()
    pro_n: usize,
    [12.83512]
    [12.22266]
    progress_bar: ProgressBar,
  • replacement in pijul/src/remote/local.rs at line 212
    [12.1080][12.1080:1145]()
    super::PROGRESS.borrow_mut().unwrap()[pro_n].incr();
    [12.1080]
    [12.1145]
    progress_bar.inc(1);
  • replacement in pijul/src/remote/local.rs at line 268
    [12.5094][12.911:929](),[12.1047][12.911:929]()
    pro_n: usize,
    [12.5094]
    [12.3885]
    progress_bar: ProgressBar,
  • replacement in pijul/src/remote/local.rs at line 294
    [12.23926][12.930:991](),[12.508][12.930:991]()
    super::PROGRESS.borrow_mut().unwrap()[pro_n].incr();
    [12.23926]
    [12.4175]
    progress_bar.inc(1);
  • edit in pijul/src/remote/http.rs at line 10
    [12.23952]
    [85.0]
    use pijul_interaction::progress::ProgressBar;
  • replacement in pijul/src/remote/http.rs at line 42
    [12.24470][11.557:628]()
    tokio::fs::create_dir_all(&path.parent().unwrap()).await.unwrap();
    [12.24470]
    [12.314]
    tokio::fs::create_dir_all(&path.parent().unwrap())
    .await
    .unwrap();
  • replacement in pijul/src/remote/http.rs at line 147
    [12.1135][12.2927:2949]()
    pro_n: usize,
    [12.1135]
    [12.24723]
    progress_bar: ProgressBar,
  • replacement in pijul/src/remote/http.rs at line 162
    [12.1261][12.2950:3019](),[12.5078][12.2950:3019]()
    super::PROGRESS.borrow_mut().unwrap()[pro_n].incr();
    [12.1261]
    [12.1262]
    progress_bar.inc(1);
  • replacement in pijul/src/remote/http.rs at line 168
    [12.1410][12.1410:1435]()
    continue
    [12.1410]
    [12.1435]
    continue;
  • replacement in pijul/src/remote/http.rs at line 174
    [12.1626][12.1626:1652]()
    break
    [12.1626]
    [12.1652]
    break;
  • replacement in pijul/src/remote/http.rs at line 211
    [12.3073][12.3073:3150]()
    super::PROGRESS.borrow_mut().unwrap()[pro_n].incr();
    [12.3073]
    [12.3150]
    progress_bar.inc(1);
  • replacement in pijul/src/remote/http.rs at line 225
    [12.876][12.992:1014]()
    pro_n: usize,
    [12.876]
    [12.876]
    progress_bar: ProgressBar,
  • replacement in pijul/src/remote/http.rs at line 290
    [12.1908][12.1015:1080]()
    super::PROGRESS.borrow_mut().unwrap()[pro_n].incr();
    [12.597]
    [12.1501]
    progress_bar.inc(1);
  • replacement in pijul/src/remote/http.rs at line 542
    [11.1930][11.1930:2044]()
    pub async fn prove(
    &mut self,
    key: libpijul::key::SKey,
    ) -> Result<(), anyhow::Error> {
    [11.1930]
    [11.2044]
    pub async fn prove(&mut self, key: libpijul::key::SKey) -> Result<(), anyhow::Error> {
  • edit in pijul/src/main.rs at line 4
    [12.14][12.11606:11620](),[12.84234][12.11606:11620]()
    mod progress;
  • edit in pijul/src/commands/reset.rs at line 11
    [12.1348][12.4148:4179]()
    use crate::progress::PROGRESS;
  • edit in pijul/src/commands/reset.rs at line 12
    [12.1383]
    [12.97798]
    use pijul_interaction::progress::{Spinner, OUTPUT_MESSAGE};
  • replacement in pijul/src/commands/reset.rs at line 192
    [4.261][12.10304:10538](),[12.10304][12.10304:10538]()
    PROGRESS
    .borrow_mut()
    .unwrap()
    .push(crate::progress::Cursor::Spin {
    i: 0,
    pre: "Outputting repository".into(),
    });
    [4.261]
    [12.10538]
    let _output_spinner = Spinner::new(OUTPUT_MESSAGE)?;
  • edit in pijul/src/commands/reset.rs at line 217
    [5.68][12.11406:11435](),[12.11406][12.11406:11435]()
    PROGRESS.join();
  • replacement in pijul/src/commands/reset.rs at line 218
    [12.11452][12.11452:11686]()
    PROGRESS
    .borrow_mut()
    .unwrap()
    .push(crate::progress::Cursor::Spin {
    i: 0,
    pre: "Outputting repository".into(),
    });
    [12.11452]
    [12.11686]
    let _output_spinner = Spinner::new(OUTPUT_MESSAGE)?;
  • edit in pijul/src/commands/reset.rs at line 239
    [12.101687][12.12218:12247]()
    PROGRESS.join();
  • edit in pijul/src/commands/pushpull.rs at line 15
    [12.2430][12.4774:4805](),[12.1761][12.4774:4805]()
    use crate::progress::PROGRESS;
  • edit in pijul/src/commands/pushpull.rs at line 17
    [12.1796]
    [12.111878]
    use pijul_interaction::progress::{ProgressBar, Spinner, APPLY_MESSAGE, OUTPUT_MESSAGE};
  • replacement in pijul/src/commands/pushpull.rs at line 456
    [12.11788][12.0:267]()
    let mut pro = PROGRESS.borrow_mut().unwrap();
    let n = pro.push(crate::progress::Cursor::Bar {
    i: 0,
    n: to_download.len(),
    pre: "Applying".into(),
    });
    std::mem::drop(pro);
    [12.11788]
    [12.10186]
    let apply_bar = ProgressBar::new(to_download.len() as u64, APPLY_MESSAGE)?;
  • replacement in pijul/src/commands/pushpull.rs at line 477
    [12.29393][12.268:325](),[12.11872][12.268:325]()
    PROGRESS.borrow_mut().unwrap()[n].incr()
    [12.29393]
    [12.120565]
    apply_bar.inc(1);
  • edit in pijul/src/commands/pushpull.rs at line 538
    [8.47][12.4806:5040](),[12.184][12.4806:5040](),[12.1366][12.4806:5040]()
    PROGRESS
    .borrow_mut()
    .unwrap()
    .push(crate::progress::Cursor::Spin {
    i: 0,
    pre: "Outputting repository".into(),
    });
  • edit in pijul/src/commands/pushpull.rs at line 539
    [12.16538]
    [12.1366]
    let _output_spinner = Spinner::new(OUTPUT_MESSAGE);
  • replacement in pijul/src/commands/pushpull.rs at line 548
    [8.411][8.411:452]()
    continue
    [8.411]
    [8.452]
    continue;
  • replacement in pijul/src/commands/pushpull.rs at line 551
    [8.508][8.508:531]()
    },
    [8.508]
    [12.294]
    }
  • edit in pijul/src/commands/pushpull.rs at line 571
    [12.679][12.5041:5070]()
    PROGRESS.join();
  • edit in pijul/src/commands/apply.rs at line 10
    [12.3380][12.5073:5104]()
    use crate::progress::PROGRESS;
  • edit in pijul/src/commands/apply.rs at line 11
    [12.3415]
    [12.194497]
    use pijul_interaction::progress::{Spinner, OUTPUT_MESSAGE};
  • replacement in pijul/src/commands/apply.rs at line 147
    [12.23910][12.5105:5339](),[12.3383][12.5105:5339]()
    PROGRESS
    .borrow_mut()
    .unwrap()
    .push(crate::progress::Cursor::Spin {
    i: 0,
    pre: "Outputting repository".into(),
    });
    [12.23910]
    [7.175]
    let _output_spinner = Spinner::new(OUTPUT_MESSAGE)?;
  • edit in pijul/src/commands/apply.rs at line 219
    [12.1642][12.5340:5369]()
    PROGRESS.join();
  • edit in pijul/Cargo.toml at line 94
    [12.198110][12.11649:11671]()
    terminal_size = "0.1"
  • edit in pijul/Cargo.toml at line 110
    [86.310]
    [87.0]
    pijul-interaction = { path = "../pijul-interaction" }