old tags lost

Thomas 'Mike' Michlmayr mike at cluon.priv.at
Fri Dec 13 10:35:56 UTC 2013

On Fri, Dec 13, 2013 at 07:10:24 -0800,
Dirk Hohndel <dirk at hohndel.org> wrote:
> If you have a good idea of how this should work and how a non-technical
> (and I mean seriously non-technical) user would interact with it, I'd be
> interested to hear that.

i'd make the user "not" interact with it. i'd change around what gets
done behind the scene when the user interacts with the app as usual.

my VCS experience is limited to RCS and a bit of SVN, so i'll try to
explain it in my understanding of SVN.

on first startup, make sure you have a (local) repository with an empty
data file in it. when the user starts editing dives, flush the file to
the repository at strategic places in the code.
when the user saves (using cmd/ctrl-s), flush the file to disk and commit
the changes.

when the user quits the app, if there are uncommitted changes, ask him
if he wants to save (commit) or not (rollback).

if the app crashes, you can have three possible states:
   * a corrupt file: revert to head from the repository
   * a clean file: no action required
   * a file with uncommited changes: ask the user if we wants to start
	from last known good state (head) or last state before crashing

i have no idea how to change all of this to git terms (i'd not use anything
else today). and if the user has access to a remote git repository, we can
allow him to specify this and give him a menu option to push out the changes.

all of this is 100% transparent to the user, allows hackers to use all git
magic on the local repo, and would give more crash resilience and protection
from (stupid) changes.

there are some additional complexities: subsurface currently supports
multiple data files, but i think this could easily done within the same
repository. the only thing that would no longer be permitted is to move
files around outside of subsurface's control. on mac that's easy, store
it in ~/Library. on linux in .subsurface. on windows it would be in the
profile somewhere where there's normally no fs access.

but maybe i'm totally underestimating the complexities.

Thomas 'Mike' Michlmayr  | ignorami: n: The BOFH art of folding problem 
<mike+sig at cluon.priv.at> |           lusers into representational shapes.

More information about the subsurface mailing list