[tomboy-list] Sync and local note deletion (again)

Rodja Trappe mail at rodja.net
Sat Jun 26 00:22:07 PDT 2010


Hi,

my name is Rodja Trappe from Berlin, Germany. I've began to write some
code to enable two-way-sync in Tomboys Android client "Tomdroid".

On Mon, 2010-06-07 at 07:05 -0700, Sandy Armstrong wrote:
> [...] We actually look at the revision for each note
> when syncing.  For example:
> 
>  else if (client.GetRevision (note) <= client.LastSynchronizedRevision &&
>           note.MetadataChangeDate > client.LastSyncDate) {
>               note.Save ();
>               newOrModifiedNotes.Add (note);
>               if (syncUI != null)
>                    syncUI.NoteSynchronized (note.Title, NoteSyncType.UploadModified);
>               }
> 
> We are uploading modifications after downloading from the server, so
> this is the mechanism used to differentiate between a recently
> modified note that needs to be uploaded, and one that was just
> downloaded. [...]

After reading this thread, I decided to use "per note revisions" as
Tomboy does. While hacking I came up with the following observations:

1. the revision stored per note is simply the server revision at which
this note has been last modified
2. the note revisions are changed locally when loading updates from
server and after successful uploading local changes
3. in the code above notes are only uploaded if the note-revision is
smaller or equal to the last-synced-reversion of the server

How can it be possible to have a greater per-note-revision than the last
one received from the server? Am I missing some facts?

Regards,

                Rodja
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://lists.beatniksoftware.com/pipermail/tomboy-list-beatniksoftware.com/attachments/20100626/e267142f/attachment.pgp>


More information about the Tomboy-list mailing list