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 committed 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 submenu Modify of the contextual menu of the Working Copy view: . This opens the Create patch dialog.
The first section in the dialog shows the start state of the diff, and it can be:
The HEAD revision from the repository
The working copy - the current files from your working copy
A revision number. If you do not know it, you can press the History button and see the history log for the root of the patch, including the commit messages.
The second section shows the end state of the diff, and it can be:
An URL from the repository, indicating a tag or a branch.
The HEAD revision from the repository
A revision number.
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.