What we would like is for you to take the code (that works great BTW) from the last project and add to it.
Given that we pass in a document ID, and some notes for the 'Change Log', and a file that has been uploaded, can you please show us how to create a revision of a given document. We do know the document ID, not the file name, but the unique ID for the document that Sugar generated internally when the document was first updated. In the case of a document that is not the original document, we do not know what happens, if we can look it up by the original document ID, or the ID of the revised document. We are hoping you can tell us in the code.
The user won't know the revision number, so please look up the most recent revision number and increase by 1.