Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
920 changes: 913 additions & 7 deletions api/openapi.yaml

Large diffs are not rendered by default.

13 changes: 11 additions & 2 deletions cmd/msgvault/cmd/create_subset.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,13 @@ func runCreateSubset(cmd *cobra.Command, args []string) error {
"WARNING: --include-profiles copies every included person's current and historical structured profile values, media, contact observations, relationships, and provenance metadata, plus their employment history and the referenced organizations' profiles, contacts, and media.")
}
if subsetIncludeVCardResources {
fmt.Fprintln(os.Stderr,
"WARNING: --include-vcard-resources copies every included person's complete native vCard bodies and their retired-UID aliases. A body is copied whole and stays opaque, so it may carry custom properties and RELATED entries naming people outside the subset.")
warning := "WARNING: --include-vcard-resources copies every included person's complete native vCard bodies and retired-UID aliases. A body is copied whole and stays opaque, so it may carry custom properties and RELATED entries naming people outside the subset."
if subsetIncludeAttributes {
warning += " Complete merge packets are also copied when their dependency closure is present; packets retain immutable merge-time values even after later redaction."
} else {
warning += " Merge packets require --include-attributes and will be reported as omitted."
}
fmt.Fprintln(os.Stderr, warning)
}

result, err := store.CopySubsetWithOptions(srcDBPath, dstDir, subsetRows,
Expand All @@ -144,6 +149,10 @@ func runCreateSubset(cmd *cobra.Command, args []string) error {
fmt.Printf("Organizations: %d\n", result.Organizations)
fmt.Printf("Employments: %d\n", result.Employments)
}
if result.PersonMergePackets > 0 || result.OmittedPersonMergePackets > 0 {
fmt.Printf("Merge packets: %d copied, %d omitted\n",
result.PersonMergePackets, result.OmittedPersonMergePackets)
}
fmt.Printf("Database size: %s\n", formatSize(result.DBSize))

if int64(subsetRows) > result.Messages {
Expand Down
2 changes: 2 additions & 0 deletions cmd/msgvault/cmd/create_subset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ func TestCreateSubsetVCardResourcesRequireFlag(t *testing.T) {
})
assert.Contains(resourcesStderr, "WARNING: --include-vcard-resources",
"the opt-in must state what it exposes before copying it")
assert.Contains(resourcesStderr,
"Merge packets require --include-attributes and will be reported as omitted.")
resources := openSubset(subsetOutput)
copied, err := resources.GetVCardResourceEnvelopeContext(
ctx, "address-book", "source-bob")
Expand Down
Loading