IdmlMergeDriver
A real, runnable git merge driver for .idml files (see MERGE.md's "Eventual integration: a git merge driver"): merge(base, ours, theirs) mutates ours in place - exactly git's own %O %A %B contract, ours being the file to leave in whatever state should actually be used.
Every part IdmlPackage.parts lists (Spreads, Stories, MasterSpreads, Resources, ...) goes through IdmlPackageMerger, each part a normal ThreeWayMerger.merge. designmap.xml itself is handled separately and much more narrowly: it's a far richer element than "a list of part references" (its own Self, plenty of other Self-bearing children like Language resource definitions, and - confirmed by direct inspection - a leading processing instruction that `scala.xml`'s parser silently drops and `GenericElement` has no way to put back). A full 3-way merge of all of that is out of scope here; instead, `ours`'s own `designmap.xml` is left completely untouched *unless* a part was actually added or removed, in which case its exact text is surgically patched - one line inserted or removed - rather than parsed and rebuilt, so everything else about it (including that processing instruction) survives byte for byte.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
IdmlMergeDriver.type