huskies: merge 872
This commit is contained in:
@@ -81,6 +81,8 @@ pub(super) fn handle_depends(ctx: &CommandContext) -> Option<String> {
|
||||
.map(|i| i.stage.dir_name().to_string())
|
||||
.unwrap_or_else(|| stage_dir.clone());
|
||||
crate::db::write_item_with_content(&story_id, &stage, &updated);
|
||||
// Sync depends_on to the typed CRDT register.
|
||||
crate::crdt_state::set_depends_on(&story_id, &deps);
|
||||
if deps.is_empty() {
|
||||
Some(format!(
|
||||
"Cleared all dependencies for **{story_name}** ({story_id})."
|
||||
@@ -94,10 +96,14 @@ pub(super) fn handle_depends(ctx: &CommandContext) -> Option<String> {
|
||||
}
|
||||
} else {
|
||||
match write_depends_on(&path, &deps) {
|
||||
Ok(()) if deps.is_empty() => Some(format!(
|
||||
"Cleared all dependencies for **{story_name}** ({story_id})."
|
||||
)),
|
||||
Ok(()) if deps.is_empty() => {
|
||||
crate::crdt_state::set_depends_on(&story_id, &[]);
|
||||
Some(format!(
|
||||
"Cleared all dependencies for **{story_name}** ({story_id})."
|
||||
))
|
||||
}
|
||||
Ok(()) => {
|
||||
crate::crdt_state::set_depends_on(&story_id, &deps);
|
||||
let nums: Vec<String> = deps.iter().map(|n| n.to_string()).collect();
|
||||
Some(format!(
|
||||
"Set depends_on: [{}] for **{story_name}** ({story_id}).",
|
||||
|
||||
Reference in New Issue
Block a user