add push
[?]
Dec 2, 2025, 7:42 PM
YGZ3VCW4OAJYPI2CYK3MTABNFY7Y2ENSSTFE5ZZ4K6HK57FCU3XQCDependencies
- [2]
6YZAVBWUInitial commit - [3]
KLR5FRIBadd fs state read/write of repos - [4]
IQDCHWCPload a pijul repo - [5]
SWWE2R6Mdisplay basic repo stuff - [6]
UB2ITZJSrefresh changed files on FS changes - [7]
EC3TVL4Xadd untracked files - [8]
W7IUT3ZVstart recording impl - [9]
YBJRDOTCmake all repo actions async - [10]
2VUX5BTDload identity - [11]
A5YBC77Vrecord! - [12]
D7A7MSIHallow to defer or abandon record, add buttons - [13]
6SW7UVSHupdate iced version - [14]
OQ6HSAWHshow record log - [15]
WI2BVQ6Jrm client lib crate - [16]
ONRCENKTrm unnecessary state from repo's internal state - [17]
3SYSJKYLadd app icon - [18]
23SFYK4Qbig view refactor into a new crate - [19]
6F7Q4ZLRavoid unused warns - [20]
FVA36HBVrestart repo manager task if it crashes - [21]
I56UGW7Umake record test, fix log update - [22]
UF5NJKAStest load repo - [23]
I2AG42PAnew cols layout - [24]
SGHF5QCVcargo update - [25]
DXAYDIMQupdate to latest pijul - [26]
KWTBNTO3diffs selection and scrolling - [27]
PTWZYQFRuse nav-scrollable for repo status - [28]
7MJOO4E2task wrappers tooling workaround - [29]
WAOGSCOJvery nice refactor, wip adding channels logs - [30]
EJPSD5XOshared allowed actions conditions between update and view - [31]
AZ5D2LQUallow to set record description - [32]
PKLUHYE4allow to copy change hash - [33]
KF2LDB5Yhandle repo init errors - [34]
IFQPVMBDerror handling for repo actions - [35]
LFEMJYYDstart of to_record selection - [36]
5O4FWCFPadd tests to_record selection and improve it - [37]
JZXYSIYDchannel selection! - [38]
ACDXXAX2refactor main's updates into smaller fns - [39]
LNAL3372update iced - [40]
SASAN2XCuse nav-scrollable - [41]
YK3MOJJLchonky refactor, wip other channels logs & diffs - [42]
JE44NYHMdisplay log files diffs - [43]
WGID4LS4absolutely slayed testing with iced task
Change contents
- edit in libflorescence/src/repo.rs at line 4
use libpijul::pristine::sanakirja::MutTxn;use libpijul::ChannelRef; - edit in libflorescence/src/repo.rs at line 8
use pijul_remote::{PushDelta, RemoteRepo};use tokio::task; - edit in libflorescence/src/repo.rs at line 77
Push, - edit in libflorescence/src/repo.rs at line 84
RepoTaskExited, - edit in libflorescence/src/repo.rs at line 106
Pushed {result: anyhow::Result<()>,}, - replacement in libflorescence/src/repo.rs at line 221
pub async fn manage(pub fn manage( - replacement in libflorescence/src/repo.rs at line 225[9.1023]→[9.1023:1027](∅→∅),[9.1027]→[25.199:262](∅→∅),[25.262]→[34.476:525](∅→∅),[34.525]→[22.1127:1167](∅→∅),[22.1127]→[22.1127:1167](∅→∅)
) {match spawn_blocking(move || load(&path)).await.unwrap() {Ok((mut internal_state, Ok(state))) => {// dbg!(diff(&state.repo));) -> std::thread::JoinHandle<()> {// Pijul be set non-interactivepijul_interaction::set_context(pijul_interaction::InteractiveContext::NotInteractive,); - replacement in libflorescence/src/repo.rs at line 231
let _ = msg_out_tx.send(MsgOut::Init(state));let rt = tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap();std::thread::spawn(move || {match load(&path) {Ok((mut internal_state, Ok(state))) => {// dbg!(diff(&state.repo));let _ = msg_out_tx.send(MsgOut::Init(state));// We need to run locally for `fn push` which is async but uses// `pijul::Repository` which is not Send. Running locally// ensures that it runs on the same thread as this task and// hence doesn't require Sendlet local = task::LocalSet::new(); - replacement in libflorescence/src/repo.rs at line 249
while let Some(msg) = msg_in_rx.recv().await {info!("Repo received msg {msg}");internal_state = update(internal_state, msg, &msg_out_tx).await;let msg_out_tx_clone = msg_out_tx.clone();local.spawn_local(async move {while let Some(msg) = msg_in_rx.recv().await {info!("Repo received msg {msg}");internal_state =update(internal_state, msg, &msg_out_tx_clone).await;}});rt.block_on(local);let _ = msg_out_tx.send(MsgOut::RepoTaskExited); - replacement in libflorescence/src/repo.rs at line 261
}Ok((_, Err(err))) => {let _ = msg_out_tx.send(MsgOut::InitFailed(err.to_string()));Ok((_, Err(err))) => {let _ = msg_out_tx.send(MsgOut::InitFailed(err.to_string()));}Err(err) => {let _ = msg_out_tx.send(MsgOut::InitFailed(err.to_string()));} - replacement in libflorescence/src/repo.rs at line 268[22.1441]→[33.379:401](∅→∅),[33.401]→[34.642:716](∅→∅),[33.463]→[22.1541:1551](∅→∅),[34.716]→[22.1541:1551](∅→∅),[22.1541]→[22.1541:1551](∅→∅),[8.150]→[5.589:595](∅→∅),[16.312]→[5.589:595](∅→∅),[11.702]→[5.589:595](∅→∅),[22.1551]→[5.589:595](∅→∅),[9.1700]→[5.589:595](∅→∅),[5.589]→[5.589:595](∅→∅)
Err(err) => {let _ = msg_out_tx.send(MsgOut::InitFailed(err.to_string()));}}}) - edit in libflorescence/src/repo.rs at line 452
MsgIn::Push => {let result = push(&internal_state.path).await;let _ = msg_out_tx.send(MsgOut::Pushed { result });} - edit in libflorescence/src/repo.rs at line 1178
#[allow(clippy::await_holding_lock,reason = "imposed by sanakirja API for txn")]async fn push(repo_path: &Path) -> Result<(), anyhow::Error> {let repo = pijul::Repository::find_root(Some(repo_path))?;let channel_name = current_channel(&repo)?;let txn = repo.pristine.arc_txn_begin()?;let remote_name = if let Some(ref def) = repo.config.default_remote {def} else {bail!("Missing remote");};let remote_channel = &channel_name;let push_channel = None;let no_cert_check = false;let mut remote = pijul_remote::repository(&repo,Some(&repo.path),None,remote_name,remote_channel,no_cert_check,true,).await?;let mut channel = txn.write().open_or_create_channel(&channel_name)?;let PushDelta {to_upload,remote_unrecs: _,unknown_changes: _,..} = to_upload(&mut txn.write(), &mut channel, &repo, &mut remote).await?;debug!("to_upload = {:?}", to_upload);if to_upload.is_empty() {txn.commit()?;bail!("Nothing to push");}// TODO: Show remote unrecords and changes// notify_remote_unrecords(&repo, remote_unrecs.as_slice());// notify_unknown_changes(unknown_changes.as_slice());if to_upload.is_empty() {txn.commit()?;bail!("Nothing to push");}remote.upload_changes(&mut *txn.write(),repo.changes_dir.clone(),push_channel,&to_upload,).await?;txn.commit()?;remote.finish().await?;Ok(())}/// Gets the `to_upload` vector while trying to auto-update/// the local cache if possible. Also calculates whether the remote/// has any changes we don't know about.async fn to_upload(txn: &mut MutTxn<()>,channel: &mut ChannelRef<MutTxn<()>>,repo: &pijul::Repository,remote: &mut RemoteRepo,) -> Result<PushDelta, anyhow::Error> {let path = &[];let force_cache = false;let changes = &[];let remote_delta = remote.update_changelist_pushpull(txn,path,channel,Some(force_cache),repo,changes,false,).await?;if let &mut RemoteRepo::LocalChannel(ref remote_channel) = remote {remote_delta.to_local_channel_push(remote_channel,txn,path,channel,repo,)} else {remote_delta.to_remote_push(txn, path, channel, repo)}} - edit in libflorescence/Cargo.toml at line 43
workspace = true[dependencies.pijul-interaction] - edit in libflorescence/Cargo.toml at line 47
workspace = true[dependencies.pijul-remote] - edit in inflorescence_model/src/action.rs at line 40
Push, - edit in inflorescence_model/src/action.rs at line 102
(Push, Push) => true, - edit in inflorescence_model/src/action.rs at line 123
(Push, _) => false, - edit in inflorescence_model/src/action.rs at line 339
let push = || Binding {key: "P",label: "push",msg: Some(FilteredMsg::Push),}; - edit in inflorescence_model/src/action.rs at line 387
ma.push(push()); - replacement in inflorescence/src/main.rs at line 53
let repo_path = PathBuf::from("/home/tz/dev/pijul");let repo_path = PathBuf::from("/home/tz/dev/pj-test"); - edit in inflorescence/src/main.rs at line 74
_repo_thread: std::thread::JoinHandle<()>, - edit in inflorescence/src/main.rs at line 83
RepoTaskExited, - replacement in inflorescence/src/main.rs at line 96
let (repo_task, repo_tx_in) = start_task_to_manage_repo(repo_path.clone());let (repo_thread, repo_task, repo_tx_in) =start_thread_to_manage_repo(repo_path.clone()); - edit in inflorescence/src/main.rs at line 131
_repo_thread: repo_thread, - edit in inflorescence/src/main.rs at line 168[12.321]→[18.25999:26032](∅→∅),[18.26032]→[20.119:226](∅→∅),[20.226]→[33.2797:2822](∅→∅),[33.2822]→[30.24173:24183](∅→∅),[20.451]→[30.24173:24183](∅→∅)
Msg::RepoTaskExited => {error!("Task managing repo has crashed. This shouldn't happen, please report what happened!");Task::none()} - replacement in inflorescence/src/main.rs at line 260
fn start_task_to_manage_repo(fn start_thread_to_manage_repo( - replacement in inflorescence/src/main.rs at line 262
) -> (Task<Msg>, mpsc::UnboundedSender<repo::MsgIn>) {) -> (std::thread::JoinHandle<()>,Task<Msg>,mpsc::UnboundedSender<repo::MsgIn>,) { - replacement in inflorescence/src/main.rs at line 269
let repo_task = Task::future(async move {repo::manage(repo_path, repo_rx_in, repo_tx_out).await;Msg::RepoTaskExited});let repo_task = repo::manage(repo_path, repo_rx_in, repo_tx_out); - replacement in inflorescence/src/main.rs at line 273
(Task::batch([repo_task, repo_msg_out_task]), repo_tx_in)(repo_task, repo_msg_out_task, repo_tx_in) - edit in inflorescence/src/main.rs at line 554
Task::none()}action::FilteredMsg::Push => {state.repo_tx_in.send(repo::MsgIn::Push).unwrap(); - edit in inflorescence/src/main.rs at line 714
repo::MsgOut::RepoTaskExited => {report_err(state, "Task managing repo has crashed. This shouldn't happen, please report what happened!".to_string())} - edit in inflorescence/src/main.rs at line 744
Err(err) => report_err(state, err.to_string()),},repo::MsgOut::Pushed { result } => match result {Ok(()) => Task::none(), - edit in inflorescence/src/main.rs at line 1570
"p" if mods == Modifiers::SHIFT => {action(action::FilteredMsg::Push)} - edit in Cargo.toml at line 75
features = ["tarball", # needed for pijul-remote] - edit in Cargo.toml at line 86
[workspace.dependencies.pijul-interaction]path = "../pijul/pijul-interaction"[workspace.dependencies.pijul-remote]path = "../pijul/pijul-remote" - edit in Cargo.lock at line 387
version = "0.21.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"[[package]]name = "base64" - replacement in Cargo.lock at line 794
"unicode-width 0.1.14","unicode-width", - replacement in Cargo.lock at line 831
"unicode-width 0.2.1","unicode-width", - edit in Cargo.lock at line 1941
][[package]]name = "h2"version = "0.3.27"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d"dependencies = ["bytes","fnv","futures-core","futures-sink","futures-util","http","indexmap","slab","tokio","tokio-util","tracing", - edit in Cargo.lock at line 2036
][[package]]name = "http"version = "0.2.12"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1"dependencies = ["bytes","fnv","itoa", - edit in Cargo.lock at line 2050
name = "http-body"version = "0.4.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"dependencies = ["bytes","http","pin-project-lite",][[package]]name = "httparse"version = "1.10.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"[[package]]name = "httpdate"version = "1.0.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"[[package]]name = "hyper"version = "0.14.32"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7"dependencies = ["bytes","futures-channel","futures-core","futures-util","h2","http","http-body","httparse","httpdate","itoa","pin-project-lite","socket2","tokio","tower-service","tracing","want",][[package]]name = "hyper-tls"version = "0.5.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"dependencies = ["bytes","hyper","native-tls","tokio","tokio-native-tls",][[package]] - replacement in Cargo.lock at line 2532
"unicode-width 0.2.1","unicode-width", - edit in Cargo.lock at line 2629
name = "ipnet"version = "2.11.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"[[package]] - edit in Cargo.lock at line 2852
"pijul-interaction","pijul-remote", - edit in Cargo.lock at line 2913
"flate2", - edit in Cargo.lock at line 2934
"tar", - edit in Cargo.lock at line 3132
[[package]]name = "mime"version = "0.3.17"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - edit in Cargo.lock at line 3225
name = "native-tls"version = "0.2.14"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e"dependencies = ["libc","log","openssl","openssl-probe","openssl-sys","schannel","security-framework 2.11.1","security-framework-sys","tempfile",][[package]] - edit in Cargo.lock at line 3897
name = "openssl-probe"version = "0.1.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"[[package]] - edit in Cargo.lock at line 4132
][[package]]name = "pijul-remote"version = "1.0.0-beta.10"dependencies = ["anyhow","byteorder","bytes","dirs-next","futures","futures-util","keyring","libpijul","log","pijul-config","pijul-identity","pijul-interaction","pijul-repository","regex","reqwest","sanakirja","serde","serde_derive","serde_json","thrussh","thrussh-config","thrussh-keys","tokio","url", - replacement in Cargo.lock at line 4231
"base64","base64 0.22.1", - edit in Cargo.lock at line 4691
[[package]]name = "reqwest"version = "0.11.27"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62"dependencies = ["base64 0.21.7","bytes","encoding_rs","futures-core","futures-util","h2","http","http-body","hyper","hyper-tls","ipnet","js-sys","log","mime","native-tls","once_cell","percent-encoding","pin-project-lite","rustls-pemfile","serde","serde_json","serde_urlencoded","sync_wrapper","system-configuration","tokio","tokio-native-tls","tokio-util","tower-service","url","wasm-bindgen","wasm-bindgen-futures","wasm-streams","web-sys","winreg",] - edit in Cargo.lock at line 4797
][[package]]name = "rustls-pemfile"version = "1.0.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"dependencies = ["base64 0.21.7", - edit in Cargo.lock at line 4853
][[package]]name = "schannel"version = "0.1.28"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1"dependencies = ["windows-sys 0.61.2", - edit in Cargo.lock at line 4989
"serde",][[package]]name = "serde_urlencoded"version = "0.7.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"dependencies = ["form_urlencoded","itoa","ryu", - edit in Cargo.lock at line 5304
name = "sync_wrapper"version = "0.1.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"[[package]] - edit in Cargo.lock at line 5352
name = "system-configuration"version = "0.5.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"dependencies = ["bitflags 1.3.2","core-foundation 0.9.4","system-configuration-sys",][[package]]name = "system-configuration-sys"version = "0.5.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"dependencies = ["core-foundation-sys","libc",][[package]] - edit in Cargo.lock at line 5386
name = "tar"version = "0.4.44"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a"dependencies = ["filetime","libc","xattr",][[package]] - edit in Cargo.lock at line 5511
name = "thrussh"version = "0.35.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "2127fc8654db70967c556bc9bf5dfef85997b1b901f3d82e9880c39d1051b278"dependencies = ["bitflags 1.3.2","byteorder","cryptovec","digest 0.9.0","flate2","futures","generic-array","log","openssl","rand 0.8.5","sha2 0.9.9","thiserror 1.0.69","thrussh-keys","thrussh-libsodium","tokio",][[package]]name = "thrussh-config"version = "0.6.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "fa974aab89a724928e2fb4e526f6e9a5fa4fb9d544e824fc38bd177c48ca6622"dependencies = ["dirs-next","futures","log","thiserror 1.0.69","tokio","whoami",][[package]] - edit in Cargo.lock at line 5709
"signal-hook-registry", - edit in Cargo.lock at line 5727
name = "tokio-native-tls"version = "0.3.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"dependencies = ["native-tls","tokio",][[package]] - edit in Cargo.lock at line 5804
name = "tower-service"version = "0.3.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"[[package]] - edit in Cargo.lock at line 5871
name = "try-lock"version = "0.2.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"[[package]] - edit in Cargo.lock at line 5945
version = "0.1.14"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"[[package]]name = "unicode-width" - edit in Cargo.lock at line 6024
][[package]]name = "want"version = "0.3.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"dependencies = ["try-lock", - edit in Cargo.lock at line 6131
][[package]]name = "wasm-streams"version = "0.4.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65"dependencies = ["futures-util","js-sys","wasm-bindgen","wasm-bindgen-futures","web-sys", - edit in Cargo.lock at line 6454
"web-sys", - edit in Cargo.lock at line 6678
version = "0.48.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"dependencies = ["windows-targets 0.48.5",][[package]]name = "windows-sys" - edit in Cargo.lock at line 6713
name = "windows-sys"version = "0.61.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"dependencies = ["windows-link",][[package]] - edit in Cargo.lock at line 7033
name = "winreg"version = "0.50.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"dependencies = ["cfg-if","windows-sys 0.48.0",][[package]] - edit in Cargo.lock at line 7088
[[package]]name = "xattr"version = "1.6.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156"dependencies = ["libc","rustix 1.0.7",]