git backend: actually update local cache from remote

Dirk Hohndel dirk at hohndel.org
Thu Jun 11 09:03:59 PDT 2015


On Thu, Jun 11, 2015 at 05:29:58PM +0200, Davide DB wrote:
> On Thu, Jun 11, 2015 at 3:23 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> >
> > Subsurface preference asks you "automatic or manual sync to cloud".
> > If you are in manual mode, you have to manually start a "sync to cloud"
> > from the menu.
> >
> > If you are in automatic mode, Subsurface acts like this:
> > - if there is network connectivity, it displays a spinner and prevents
> >   modifications in the UI when opening or saving the data file
> > - if there is no network connectivity, it displays a message somewhere
> >   that cloud sync is currently not available
> 
> If I understood well the whole process when working with a remote repository.
> 
> I save my edit in the local repository via normal Ctrl+S hence local
> repository is updated but the remote could not.
> On the other hand I could have my edit not saved in local repository
> (still in application memory)  but local repo is in sync with the
> remote one.

So any "sync" is a two step process. FIRST we save to the local cache.
THEN we sync.

The situation that I want to avoid is this one:

You load the local cache.
You start making modification.
The local cache updates from the remote.
Now you have two sets of changes, the ones made in Subsurface and the ones
that got synced from the remote to the local cache. Sure, we could try to
merge this. I'd rather not have to go there.

> I could imagine using a classic star sign after the logbook name to
> signal if it's modified or not. I mena the logbook name on the window
> titlebar
> johndoe-logbook.xml (saved)
> johndoe-logbook.xml* (non saved)

Oh that's something we should add either way. This could simply reflect
the "dive_list_changed" state :-)

> Then we could have a small round dot like a led (green/red) on the
> window right upper side to signal if the local repo is in sync with
> remote repository.

That I'm not so sure about. I'd rather have a symbol that reflects whether
we have determined that we are connected or not...

> We have a small space used from main menu between title bar and profile graph.

I believe the empty space above the profile is actually part of the menu
bar... but we might be able to cheat somehow and add status there...

/D


More information about the subsurface mailing list