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