IP4CUEBEHNVTHTLRBXH27TDN6H5GA34GMR6LWY2GGHWGF6LW24CQC
OY3CGEHQCHMCPWQAXCW2SZCDIDTE2OB6CRFIDT7E2TCFFKXQ43XAC
PIQCNEEBNHZDYOU2O7667XBB6D3V2MUALRRVJX6VO5BGYR7LTYRQC
VNBLGT6GAN2AHKRFKTKED7WNDDRGNULY5H343ZYV3ETSDZZKGBTAC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
L4JXJHWXYNCL4QGJXNKKTOKKTAXKKXBJUUY7HFZGEUZ5A2V5H34QC
I24UEJQLCH2SOXA4UHIYWTRDCHSOPU7AFTRUOTX7HZIAV4AZKYEQC
EUZFFJSOWV4PXDFFPDAFBHFUUMOFEU6ST7JH57YYRRR2SEOXLN6QC
use libpijul::pristine::{ChangeId, ChannelMutTxnT, Position};
use libpijul::{ChannelTxnT, DepsTxnT, MutTxnT, TxnT, TxnTExt};
use libpijul::pristine::{sanakirja::MutTxn, ChangeId, ChannelMutTxnT, Position};
use libpijul::{ArcTxn, ChannelRef, ChannelTxnT, DepsTxnT, MutTxnT, TxnT, TxnTExt};
let mut state = libpijul::RecordBuilder::new();
state.record(
txn.clone(),
libpijul::Algorithm::default(),
false,
&libpijul::DEFAULT_SEPARATOR,
channel.clone(),
&repo.working_copy,
&repo.changes,
"",
num_cpus::get(),
)?;
let rec = state.finish();
debug!("actions = {:?}", rec.actions);
if !rec.actions.is_empty() {
if has_unrecorded_changes(txn.clone(), channel.clone(), &repo).unwrap() {
fn has_unrecorded_changes(txn: ArcTxn<MutTxn<()>>,
channel: ChannelRef<MutTxn<()>>,
repo: &Repository) -> Result<bool, anyhow::Error> {
let mut state = libpijul::RecordBuilder::new();
state.record(
txn,
libpijul::Algorithm::default(),
false,
&libpijul::DEFAULT_SEPARATOR,
channel,
&repo.working_copy,
&repo.changes,
"",
num_cpus::get(),
)?;
let rec = state.finish();
debug!("actions = {:?}", rec.actions);
Ok(!rec.actions.is_empty())
}