How To Create Patch For Stendhal: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Kymara
No edit summary
imported>Kymara
Line 57: Line 57:


== Reading patch files ==
== Reading patch files ==
Eek, what is all this text below?

The patch file contains a section for each file that should be changed. That section starts with lines that contain the file name and path of first the old (---) and then the new (+++) version and some additional information.

Then follow sets of changes. They start with a line that contains, enclosed in @@, the line or line range from,no-of-lines in the file before (with a -) and after (with a +) the changes. After that come the lines from the file. Lines starting with a - are deleted, lines starting with a + are added. Each line modified by the patch is surrounded with 3 lines of context before and after. A chnage needs both an addition + and a deletion -.

After all the changes related to one file, comes the next file definitions (--- and +++) and the next file's changes, with the @@ and + or - as above.


{{TODO| Explain example}}
<source lang="java">
<source lang="java">
Index: src/games/stendhal/client/gui/j2d/entity/RPEntity2DView.java
Index: src/games/stendhal/client/gui/j2d/entity/RPEntity2DView.java