= How to submit a software patch to Cytoscape = First of all, '''''thank you''''' for taking the time and effort to improve Cytoscape. Your efforts are greatly appreciated! If you need to ''apply'' a patch, look at this page: CytoscapePatchApplication. == Using command line tools == These instructions are modeled on those used by the [[http://apache.org|Apache Project]] which can be found [[http://httpd.apache.org/dev/patches.html|here]]. === A single file patch === ||It should be very rare that you create a single file patch because your patch should include both the functional patch and the patch to the new unit tests. You remembered to include your new unit tests, right?|| To create a simple patch for a single file, in the directory that contains the files: {{{diff -u MyClass_old.java MyClass.java > MyClass.patch}}} The {{{-u}}} flag is for the unified diff format which is the prefered diff format. Other formats will work too, but are more prone to errors. Most modern systems should have this diff option available. === A multiple file patch === To create a single patch for multiple files you will need something to diff your changes against. This means that you can diff your changed files against an existing pristine copy of the code, or against CVS. The two procedures are as follows. '''From a copy of the code:''' 1. {{{cd /my/source/dir}}} 1. {{{tar -xvzf cytoscape-src.tar.gz}}} 1. {{{cp -r cytoscape-src cytoscape-src-orig}}} 1. {{{cd cytoscape-src}}} 1. Make changes in cytoscape-src, compile, TEST, etc. 1. {{{cd /my/source/dir}}} 1. {{{diff -ru cytoscape-src-orig cytoscape-src > my_cytoscape.patch}}} '''From CVS:''' 1. {{{cvs checkout cytoscape}}} 1. Make changes in the cytoscape directory. 1. {{{cvs update}}} (make sure CVS hasn't changed while you've been working - '''this is an important step!'''). 1. Change directories to the cytoscape directory (this isn't strictly necessary, but makes it a bit easier for those applying the patches). 1. {{{cvs diff -u > my_cytoscape.patch}}} == Using Eclipse == == Submitting a patch == You can submit a patch (e.g. my_cytoscape.patch) in any of the following ways: * Post the patch to the cytoscape-discuss@googlegroups.com mailing list. * Submit the patch as part of a bug/feature in our [[http://cbio.mskcc.org/cytoscape/bugs/main_page.php|bug tracker]]. * Send the patch directly to a cytoscape [[http://cytoscape.org/people.php|developer]]. If you haven't gotten feedback on your patch, please feel free to contact us again.