"Apply Patch" carries the changes of a patch over to an application. It is under "Application" and "Version Control". A patch is applied as follows: - Choose "Apply Patch". The window "Apply Patch" opens. - On the tab "File" choose "Select" and open the patch file; or paste the content of a patch on the tab "Edit Patch". - Choose the target application in "Application". - Choose "Continue processing". The patch is tried against the application without changing it, and a window lists every change of the patch. - Select a row of the list to see under "Details" what it changes. A green icon marks a change that applies exactly, a question mark one that applies after a close match of the text, and a red icon one that cannot be applied, with the reason. - Choose "Continue processing" to apply the changes, or "Cancel" to stop. When any change cannot be applied, the patch cannot be applied as a whole. ## How the Changes Are Matched Every object in the patch is found in the target application by its [[Invantive Studio/Repository/Concepts/Natural Key|natural key]]. A change fails when the object to change or delete does not exist, when an object to insert exists already, or when the text to change differs too much from what the patch expects. A change of a text is applied to the part of the text that matches, so a patch also applies to an application whose texts differ slightly from the version it was made from. The changes are saved object by object. Apply a patch to a version of the application of which a copy exists, so that a partial result can be undone.