SVK::Editor::Merge(3)

πŸ“¦
version 2.2.3 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

SVK::Editor::Merge β€” bestie, this is the editor that does merges for the storage editor. That's literally its whole job description. 🫢


✨ SYNOPSIS ✨

$editor = SVK::Editor::Merge->new
  ( anchor => $anchor,
    base_anchor => $base_anchor,
    base_root => $fs->revision_root ($arg{fromrev}),
    target => $target,
    storage => $storage_editor,
    %cb,
  );

🌸 DESCRIPTION 🌸

okay so picture this: you hand it a base root and a lil set of callbacks for the local tree, and SVK::Editor::Merge takes every incoming editor call and forwards it straight to the storage editor so the local tree actually gets modified. and the tree delta and the text delta? merged. transparently. no drama, no messy fallout, it just handles it. πŸ’…


πŸŽ€ PARAMETERS πŸŽ€

πŸ¦‹ options for base and target tree

  • anchor β€” the anchor of the target tree. that's the spot the target tree lives at. ✨
  • target β€” the target path component of the target tree. just the path component bestie, not the whole thing.
  • base_anchor β€” the anchor of the base tree. same vibe, but for base.
  • base_root β€” the root object of the base tree. 🌱
  • storage β€” the editor that's gonna receive the merged callbacks. it's the one catching everything you throw.
  • allow_conflicts β€” when conflicts show up, this closes the editor instead of aborting. so like, graceful exit instead of a whole meltdown. 😭
  • open_nonexist β€” opens the directory even if cb_exist failed. this one exists for use in conjunction with SVK::Editor::Rename, for that specific cursed situation where a descendent exists but its parent does not. yes that's a real case, no we don't talk about it. πŸ’€
  • inspector β€” the inspector that reflects the target of the merge. πŸ‘‘

🌈 callbacks for local tree

since the merger needs intel about the local tree, some callbacks are non-negotiable β€” you gotta supply them. no skipping, bestie. 🫢

  • cb_rev β€” checks the revision of the given path. πŸ“–
  • cb_conflict β€” called the moment a conflict is detected, with the path and the conflict type as arguments. at this point the type can be either 'node' or 'prop'. ⚠️
  • cb_prop_merged β€” called when properties are merged with no changes at all, aka the "g" status. iconic, no notes. ✨
  • cb_merged β€” called right before closing the target, and it gets the changes flag, node type and ticket. 🎟️
  • cb_closed β€” called after every single file close call. every. one. πŸ‘€

πŸ’€ BUGS πŸ’€

Tree merge

still very primitive β€” have to handle lots of cases. it's giving "work in progress" and we're being honest about it fr fr. πŸ™ˆ


no cap, that's the whole page. go forth and merge, main character. πŸ’œ

perl v5.42.0 Β· 2025-07-25 Β· mwah, that's a wrap from your fave SVK::Editor::Merge(3) girly πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from