Print a hint listing the other views available on the remote. Views already cloned (the requested view and its ancestor chain) are not hinted. Best-effort: silent if the server has no inventory endpoint or nothing else to clone.
(&self, remote: &HttpRemote, applied: &HashSet<String>)
| 714 | /// not hinted. Best-effort: silent if the server has no inventory |
| 715 | /// endpoint or nothing else to clone. |
| 716 | async fn hint_other_views(&self, remote: &HttpRemote, applied: &HashSet<String>) { |
| 717 | let Ok(remote_views) = remote.list_views().await else { |
| 718 | return; |
| 719 | }; |
| 720 | let others: Vec<String> = remote_views |
| 721 | .into_iter() |
| 722 | .map(|v| v.name) |
| 723 | .filter(|name| name != &self.view && !applied.contains(name)) |
| 724 | .collect(); |
| 725 | if others.is_empty() { |
| 726 | return; |
| 727 | } |
| 728 | |
| 729 | print_blank(); |
| 730 | print_hint(&format!( |
| 731 | "This remote has {} other {}: {}", |
| 732 | others.len(), |
| 733 | if others.len() == 1 { "view" } else { "views" }, |
| 734 | others.join(", ") |
| 735 | )); |
| 736 | print_hint( |
| 737 | "Clone them too with 'atomic clone --all-views', or list them with 'atomic view list --remote'.", |
| 738 | ); |
| 739 | } |
| 740 | |
| 741 | /// Async implementation of the clone command. |
| 742 | /// |
no test coverage detected