Create Patches

Let's suppose you are working to a set of XML files, that you distribute to other people. From time to time you are tagging the project and distribute the releases. If you continue working for a period correcting problems, you may find yourself in the situations to notify your users that you have corrected a problem. In this case you may prefer to distribute them a patch, a collection of differences that applied over the last distribution would correct the problem.

Creating patches in Subversion implies the access to two states (revisions) of your project. If you have not commited yet your current working copy and prefer not to do it, it is possible to create a patch between the current working copy and a revision from the repository.

In order to create the patch, you will use the action from the contextual menu: Create Patch. This opens the Create patch dialog.

 

Figure 14.29. The Create Patch Dialog

The Create Patch Dialog

The first section in the dialog shows the start state of the diff, and it can be:

The second section shows the end state of the diff, and it can be:

The target panel of the dialog reminds you the location of the target resource from the working copy on which the patch will be created and its corresponding repository URL.

The output section lets you choose the patch file that will store the differences.