5.10.  Variant Update

The Variant Update allows to merge custom changes made in a variant with a newly transformed version of that variant. Sometimes changes for a specific product need to be done after a variant was transformed. When the variant gets transformed again these changes need to be merged in order to keep both pieces of information. To do this, certain information have to be gathered in order to keep track of who made changes where, and what needs to be merged back into the newly generated variant assets. For that purpose, pure::variants stores each transformation output in an internal repository.

With this information pure::variants is able to update changes to the latest transformation, as well as to the current customer-specific variant, by using a three-way compare. The graphic below shows this process.

Figure 5.9. General Update functionality

General Update functionality


Depending on the tool, our connector either supports a file based update or a tool specific approach.

If you activate the update functionality in your transformation module (see the section called “Transformation Configuration Page” ), three folders will be generated into your output folder.


Working copy (work) : a variant created by the transformation that may be edited by the user.

Latest: a variant created by the transformation, which reflects the latest state of the product line.

Ancestor : a variant created by the transformation, which is the common ancestor of both working copy and latest reference.

After all changes have been done and the new version of the variant is generated from the product line, you can merge these changes into your local working copy as follows: Open the context menu of the variant folder you want to update. In the refactor section of the menu, you will find Variant Update , where Merge Variant ... is located. A three-way compare opens, showing the differences between the files of the respective subfolders, where you can choose which part to keep and which to take over from the product line.

When all changes are applied and saved, you can mark the variant as merged, via Update Variant -> Mark Variant as Merged . This will set the "latest" folder as new ancestor and the project is prepared for the next version of the product line to be transformed, so the process can continue.