show record log
[?]
May 5, 2025, 10:24 AM
OQ6HSAWHIRTAIIWMDGCTIOK47JDY7QVVAHLRDA2R5TTJKNSBFCWQCDependencies
- [2]
6YZAVBWUInitial commit - [3]
SWWE2R6Mdisplay basic repo stuff - [4]
WT3GA27Padd cursor with selection - [5]
UB2ITZJSrefresh changed files on FS changes - [6]
EC3TVL4Xadd untracked files - [7]
KT5UYXGKfix selection after adding file, add changed file diffs - [8]
YBJRDOTCmake all repo actions async - [9]
A5YBC77Vrecord! - [10]
D7A7MSIHallow to defer or abandon record, add buttons - [11]
4WO3ZJM2show untracked files' contents - [12]
W4LFX7IHgroup diffs by file name - [13]
PTFDJ567add untracked files encoding - [14]
AMPZ2BXKshow changed files diffs (only Edit atm) - [15]
NRCUG4R2load changed files src when selected - [16]
UMO6U2ZTpartition the change files diffs on whether they have content - [17]
6SW7UVSHupdate iced version - [18]
HOJZI52Yrename flowers_ui to inflorescence - [19]
ZVI4AWERwoot contents_diff - [20]
QMAUTRB6refactor diff - [21]
IQDCHWCPload a pijul repo - [22]
DVKSPF7Rtrack selected file path together with an index - [23]
KLR5FRIBadd fs state read/write of repos - [24]
S2NVIFXRallow to enter record msg
Change contents
- replacement in crates/libflowers_client/src/repo.rs at line 10
use std::path::PathBuf;use std::path::{Path, PathBuf}; - edit in crates/libflowers_client/src/repo.rs at line 28
pub const STATUS_LOG_LIMIT: usize = 10; - edit in crates/libflowers_client/src/repo.rs at line 36
pub log: Log, - edit in crates/libflowers_client/src/repo.rs at line 46
pub log: Log, - edit in crates/libflowers_client/src/repo.rs at line 150
pub type Log = Vec<LogEntry>; - edit in crates/libflowers_client/src/repo.rs at line 153
#[derive(Debug, Clone)]pub struct LogEntry {pub hash: pijul::Hash,pub message: String,} - edit in crates/libflowers_client/src/repo.rs at line 173
let log = state.log.clone(); - edit in crates/libflowers_client/src/repo.rs at line 180
log, - edit in crates/libflowers_client/src/repo.rs at line 243
let (offset, limit) = (None, Some(STATUS_LOG_LIMIT));let log = log(&repo, offset, limit); - edit in crates/libflowers_client/src/repo.rs at line 249
log, - edit in crates/libflowers_client/src/repo.rs at line 690
fn log(repo: &pijul::Repository,offset: Option<usize>,limit: Option<usize>,) -> Vec<LogEntry> {let mut offset = offset.unwrap_or(0);let mut limit = limit.unwrap_or(usize::MAX);let txn = repo.pristine.txn_begin().unwrap();let cur_channel = txn.current_channel().unwrap_or(pijul::DEFAULT_CHANNEL).to_string();let channel = txn.load_channel(&cur_channel).unwrap().unwrap();let inodes = get_inodes(&txn, &repo.path, &[]);let mut reverse_log =txn.reverse_log(&channel.read(), None).unwrap().peekable();if reverse_log.peek().is_none() {return vec![];} - edit in crates/libflowers_client/src/repo.rs at line 716
let mut entries = vec![];for pr in reverse_log {let (_, (h, _mrk)) = pr.unwrap();let cid = pijul::GraphTxnT::get_internal(&txn, h).unwrap().unwrap();let mut is_in_filters = inodes.is_empty();for (_, position) in inodes.iter() {if let Some(position) = position {is_in_filters = pijul::DepsTxnT::get_touched_files(&txn,position,Some(cid),).unwrap()== Some(cid);if is_in_filters {break;}}}if is_in_filters {if offset == 0 && limit > 0 {// If there were no path filters applied, OR is this was one of the hashes// marked by the file filters that were appliedlet entry = mk_log_entry(repo, pijul::Hash::from(h));entries.push(entry);limit -= 1} else if limit > 0 {offset -= 1} else {break;}}}entries}fn mk_log_entry(repo: &pijul::Repository, h: pijul::Hash) -> LogEntry {let header = repo.changes.get_header(&h.into()).unwrap();LogEntry {hash: h,message: header.message.clone(),}}// A lot of error-handling noise here, but since we're dealing with// a user-command and a bunch of file-IO/path manipulation it's// probably necessary for the feedback to be good.//// Borrowed and adjusted from Pijul `pijul/src/commands/log.rs`// - removed Error handling for nowfn get_inodes(txn: &pijul::pristine::sanakirja::Txn,repo_path: &Path,pats: &[String],) -> Vec<(pijul::Inode,Option<pijul::pristine::Position<pijul::ChangeId>>,)> {let mut inodes = Vec::new();for pat in pats {let canon_path = match Path::new(pat).canonicalize() {Err(e) if matches!(e.kind(), std::io::ErrorKind::NotFound) => {// return Err(Error::NotFound(pat.to_string()))todo!()}Err(e) =>// return Err(e.into()),{todo!()}Ok(p) => p,};match canon_path.strip_prefix(repo_path).map(|p| p.to_str()) {// strip_prefix error is if repo_path is not a prefix of canon_path,// which would only happen if they pased in a filter path that's not// in the repository.Err(_) => {// return Err(Error::FilterPath {// pat: pat.to_string(),// canon_path,// repo_path: repo_path.to_path_buf(),// })todo!()}// PathBuf.to_str() returns none iff the path contains invalid UTF-8.Ok(None) =>// return Err(Error::InvalidUtf8(pat.to_string())),{todo!()}Ok(Some(s)) => {let inode = pijul::fs::find_inode(txn, s).expect("TODO");let inode_position =pijul::TreeTxnT::get_inodes(txn, &inode, None).expect("TODO");inodes.push((inode, inode_position.cloned()))}};}inodes} - replacement in crates/libflowers/src/prelude.rs at line 2
pub use chrono::Utc;pub use chrono::{DateTime, Utc}; - edit in crates/inflorescence/src/main.rs at line 23
use pijul::Base32; - replacement in crates/inflorescence/src/main.rs at line 53
.title("Inflorescence 🌻").title("Inflorescence") - edit in crates/inflorescence/src/main.rs at line 385
Some(cursor::Selection::Change { hash }) => {todo!()} - edit in crates/inflorescence/src/main.rs at line 485
}Some(cursor::Selection::Change { hash }) => {todo!() - edit in crates/inflorescence/src/main.rs at line 556
cursor::Select::Change { hash } => todo!(), - edit in crates/inflorescence/src/main.rs at line 913
cursor::Selection::Change { hash } => todo!(), - replacement in crates/inflorescence/src/main.rs at line 1055
let log =el(column(["todo: commits"].iter().map(|hash| el(text(*hash)))));let log = el(column(repo.log.iter().map(|repo::LogEntry { hash, message }| {let mut short_hash = hash.to_base32();short_hash.truncate(8);// TODOlet is_selected = false;el(row([el(button(text(short_hash).font(Font::MONOSPACE)).on_press(Message::CursorSelect(cursor::Select::Change { hash: *hash },)).style(selectable_button_style(is_selected))),el(text(message)),]).spacing(SPACING))},))); - edit in crates/inflorescence/src/main.rs at line 1141
}Some(cursor::Selection::Change { hash }) => {todo!() - replacement in crates/inflorescence/src/main.rs at line 1153
log,el(column([el(text("Recent changes:")), log])), - edit in crates/inflorescence/src/cursor.rs at line 1
use libflowers::prelude::*; - edit in crates/inflorescence/src/cursor.rs at line 21
},Change {hash: pijul::Hash, - edit in crates/inflorescence/src/cursor.rs at line 31
Change { hash: pijul::Hash },