A patch is a text file that contains the differences between one or more pairs of different files. A number of open source programs, including UNIX diff, Subversion, and CVS, as well as commercial applications, including DeltaWalker, are capable of producing patches. The process of updating a file with the differences from a patch file is known as applying a patch or patching. While patches originated in the programming world and are particularly suitable for updating source files to newer versions, they have been successfully applied to any text files.
Use the following options to control the patch creation process:
Patch Format |
|
# lines of context | Use this spin edit control to specify the number of context lines i.e. the lines before and after a difference. This option is available only for the Context and the Unified patch formats. The default value is three, however it can be set to any number, including zero. For a context or a unified patch to be applied reliably, a min number of three is recommended. |
Encoding |
Use this combo box to set the character encoding of the patch file. Most always the character encodings of the first and the second files will be the same; in rare the case they are different you will most likely need to select the same encoding as the one used by the destination file. |
Delimiter | Use this combo box to choose the line delimiter of the patch file. As with character encoding, if you need to explicitly select a line delimiter here, it should likely be the same as the delimiter of the destination file. |
Creating a patch is an operation meaningful only in the context of two files and their relationship with each other, i.e. in two-way comparison; therefore the command is unavailable in three-way comparison.
Menu | File > Create Patch... |
Keyboard Shortcut | Alt+F, T |