Repository navigation
fix(transfer): emit hardlink uptodate and direct stats to stderr in -vv - #5901
Merged
Merged
Conversation
Two related divergences from upstream rsync's `testsuite/itemize.test` were causing the `-vvplrH` (test 4) golden to mismatch on CI: 1. Hardlink-uptodate notice: when the destination already shares the source group leader's inode, upstream emits `"%s is uptodate"` (`hlink.c:218-224`, gated by `INFO_GTE(NAME, 2) && maybe_ATTRS_REPORT`) instead of the bare path. We were recording the event as `HardLink` with no marker, so the CLI renderer fell through to the default arm and wrote the bare path. Add `with_hardlink_uptodate(true)` to the `is_already_hardlinked` branch of the local-copy executor, thread the flag through `LocalCopyRecord` and `ClientEvent`, and render the suffix from `emit_verbose` when the gate is true. 2. Trailer separator: upstream's `output_summary()` (`main.c:461`) emits a blank `rprintf(FCLIENT, "\n")` before the `INFO_GTE(STATS, 1)` totals so the testsuite's `v_filt` helper (`sed -e '/^$/,$d'`) can strip the trailer when matching `-vv` goldens. The pre-existing separator in `emit_transfer_summary` only covered the verbose-listing -> stats path; cover the verbose-listing -> totals path too. Additionally, mirror upstream's pipelined generator-first / receiver-second wire order by stable-partitioning events so the synchronous `"is uptodate"` notices precede the post-`set_file_attrs` bare-name lines in `-vv` mode. Regression coverage: - `level_2_hardlink_uptodate_emits_is_uptodate_notice` - `level_2_blank_line_precedes_totals_trailer` - `level_2_uptodate_lines_precede_transferred_lines`
oferchen
force-pushed
the
fix/uts-itemize-hardlink-uptodate-stats
branch
from
June 17, 2026 19:30
fdb7dab to
836765e
Compare
This was referenced Jun 17, 2026
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…vv (#5901) Two related divergences from upstream rsync's `testsuite/itemize.test` were causing the `-vvplrH` (test 4) golden to mismatch on CI: 1. Hardlink-uptodate notice: when the destination already shares the source group leader's inode, upstream emits `"%s is uptodate"` (`hlink.c:218-224`, gated by `INFO_GTE(NAME, 2) && maybe_ATTRS_REPORT`) instead of the bare path. We were recording the event as `HardLink` with no marker, so the CLI renderer fell through to the default arm and wrote the bare path. Add `with_hardlink_uptodate(true)` to the `is_already_hardlinked` branch of the local-copy executor, thread the flag through `LocalCopyRecord` and `ClientEvent`, and render the suffix from `emit_verbose` when the gate is true. 2. Trailer separator: upstream's `output_summary()` (`main.c:461`) emits a blank `rprintf(FCLIENT, "\n")` before the `INFO_GTE(STATS, 1)` totals so the testsuite's `v_filt` helper (`sed -e '/^$/,$d'`) can strip the trailer when matching `-vv` goldens. The pre-existing separator in `emit_transfer_summary` only covered the verbose-listing -> stats path; cover the verbose-listing -> totals path too. Additionally, mirror upstream's pipelined generator-first / receiver-second wire order by stable-partitioning events so the synchronous `"is uptodate"` notices precede the post-`set_file_attrs` bare-name lines in `-vv` mode. Regression coverage: - `level_2_hardlink_uptodate_emits_is_uptodate_notice` - `level_2_blank_line_precedes_totals_trailer` - `level_2_uptodate_lines_precede_transferred_lines`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the upstream-testsuite
itemizefailure on CI run 27711564454, which surfaced two distinct divergences in the-vvplrH from/ to/invocation (test 4 oftestsuite/itemize.test):Hardlink-uptodate notice missing. When the destination already shares the source group leader's inode, upstream rsync emits
\"%s is uptodate\"(hlink.c:218-224, gated byINFO_GTE(NAME, 2) && maybe_ATTRS_REPORT) instead of the bare path. We were recording the event asHardLinkwith no marker, so the CLI renderer fell through to the default arm and wrote the bare path (foo/extrainstead offoo/extra is uptodate).Stats trailer not separated. Upstream's
output_summary()(main.c:461) emits a blankrprintf(FCLIENT, \"\\n\")before theINFO_GTE(STATS, 1)totals so the testsuite'sv_filthelper (sed -e '/^$/,$d') can strip the trailer when matching-vvgoldens. The pre-existing separator inemit_transfer_summaryonly covered the verbose-listing -> stats path; the verbose-listing -> totals path was missing the blank line, sov_filtcould not isolate the per-file region.Additionally, mirror upstream's pipelined generator-first / receiver-second wire order in
-vvmode by stable-partitioning events so the synchronous\"is uptodate\"notices precede the post-set_file_attrsbare-name lines.Changes
engine::local_copy::LocalCopyRecord: addhardlink_uptodatefield withwith_hardlink_uptodate()setter andis_hardlink_uptodate()getter.engine::local_copy::executor::file::copy::links: mark theis_already_hardlinkedbranch withwith_hardlink_uptodate(true).core::client::summary::ClientEvent: thread the flag throughfrom_record_owned,from_progress, andfor_test; exposeis_hardlink_uptodate().cli::frontend::progress::render:emit_verbose.HardLink if event.is_hardlink_uptodate()arm that emits\"is uptodate\"at the sameINFO_GTE(NAME, 2)gate asMetadataReused.output_summary().Upstream references
target/interop/upstream-src/rsync-3.4.4/hlink.c:218-224- hardlink-uptodate notice.target/interop/upstream-src/rsync-3.4.4/main.c:425-470-output_summary()and\\nseparator.target/interop/upstream-src/rsync-3.4.4/testsuite/itemize.test:102-109- the golden expectingfoo/extra is uptodateand the transferredfoo/config2line last.Test plan
cargo fmt --all -- --checklevel_2_hardlink_uptodate_emits_is_uptodate_notice(Unix)level_2_blank_line_precedes_totals_trailerlevel_2_uptodate_lines_precede_transferred_linesinterop / upstream-testsuite (itemize)job goes green