Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
none
none
diff -u Main.java.orig Main.java >> patchfile.txt

or, if you're working against the code base checked out from the Subversion repository (this is the best way to work), then just use the svn diff command in the Subversion client.

Code Block
none
none
svn diff Main.java >> patchfile.txt
Info
titleMake Sure to Include All New Files in Your Patch

If you're trying to include new files in your patch, make sure to do a svn add of those files before doing the diff. This will schedule the files for addition to the Subversion repository. Even if you don't have committer privileges you can do this. It will allow you to create a diff file that includes any new files you're contributing.

Tip
titleA Tip For Creating Patches

When creating a patch, making sure the patch filename ends in .txt will allow it to be easily viewed in a browser when it is attached to a JIRA issue.

...