Improve command feedback

finchie
Dec 20, 2021, 3:30 PM
UAXGGNAZFUQX2XTVNITFZG54E2W5V4RKJUGEKN7WD2HDLVT5QG6QC

Dependencies

  • [2] 6U42MTEZ Fixing log -- filters, along with performance improvements
  • [3] JL4WKA5P Implement the Sanakirja concurrency model in a cross-process way
  • [4] BZSC7VMY address clippy lints
  • [5] A3RM526Y Integrating identity malleability
  • [6] OU6JOR3C Add path filtering for log, add json output for log
  • [7] CCLLB7OI Upgrading to Sanakirja 0.15 + version bump
  • [8] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [9] YN63NUZO Sanakirja 1.0
  • [*] H72JG6HL Init feature; specific .ignore configs
  • [*] Q7CHNDXN Init repo with default .ignore file
  • [*] RUBBHYZ7 Removing unnecessary async/await
  • [*] I24UEJQL Various post-fire fixes
  • [*] MU5GSJAW Partial push and pull (WARNING: breaks the existing protocol)
  • [*] 6F6AAHK4 Simplifying pijul::commands::log, and fixing Broken Pipe errors
  • [*] 4OCC6D42 Recursive add
  • [*] V435QOJR Using path-slash to fix path issues on Windows
  • [*] EUZFFJSO Updating Pijul with the latest changes in Libpijul

Change contents

  • edit in pijul/src/repository.rs at line 113
    [11.476]
    [3.24382]
    use std::io::Write;
  • edit in pijul/src/repository.rs at line 135
    [12.463]
    [3.24857]
    let mut stderr = std::io::stderr();
    writeln!(stderr, "Repository created at {}", cur.to_string_lossy())?;
  • edit in pijul/src/commands/reset.rs at line 42
    [13.1369]
    [3.98164]
    use std::io::Write;
    let mut stderr = std::io::stderr();
  • edit in pijul/src/commands/reset.rs at line 153
    [14.9055]
    [14.9055]
    writeln!(stderr, "Reset repository to last recorded change")?;
  • edit in pijul/src/commands/reset.rs at line 262
    [15.6848]
    [3.101723]
    writeln!(stderr, "Reset given paths to last recorded change")?;
  • replacement in pijul/src/commands/log.rs at line 320
    [2.565][2.565:640]()
    for pr in self.txn.reverse_log(&*self.channel_ref.read(), None)? {
    [2.565]
    [2.640]
    let mut reverse_log = self.txn.reverse_log(&*self.channel_ref.read(), None)?.peekable();
    if reverse_log.peek().is_none() {
    let mut stderr = std::io::stderr();
    writeln!(stderr, "No matching logs found")?;
    return Ok(());
    }
    for pr in reverse_log {
  • edit in pijul/src/commands/log.rs at line 428
    [3.14586]
    [16.3950]
  • replacement in pijul/src/commands/file_operations.rs at line 98
    [3.171069][3.17355:17398]()
    for p in txn.iter_working_copy() {
    [3.171069]
    [3.17398]
    let mut working_copy = txn.iter_working_copy().peekable();
    if working_copy.peek().is_none() {
    writeln!(stdout, "No tracked files")?;
    return Ok(());
    }
    for p in working_copy {
  • edit in pijul/src/commands/file_operations.rs at line 165
    [17.836]
    [18.832]
  • edit in pijul/src/commands/file_operations.rs at line 168
    [18.927]
    [3.17425]
    // If the user calls `pijul add .`, the entire path will be stripped, so we must account for this edge case
    if path.is_dir() || path_str == "" {
    let display_str = if path.is_dir() {
    path_str.clone()
    } else {
    ".".to_string()
    };
    writeln!(stderr, "The directory `{}` has been recorded, but its contents will not be tracked (use --recursive to override)", display_str)?;
    }
  • edit in pijul/src/commands/file_operations.rs at line 188
    [19.15998]
    [3.172439]
    writeln!(stderr, "Tracked {} path(s)", self.paths.iter().count())?;