Channel renaming (also do not create a new channel when recording on a channel that doesn't exist)

[?]
Mar 2, 2021, 7:38 PM
PGERZ3KJIQIREXAYLKLZR4526X5RPKIA6LSVZL2DGYQ5UVPIIBUQC

Dependencies

  • [2] Y6EVFMTA Don't output files if they aren't in the current channel
  • [3] JL4WKA5P Implement the Sanakirja concurrency model in a cross-process way
  • [4] I7VL7VPZ Minor cleanup
  • [5] VQPAUKBQ channel switch as an alias to reset
  • [6] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [7] VL7ZYKHB Running hooks through shell on Windows and Unix
  • [8] YN63NUZO Sanakirja 1.0

Change contents

  • replacement in pijul/src/commands/record.rs at line 65
    [3.103598][3.103598:103624](),[3.103624][2.584:685]()
    let mut channel =
    txn.open_or_create_channel(repo.config.get_current_channel(self.channel.as_deref()).0)?;
    [3.103598]
    [3.103721]
    let channel = repo.config.get_current_channel(self.channel.as_deref()).0;
    let mut channel = if let Some(channel) = txn.load_channel(channel)? {
    channel
    } else {
    bail!("Channel {:?} not found", channel);
    };
  • replacement in pijul/src/commands/channel.rs at line 76
    [3.188456][3.13981:14054]()
    let repo = Repository::find_root(self.repo_path).await?;
    [3.188456]
    [3.1809]
    let mut repo = Repository::find_root(self.repo_path).await?;
  • edit in pijul/src/commands/channel.rs at line 93
    [3.189246]
    [3.189246]
    repo.config.current_channel = Some(to.to_string());
    repo.save_config()?;