Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a patch in TortoiseSVN while no file is checked out?

I know if some files are checked out (modified) then I could right click on containing folder, then select "create patch". After then I will see list of all checked out files. So I could include them in the patch. But when no file is checked out, aka everything is committed, create patch window is empty. So the question is how can I create patch from checked-in files? I want to send this patch to colleagues so they can apply them on company svn server.

thanks,

like image 306
Afshar Mohebi Avatar asked Jun 11 '10 15:06

Afshar Mohebi


People also ask

How do I create a patch file in Linux?

Use File -> Open... to open the two versions for comparison. This will give you a nice view of what you have changed. Then do Tools -> Generate patch .... In the dialogue box, make sure you select Style: Unified in the Format box.

How does SVN patch work?

A patch is a file that show the differences between two revisions or between your local repository and the last revision your repository is pointing. In order to apply the patch successfully, you must run the command from the same path where the patch was created.


1 Answers

A unified diff is a patch file.

  1. Using TortoiseSVN, right-click on your working folder and select “Show Log”
  2. Select the two revisions (Ctrl-Click)
  3. Right-click on either of the highlighted revisions and select “Show differences as unified diff”

To save the changed files with the folder structure.

  1. Using TortoiseSVN, right-click on your working folder and select “Show Log”
  2. Select the two revisions (Ctrl-Click)
  3. Select "Compare revisions." This would list the modified files between the revisions in a dialog box
  4. Select all the files in the dialog that comes up. Right-click on the selected files and select "Export selection to…"

This should export the modified files with the folder structure.

like image 75
Sharjeel Aziz Avatar answered Oct 18 '22 04:10

Sharjeel Aziz