Refactor protocol command's handling of repo and channel
Dependencies
- [2]
GKSVBEUWRefactor Repository constructors to take Option<&Path> instead of Option<PathBuf> - [3]
PIQCNEEBUpgrading to Clap 3.0.0-alpha.5 - [4]
A3RM526YIntegrating identity malleability - [5]
5SLOJYHGFixing the Git feature - [6]
4H2XTVJ2Fix some mistakes in the docs - [7]
I52XSRUHMassive cleanup, and simplification - [8]
ZZXBHCN3fixing the protocol - [9]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [10]
KWAMD2KRA few fixes in the documentation comments - [11]
JL4WKA5PImplement the Sanakirja concurrency model in a cross-process way - [12]
EUZFFJSOUpdating Pijul with the latest changes in Libpijul - [13]
OGJFEWHUFixing missing dependencies on partial clones - [14]
RUBBHYZ7Removing unnecessary async/await - [15]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [16]
WW2EOFBBUmask in archives - [17]
AEPEFS7OWrite help for each argument - [18]
L5IUD2DSFixing the regular expression parsing the protocol lines - [19]
WZVCLZKYaddress clippy lints - [20]
7ZROQSSNHandling TAG uploads from the `pijul protocol` command - [21]
DO2Y5TY5Tag synchronisation - [*]
L4JXJHWXpijul/*: reorganize imports and remove extern crate
Change contents
- edit in pijul/src/commands/protocol.rs at line 7[23.1914][3.15113]
use crate::commands::common_opts::RepoPath;use crate::commands::load_channel_exact; - replacement in pijul/src/commands/protocol.rs at line 22[3.123656]→[3.1117:1267](∅→∅),[3.1267]→[3.123656:123721](∅→∅),[3.1965]→[3.123656:123721](∅→∅),[3.2698]→[3.123656:123721](∅→∅),[3.123656]→[3.123656:123721](∅→∅)
/// Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a `.pijul` directory.#[clap(long = "repository")]repo_path: Option<PathBuf>,#[clap(flatten)]base: RepoPath, - edit in pijul/src/commands/protocol.rs at line 44[3.124435]→[3.15150:15291](∅→∅),[3.15291]→[3.124564:124591](∅→∅),[3.124564]→[3.124564:124591](∅→∅),[3.124591]→[3.15292:15337](∅→∅),[3.15337]→[3.124694:124703](∅→∅),[3.124694]→[3.124694:124703](∅→∅)
fn load_channel<T: MutTxnTExt>(txn: &T, name: &str) -> Result<ChannelRef<T>, anyhow::Error> {if let Some(c) = txn.load_channel(name)? {Ok(c)} else {bail!("No such channel: {:?}", name)}} - replacement in pijul/src/commands/protocol.rs at line 48
let mut repo = Repository::find_root(self.repo_path.as_deref())?;let mut repo = Repository::find_root(self.base.repo_path())?; - replacement in pijul/src/commands/protocol.rs at line 64
let channel = load_channel(&*txn.read(), &cap[1])?;let channel = load_channel_exact(&cap[1], &*txn.read())?; - replacement in pijul/src/commands/protocol.rs at line 69
let channel = load_channel(&*txn.read(), &cap[1])?;let channel = load_channel_exact(&cap[1], &*txn.read())?; - replacement in pijul/src/commands/protocol.rs at line 120
let channel = load_channel(&*txn.read(), &cap[1])?;let channel = load_channel_exact(&cap[1], &*txn.read())?; - replacement in pijul/src/commands/protocol.rs at line 181
let channel = load_channel(&*txn.read(), &cap[2])?;let channel = load_channel_exact(&cap[2], &*txn.read())?; - replacement in pijul/src/commands/protocol.rs at line 267
let channel = load_channel(&*txn.read(), &cap[1])?;let channel = load_channel_exact(&cap[1], &*txn.read())?; - replacement in pijul/src/commands/protocol.rs at line 281
let channel = load_channel(&*txn.read(), &cap[1])?;let channel = load_channel_exact(&cap[1], &*txn.read())?;