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