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_view` - Name of the local view `local_entries` - Local history entries `remote_view` - Name of the remote view `remote_state` - Current state of the remote `remote_entries` - Remote changelist entries
(
local_view: &str,
local_entries: &[HistoryEntry],
remote_view: &str,
remote_state: &StateResponse,
remote_entries: &[ChangelistEntry],
)
| 473 | /// * `remote_state` - Current state of the remote |
| 474 | /// * `remote_entries` - Remote changelist entries |
| 475 | pub fn display_state_comparison( |
| 476 | local_view: &str, |
| 477 | local_entries: &[HistoryEntry], |
| 478 | remote_view: &str, |
| 479 | remote_state: &StateResponse, |
| 480 | remote_entries: &[ChangelistEntry], |
| 481 | ) { |
| 482 | let local_state_str = format_local_state(local_entries); |
| 483 | let remote_state_str = format_remote_state(remote_state, remote_entries); |
| 484 | |
| 485 | println!( |
| 486 | " Local: {} at {}", |
| 487 | style_view(local_view), |
| 488 | info(&local_state_str) |
| 489 | ); |
| 490 | println!( |
| 491 | " Remote: {} at {}", |
| 492 | style_view(remote_view), |
| 493 | info(&remote_state_str) |
| 494 | ); |
| 495 | } |
| 496 | |
| 497 | /// Format the local state for display. |
| 498 | fn format_local_state(entries: &[HistoryEntry]) -> String { |
no test coverage detected