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