Stacks on #69 (merge order #67 → #68 → #69 → this).
import --estimate now covers an Exchange (EWS) source. A dry run already reports the per-folder counts; with --estimate it enumerates each folder's items with FindItem, which carries item:Size, so mail, calendar events and contacts are counted and sized straight from the enumeration — no body fetch, no writes.
The new-item count is taken against the archive with the same diff the import uses, so re-estimating a part-filled archive reports only what is left to fetch.
Changes
run_dry gains source_id + want_sizes; under --estimate it builds an ItemRunCtx with use_syncfolderitems: false (FindItem, not SyncFolderItems delta, so sizes are present) and pushes email/calendarevent/contactcard rows.
New pure helper items::new_count_and_bytes — diffs the enumeration against the local rows and sums the new items' reported sizes (an item the server returned without a size still counts, it just adds no bytes). Unit-tested directly in mock_exchange_ews.rs.
estimate_available adds ImportExchangeEws; help/README/fallback note updated to list exchange (EWS).
Verification
cargo fmt, cargo clippy --all-targets -D warnings, cargo test --locked (1197 lib + all integration, incl. the new estimate_counts_new_items_and_sums_their_sizes) all green.
Estimate stack so far: imap+maildir (#67) → caldav+carddav (#68) → takeout mail (#69) → EWS (this).
Stacks on #69 (merge order #67 → #68 → #69 → this).
`import --estimate` now covers an Exchange (EWS) source. A dry run already reports the per-folder counts; with `--estimate` it enumerates each folder's items with **FindItem**, which carries `item:Size`, so mail, calendar events and contacts are counted and sized straight from the enumeration — no body fetch, no writes.
The new-item count is taken against the archive with the same diff the import uses, so re-estimating a part-filled archive reports only what is left to fetch.
### Changes
- `run_dry` gains `source_id` + `want_sizes`; under `--estimate` it builds an `ItemRunCtx` with `use_syncfolderitems: false` (FindItem, not SyncFolderItems delta, so sizes are present) and pushes `email`/`calendarevent`/`contactcard` rows.
- New pure helper `items::new_count_and_bytes` — diffs the enumeration against the local rows and sums the new items' reported sizes (an item the server returned without a size still counts, it just adds no bytes). Unit-tested directly in `mock_exchange_ews.rs`.
- `estimate_available` adds `ImportExchangeEws`; help/README/fallback note updated to list exchange (EWS).
### Verification
- `cargo fmt`, `cargo clippy --all-targets -D warnings`, `cargo test --locked` (1197 lib + all integration, incl. the new `estimate_counts_new_items_and_sums_their_sizes`) all green.
Estimate stack so far: imap+maildir (#67) → caldav+carddav (#68) → takeout mail (#69) → **EWS (this)**.
jcoffey-dev
changed target branch from feat/estimate-takeout to main2026-11-12 16:42:42 +00:00
--estimate now works for an EWS source. A dry run already reports the
folder counts; with --estimate it goes one step further and enumerates
each folder's items with FindItem, which carries item:Size, so mail,
calendar events and contacts are counted and sized without fetching a
body and without writing anything.
The new count is taken against the archive with the same diff the import
uses, so a re-estimate of a part-filled archive reports only what is
left. A pure helper, new_count_and_bytes, sums the new items' reported
sizes (an item the server returned without a size still counts) and is
unit-tested directly.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Stacks on #69 (merge order #67 → #68 → #69 → this).
import --estimatenow covers an Exchange (EWS) source. A dry run already reports the per-folder counts; with--estimateit enumerates each folder's items with FindItem, which carriesitem:Size, so mail, calendar events and contacts are counted and sized straight from the enumeration — no body fetch, no writes.The new-item count is taken against the archive with the same diff the import uses, so re-estimating a part-filled archive reports only what is left to fetch.
Changes
run_drygainssource_id+want_sizes; under--estimateit builds anItemRunCtxwithuse_syncfolderitems: false(FindItem, not SyncFolderItems delta, so sizes are present) and pushesemail/calendarevent/contactcardrows.items::new_count_and_bytes— diffs the enumeration against the local rows and sums the new items' reported sizes (an item the server returned without a size still counts, it just adds no bytes). Unit-tested directly inmock_exchange_ews.rs.estimate_availableaddsImportExchangeEws; help/README/fallback note updated to list exchange (EWS).Verification
cargo fmt,cargo clippy --all-targets -D warnings,cargo test --locked(1197 lib + all integration, incl. the newestimate_counts_new_items_and_sums_their_sizes) all green.Estimate stack so far: imap+maildir (#67) → caldav+carddav (#68) → takeout mail (#69) → EWS (this).