Patch is text file which contains only differences you did to code, so it will contain changed and new lines as well as removed all in one bulk text file (*.diff or *.patch).
Why to use it?
There could be few cases when you would need patch. Next are three that I see:
1. For example it is possible that you do not have write access in SVN in case if you are contributor to some open source project. So you can send you changes as patch to those who have rights.
2. Another case could be when you lost your connection on one machine but want to port your changes to another machine easily and then commit them. (I faced with this one).
3. One another interesting usage could be establishing code reviews via patches. It could be that you have command that works remotely, and to ensure that we commit only good code your code reviewer would like to have your changes on his machine quickly and easily. Of course it it ugly to sent him all files you have changed and with screenshots of differences.
Create patch
You just need to be sure that you have latest code, that your changes are done and after that just right click on folder on which you want to create patch with selecting “Create patch…” like above. This will take you to dialog where you select files you want to include into your patch and then will take to save file dialog. So you could get file like validationRules_CodeReview.patch.
Apply patch
Applying patch is also very easy, just pick up “Apply patch…” from the context menu of TortoiseSVN of folder needed (should be same folder as patch was created). After you selected patch file you will get two windows – one is TortoiseMerge on background and another is File patches. File patches window is list of files to patch. Double click on file from list opens differences in background window, so you could review them. And to apply you just need right click and select “Patch all” or “Patch selected“.
This website uses cookies. We'll assume you're ok with this, but you can opt-out if you wish.AcceptRead More
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
code
more code
~~~~