DDEUZMXQRYVBGTJWKZY6W4UFSDCLB6JV7VX32AOTY3ZPD7OS6P6QC
Y2Y4OOIECVVLL5KIUVHIWJTGPADACCZZHUFGHTLSWHXS5UJ5FD4QC
QQS7LII4MKQWKPYJXSZVOKLZ2ZSWQOMHHE6T22DJ4CL5I6YRGJLQC
GKSVBEUW7Q2M4QPKPHOUPGP36AMXMJVGX7KCSNYXEFQZOURGBSMQC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
ABQDWHNGSBF2REQDCGXSBFAU4RUMXYAF2KHJ5O3D32M7Z3A3FEDAC
AEPEFS7O3YT7CRRFYQVJWUXUUSRGJ6K6XZQVK62B6N74UXOIFWYAC
KWAMD2KR5UYRHHPZWL7GY2KQKNXNVS4BYBVK3FXDI23NQMWA3U4QC
DWSAYGVEOR4D2EKIICEZUWCRGJTUXQQLOUWMYIFV7XN62K44F4FAC
EUZFFJSOWV4PXDFFPDAFBHFUUMOFEU6ST7JH57YYRRR2SEOXLN6QC
5OGOE4VWS5AIG4U2UYLLIGA3HY6UB7SNQOSESHNXBLET3VQXFBZAC
ZBNKSYA6PW4DSPC3NCRUZLVHW2GNXMCSDSAGEIKHGHDGGZRBH7ZQC
PGERZ3KJIQIREXAYLKLZR4526X5RPKIA6LSVZL2DGYQ5UVPIIBUQC
KWAGWB73AMLJFK2Z7SBKHHKKHFRX7AQKXCWDN2MBX72RYCNMB36QC
YN63NUZO4LVJ7XPMURDULTXBVJKW5MVCTZ24R7Z52QMHO3HPDUVQC
I24UEJQLCH2SOXA4UHIYWTRDCHSOPU7AFTRUOTX7HZIAV4AZKYEQC
MF3WAHBIH6Q2F7ZOKWPEJF6VGSKJITWLR3Z64GTD6YQZNA5EATWQC
CCLLB7OIFNFYJZTG3UCI7536TOCWSCSXR67VELSB466R24WLJSDAC
/// Record the change in this channel instead of the current channel
#[clap(long = "channel")]
pub channel: Option<String>,
/// 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)]
pub repo_path: Option<PathBuf>,
let cur = txn
.read()
.current_channel()
.unwrap_or(libpijul::DEFAULT_CHANNEL)
.to_string();
let channel = if let Some(ref c) = self.channel {
c
} else {
cur.as_str()
};
let mut channel = if let Some(channel) = txn.read().load_channel(&channel)? {
channel
} else {
bail!("Channel {:?} not found", channel);
};
let mut extra = Vec::new();
for h in repo.config.extra_dependencies.iter() {
let (h, c) = txn.read().hash_from_prefix(h)?;
if txn
.read()
.get_changeset(txn.read().changes(&*channel.read()), &c)?
.is_none()
{
bail!(
"Change {:?} (from .pijul/config) is not on channel {:?}",
h,
channel.read().name
)
let (mut channel, extra) = {
let txn = txn.read();
let (channel, _) = load_channel(self.base.channel(), &*txn)?;
let mut extra = Vec::new();
for h in repo.config.extra_dependencies.iter() {
let (h, c) = txn.hash_from_prefix(h)?;
if txn
.get_changeset(txn.changes(&*channel.read()), &c)?
.is_none()
{
bail!(
"Change {:?} (from .pijul/config) is not on channel {:?}",
h,
channel.read().name
)
}
extra.push(h)
let h = if let Some(ref hash) = amend {
txn.read().hash_from_prefix(hash)?.0
} else if let Some(h) = txn.read().reverse_log(&*channel.read(), None)?.next() {
(h?.1).0.into()
} else {
return Ok(());
let h = {
let txn = txn.read();
if let Some(ref hash) = amend {
txn.hash_from_prefix(hash)?.0
} else if let Some(h) = txn.reverse_log(&*channel.read(), None)?.next() {
h?.1 .0.into()
} else {
return Ok(());
}