Created
November 6, 2012 21:02
-
-
Save f1code/4027514 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Pseudo code for SyncTarget method: | |
| sourceDigest = get_digest_from_feed(syncSource) | |
| targetDigest = GetDigest() | |
| for each entry in syncSource: | |
| gcon = retrieve_contact_from_google (entry) | |
| if gcon == null: | |
| create_google_contact(entry) | |
| else: | |
| if gcon.etag == entry.etag or conflict_win(sourceDigest, targetDigest, gcon, entry): | |
| update_google_contact(gcon, entry) | |
| else: | |
| store_conflict_diagnosis(entry) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment