My typical workflow is like:
- Check the codes from the trunk to my Windows desktop.
- Make some corrections (but do not commit the SVN) and patch these changes using the Tortoise SVN Create Patch.
- SSH log in to the remote Linux server and download the patch. The linux server also has an extracted HEAD channel.
- Apply the patch on Linux Server, for example:
[ work@remoteLinuxBox : ~ / work] patch -p0 -i ~ / work / fix.patch
(Stripping trailing CRs from patch.)
patching file src / java / main / myApp / view / action / test / launch / GetPeekAction.java
Hunk # 1 FAILED at 385.
1 out of 1 hunk FAILED - saving rejects to file src / java / main / myApp / view / action / test / launch / GetPeekAction.java.rej
(Stripping trailing CRs from patch.)
patching file src / java / main / myApp / view / action / test / GetAllCustomerAction.java
Hunk # 1 FAILED at 76.
1 out of 1 hunk FAILED - saving rejects to file src / java / main / myApp / view / action / test / GetAllCustomerAction.java.rej
(Stripping trailing CRs from patch.)
But I always had such mistakes. I thought this was because the end of the line was different from windows and Linux, so I converted the patch using dos2unix, the warning like (Removing closing CR packages from the patch) disappeared, but the fix still failed.
There is one strange behavior: if the modification for the file occurs only on the existing line, using the patch will work. But if new lines appear, the patch will not be executed.
Does anyone know how to solve this? Many thanks
source share