feat: show jj ancestry in the floating diff picker
This commit is contained in:
@@ -1367,6 +1367,31 @@ fn jj_private_fetch_discovers_never_fetched_bookmark_and_searchable_remote_chang
|
||||
);
|
||||
assert_eq!(changed(&comparison, Path::new("file")).after, ["local"]);
|
||||
let loaded = repository.fetch_remote("origin").unwrap();
|
||||
assert_eq!(loaded.graph[&tip].parents, [ancestor.clone()]);
|
||||
assert_eq!(
|
||||
loaded.graph[&ancestor].description,
|
||||
"remote historic needle"
|
||||
);
|
||||
assert!(!loaded.graph[&tip].current);
|
||||
let positions: std::collections::BTreeMap<_, _> = loaded
|
||||
.entries
|
||||
.iter()
|
||||
.filter(|entry| entry.category == Category::Revisions)
|
||||
.enumerate()
|
||||
.filter_map(|(index, entry)| match &entry.target {
|
||||
RevisionTarget::Commit(id) => Some((id.as_str(), index)),
|
||||
_ => None,
|
||||
})
|
||||
.collect();
|
||||
for (id, metadata) in &loaded.graph {
|
||||
for parent in &metadata.parents {
|
||||
if let (Some(child), Some(parent)) =
|
||||
(positions.get(id.as_str()), positions.get(parent.as_str()))
|
||||
{
|
||||
assert!(child < parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
let historic = loaded
|
||||
.entries
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user