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],
)
| 321 | /// |
| 322 | /// Shows what changes would be pulled without actually pulling them. |
| 323 | fn display_dry_run( |
| 324 | &self, |
| 325 | remote_name: &str, |
| 326 | remote_url: &str, |
| 327 | remote_view: &str, |
| 328 | to_download: &[PullChange], |
| 329 | ) -> CliResult<()> { |
| 330 | if to_download.is_empty() { |
| 331 | print_success("Already up to date - nothing to pull"); |
| 332 | return Ok(()); |
| 333 | } |
| 334 | |
| 335 | println!( |
| 336 | "Would pull {} from {} (view: {}):", |
| 337 | format_count(to_download.len(), "change"), |
| 338 | remote_name, |
| 339 | remote_view |
| 340 | ); |
| 341 | print_blank(); |
| 342 | |
| 343 | for change in to_download { |
| 344 | let hash_str = format_hash(&change.hash, false); |
| 345 | let msg = change.message_or_default(); |
| 346 | let tag_marker = if change.tagged { " [tagged]" } else { "" }; |
| 347 | println!(" {} {}{}", style_hash(&hash_str), msg, tag_marker); |
| 348 | } |
| 349 | |
| 350 | print_blank(); |
| 351 | print_hint(&format!("Remote URL: {}", remote_url)); |
| 352 | |
| 353 | Ok(()) |
| 354 | } |
| 355 | |
| 356 | /// Display warning about local-only changes. |
| 357 | /// |
no test coverage detected