Making a Patch File

Often you might have read access to a CVS repository or module, but not write access. Open source projects typically work this way to maintain quality control for all contributions to a project. The easiest and most reliable way to contribute changes to these projects is by creating a Patch File to submit to them.

In TortoiseCVS this is done by selecting the folders with changes that you wish to include in the patch file. Right-click on your selections and choose CVS → Make Patch... from the context menu. TortoiseCVS determines which files have been modified and lists them in the Make Patch dialog:

Figure 3.10. Make Patch Dialog

Make Patch Dialog

If you want to exclude some files from your patch, simply deselect them in the dialog.

Sometimes your contribution involves adding new files which are not yet in CVS. TortoiseCVS cannot guess that you would like these to be included in the patch, but in the Make Patch dialog you can click the Add files... button to bring up the familiar Add dialog. Here you can select files to be included in the patch.

When you are satisfied with your selection, click OK. You will then be prompted with a Save dialog to indicate where to save your patch file. Finally, TortoiseCVS will open the new patch file in Notepad, where you can validate your changes.