Display the dry run preview. Shows what changes would be pulled without actually pulling them.
(
&self,
remote_name: &str,
remote_url: &str,
remote_view: &str,
to_download: &[PullChange],
)
| 423 | /// |
| 424 | /// Shows what changes would be pulled without actually pulling them. |
| 425 | fn display_dry_run( |
| 426 | &self, |
| 427 | remote_name: &str, |
| 428 | remote_url: &str, |
| 429 | remote_view: &str, |
| 430 | to_download: &[PullChange], |
| 431 | ) -> CliResult<()> { |
| 432 | if to_download.is_empty() { |
| 433 | print_success("Already up to date - nothing to pull"); |
| 434 | return Ok(()); |
| 435 | } |
| 436 | |
| 437 | println!( |
| 438 | "Would pull {} from {} (view: {}):", |
| 439 | format_count(to_download.len(), "change"), |
| 440 | remote_name, |
| 441 | remote_view |
| 442 | ); |
| 443 | print_blank(); |
| 444 | |
| 445 | for change in to_download { |
| 446 | let hash_str = format_hash(&change.hash, false); |
| 447 | let msg = change.message_or_default(); |
| 448 | let tag_marker = if change.tagged { " [tagged]" } else { "" }; |
| 449 | println!(" {} {}{}", style_hash(&hash_str), msg, tag_marker); |
| 450 | } |
| 451 | |
| 452 | print_blank(); |
| 453 | print_hint(&format!("Remote URL: {}", remote_url)); |
| 454 | |
| 455 | Ok(()) |
| 456 | } |
| 457 | |
| 458 | /// Display warning about local-only changes. |
| 459 | /// |
no test coverage detected