Patch Files
Beyond Compare allows you to generate a Unix-style patch file of content differences. Once you have a patch file, you can distribute it and use either Beyond Compare or a patch utility to update the original file with the changes.
Generating a patch file in Beyond Compare
BC version 3 or later
- In the Text Compare, select Session > Text Compare Report.
- In the Report Layout list, pick Patch and change the Patch Style to Normal diff.
- In the Output Options, pick Plain text and click Save As to generate the file.
BC version 2
- In the File Viewer, select File > File Differences Report.
- In the Report Layout list, pick Patch and change the Patch Style to Normal diff.
- In the Output Options, pick Plain Text and click Save As to generate the report.
Generating a patch for multiple files in Beyond Compare
BC version 3 or later
- In the Folder Compare, select Edit > Expand All.
- Edit > Select All Files.
- Actions > File Compare Report.
- In the Report Layout list, pick Patch and change the Patch Style to Normal diff.
- In the Output Options, pick Plain text and click Save As to generate the file.
BC version 2
- In the Folder Compare, select View > Expand All.
- Edit > Select All Files.
- Actions > File Differences Report.
- In the Report Layout list, pick Patch and change the Patch Style to Normal diff.
- In the Output Options, pick Plain Text and click Save As to generate the report.
Applying the patch
You can use a patch utility to apply changes to the original file:
patch <original file> <patch file>
Or, you can use Beyond Compare (version 4 or later):
- Select Tools > View Patch and select a .diff or .patch file to view.
- In the Text Patch, select File > Apply Patch and select the original file.
Beyond Compare's Apply Patch command only supports single file patches. Applying a multifile (folder) patch is not supported.
Tools and More Information
The GNU Win32 port of Patch:
gnuwin32.sourceforge.net/packages/patch.htm
More information on using Patch:
Introduction: Using Diff and Patch > Linux Academy