linux - Change filename in the patch OR Editing patch such a way that patch remains valid -


Can we edit the patch in such a way that it is valid even after editing?

We have a patch that applies to a source tree, now to support the other platforms which we copy and replace the configuration files, some patches will be identical, but in this New file name should be. In this situation, is there any way to edit patch and keep patch valid? Yes, patch files are text files and can be edited with care if done manually.

The file names are in the Hunk header:

  --- a / filename description +++ b / filename description @@ - X1, L1 + X2, L2 @@   

Description (modified date, usually) is ignored, and a b / b is the dummy directories to make b / b , happy to think that the original file is different from the modified one (this is the patch -p1 in 1).

Numbers are X1 , X2 are the original and modified line numbers where the hunk starts. L1 and L2 numbers are chuck's original and modified anchor.

And it's all! Just change the file name to both +++ and --- lines and everything works fine.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -