Tuesday, January 3, 2012

Generating diff files

To generate diff between two files the command is:
diff -ru originalfile modifiedfile >patch.diff
diff -ru script.orig.js script.js >bugfix-1234.diff
If you are using IDEs like Eclipse with SVN plugins, then to generate a diff file, right-click on the file and choose Team -> Create Patch -> Save in File System (browse to the directory of your choice and give the file a name, say patch.diff) and click next. Choose Selection and click Finish.