Q7LEDPIWGV5LJE3LYXLT74RBKOHEHLL4EJY6N4FDR3B6ZPX3V2UAC
Y2Y4OOIECVVLL5KIUVHIWJTGPADACCZZHUFGHTLSWHXS5UJ5FD4QC
QQS7LII4MKQWKPYJXSZVOKLZ2ZSWQOMHHE6T22DJ4CL5I6YRGJLQC
GKSVBEUW7Q2M4QPKPHOUPGP36AMXMJVGX7KCSNYXEFQZOURGBSMQC
QL6K2ZM35B3NIXEMMCJWUSFXOBQHAGXRDMO7ID5DCKTJH4QJVY7QC
BPCAJCLTVK2GVWYURWJTPQ6XA34JUJZNZHG6ONX4ARM3QPJJ6UPQC
EUZFFJSOWV4PXDFFPDAFBHFUUMOFEU6ST7JH57YYRRR2SEOXLN6QC
DX2FO4HZDTTBU436YRPQW3MIIVFB3ZFSZ3SI5GYLTIWCIGRTQ6DAC
AAXP2534BWX2ZUDZZHUMLYDBMGFGUH32CNRA3KOLER3JKOIJUZLAC
DO2Y5TY5JQISUHCVNPI2FXO7WWZVJQ3LGPWF4DNADMGZRIO6PT2QC
L3RCAPPKPURGFWF4TKDVIJRRMPJDMQAZ6T5CITGMS7KP5ROZ7IWAC
ZDK3GNDBWXJ2OXFDYB72ZCEBGLBF4MKE5K3PVHDZATHJ7HJIDPRQC
E6IKUIPDX3P5CHW5R62DEJTCZZFJIM6UKQ6QN3SPASTAJY3MYZWQC
5OGOE4VWS5AIG4U2UYLLIGA3HY6UB7SNQOSESHNXBLET3VQXFBZAC
DWSAYGVEOR4D2EKIICEZUWCRGJTUXQQLOUWMYIFV7XN62K44F4FAC
C267PHOH3QJBSBEWQB3J7PPOOXIUKM3DIIZIPLHPU4D5OXRCGLZAC
FZ7MXL3BGIDZEEEKWX4CHAKPDO46FFF5BZDL6S2KOWTZ53GE7D6AC
FDEVV5NGUMTEULP25EFYFZEVICWYLGV7XMED25PNKD36DL4NA46AC
/// 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", value_hint = ValueHint::DirPath)]
repo_path: Option<PathBuf>,
#[clap(flatten)]
base: RepoPath,
/// 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", value_hint = ValueHint::DirPath)]
repo_path: Option<PathBuf>,
#[clap(flatten)]
base: RepoPath,
/// 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", value_hint = ValueHint::DirPath)]
repo_path: Option<PathBuf>,
#[clap(flatten)]
base: RepoPath,
/// 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", value_hint = ValueHint::DirPath)]
repo_path: Option<PathBuf>,
#[clap(flatten)]
base: RepoPath,
let channel_name = if let Some(c) = channel {
c
} else {
txn.read()
.current_channel()
.unwrap_or(libpijul::DEFAULT_CHANNEL)
.to_string()
};
debug!("channel_name = {:?}", channel_name);
try_record(&mut repo, txn.clone(), &channel_name)?;
let channel = txn.read().load_channel(&channel_name)?.unwrap();
let last_t = if let Some(n) = txn.read().reverse_log(&*channel.read(), None)?.next()
{
let (channel, _) = load_channel(channel.as_deref(), &*txn.read())?;
debug!("channel_name = {:?}", channel.read().name);
try_record(&mut repo, txn.clone(), channel.clone())?;
let last_t = {
let txn = txn.read();
let Some(n) = txn.reverse_log(&*channel.read(), None)?.next() else {
bail!("Channel {} is empty", channel.read().name.as_str());
};
let channel_name = channel.unwrap_or_else(|| {
txn.current_channel()
.unwrap_or(libpijul::DEFAULT_CHANNEL)
.to_string()
});
let channel = if let Some(c) = txn.load_channel(&channel_name)? {
c
} else {
bail!("Channel {:?} not found", channel_name)
};
let (channel, _) = load_channel(channel.as_deref(), &txn)?;
let channel_name = self.channel.unwrap_or_else(|| {
txn.current_channel()
.unwrap_or(libpijul::DEFAULT_CHANNEL)
.to_string()
});
let channel = if let Some(c) = txn.load_channel(&channel_name)? {
c
} else {
bail!("Channel {:?} not found", channel_name)
};
let (channel, _) = load_channel(self.channel.as_deref(), &txn)?;