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],
)
| 438 | /// * `remote_state` - Current state of the remote |
| 439 | /// * `remote_entries` - Remote changelist entries |
| 440 | pub fn display_state_comparison( |
| 441 | local_stack: &str, |
| 442 | local_entries: &[HistoryEntry], |
| 443 | remote_stack: &str, |
| 444 | remote_state: &StateResponse, |
| 445 | remote_entries: &[ChangelistEntry], |
| 446 | ) { |
| 447 | let local_state_str = format_local_state(local_entries); |
| 448 | let remote_state_str = format_remote_state(remote_state, remote_entries); |
| 449 | |
| 450 | println!( |
| 451 | " Local: {} at {}", |
| 452 | style_stack(local_stack), |
| 453 | info(&local_state_str) |
| 454 | ); |
| 455 | println!( |
| 456 | " Remote: {} at {}", |
| 457 | style_stack(remote_stack), |
| 458 | info(&remote_state_str) |
| 459 | ); |
| 460 | } |
| 461 | |
| 462 | /// Format the local state for display. |
| 463 | fn format_local_state(entries: &[HistoryEntry]) -> String { |
nothing calls this directly
no test coverage detected