Display the state comparison between local and remote. Shows the user a summary of where local and remote are at, helping them understand what will be pushed. # Arguments `local_stack` - Name of the local stack `local_entries` - Local history entries `remote_stack` - Name of the remote stack `remote_state` - Current state of the remote `remote_entries` - Remote changelist entries
(
local_stack: &str,
local_entries: &[HistoryEntry],
remote_stack: &str,
remote_state: &StateResponse,
remote_entries: &[ChangelistEntry],
)
| 257 | /// * `remote_state` - Current state of the remote |
| 258 | /// * `remote_entries` - Remote changelist entries |
| 259 | pub fn display_state_comparison( |
| 260 | local_stack: &str, |
| 261 | local_entries: &[HistoryEntry], |
| 262 | remote_stack: &str, |
| 263 | remote_state: &StateResponse, |
| 264 | remote_entries: &[ChangelistEntry], |
| 265 | ) { |
| 266 | let local_state_str = format_local_state(local_entries); |
| 267 | let remote_state_str = format_remote_state(remote_state, remote_entries); |
| 268 | |
| 269 | println!( |
| 270 | " Local: {} at {}", |
| 271 | style_stack(local_stack), |
| 272 | info(&local_state_str) |
| 273 | ); |
| 274 | println!( |
| 275 | " Remote: {} at {}", |
| 276 | style_stack(remote_stack), |
| 277 | info(&remote_state_str) |
| 278 | ); |
| 279 | } |
| 280 | |
| 281 | /// Format the local state for display. |
| 282 | fn format_local_state(entries: &[HistoryEntry]) -> String { |
nothing calls this directly
no test coverage detected