The version I tested is 2.5.9. However, you only need to use a few parameters:
Patch.exe-D work_dir-I patch_file-P 0-l-N
Work_dir directory to be patched
Patch_file patch file
-P 0 directly uses the directory in the patch file without any deletions
-L ignore Spaces
-N: ignore or not apply patches.
1> both work_dir and patch_file use absolute paths.
2> because all my patch files are made using Windows tortoise SVN shell, which contains path information
With the combination of-D and-P 0, you can directly hit each file. Because-D indicates that you must first enter this directory.
3>-N: If files controlled by SVN are well processed and files that have been patched are repeated, no errors will occur.
The controlled file will be typed again.
4> If the following error is reported, the line breaks in the patch file are messy, including CR/LF and LF.
Assertion failed: hunk, file ../patch-2.5.9-src/patch. C, line 354
No way, you can only unify the patch file into one style.
After I unified them into a Windows style, a miracle occurred:
It turns out to be a full-text Unix-style line break file. After being patched, all files become windows-style. The reason is that the patch file contains several windows-style patches. Patch makes all the remaining line breaks in the file the same as the patch. Powerful.