I am trying to make a patch with multiple files in different directories. I don't want to include all my uncommitted files as I have a lot not applicable to the patch.
I know of this command to create a patch with a specific file, only issue is this is one file:
svn diff -up original.php > filename.patch
Is there any way to do this with multiple files in different directories ?
Thanks
Creating a Patch File First you need to make and test your changes. Then instead of using TortoiseSVN → Commit... on the parent folder, you select TortoiseSVN → Create Patch... you can now select the files you want included in the patch, just as you would with a full commit.
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.
The svn diff command reveals the differences between your working copy and the copy in the master SVN repository.
patch is a command that takes the output from the diff and puts it into a file. Then, it can take the filed output and overwrite another file with with the changes. For example, a common use is to use the patch to transfer changes from the changed file to the original file, thus making them identical.
You can try used: svn diff -r BEGIN_REVISION:END_REVISION > patch_file.patch
This will make the patch on all modified files.
If you want create patch for concrete files, you can enumerate them before >
.
svn diff dir_name_1/first.php dir_name_2/second.php > patch_file.patch
For one directory:
svn diff -uRp dir_name > patch_file.patch
I'll hope it helps you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With