1

Whats the preferred or best procedure to merge a google docs document, thats already been modified by another client through the Google Drive SDK?

In my case there will only be text-changes and no formatting differences.

Olof
  • 5,348
  • 4
  • 25
  • 27
  • Sorry, I am not exactly sure what you mean. If the doc has been modified, it will be automatically synchronized. Can you explain more please? – Ali Afshar Jul 03 '12 at 14:19
  • For example: Two users X and Y have access to one google docs document through my client. Both users download version A of the document. X adds a line in the end. and user Y delete the first line. Y updates the file on the server. X tries to update the file, but there is a new version on the server (Y's version). How should I update the server document so that both X and Y's changes are merged? – Olof Jul 03 '12 at 15:46
  • Thanks, I understand. I will answer. – Ali Afshar Jul 04 '12 at 00:25

1 Answers1

2

Unfortunately, you will have to handle this conflict yourself. The API does help you, by providing an ETag, which the server uses test whether the file you are updating has been changed in the Google Drive. If it has been changed, the request will fail by default.

Ali Afshar
  • 40,967
  • 12
  • 95
  • 109