IMPORTANT information about current master: dive site management

Dirk Hohndel dirk at hohndel.org
Sat Feb 14 00:13:39 PST 2015


I just pushed this to master. 50 commits from me and 8 from Tomaz for the
initial UI.

THIS WILL MAKE POTENTIALLY IRREVERSIBLE CHANGES TO YOUR XML FILE
This is 100% certain to contain bugs.
This may eat your cat.

I hate html emails or I would make this red and blinking...

So when playing with the latest master, please be careful. I have added a
commit that should make sane backups of old XML file (creating .xml.v2 or
.ssrf.v2 backup files that aren't overwritten by the next backup) so that
you can go back - but if I were you I wouldn't rely on that.

Of course if you are using the git backend you can always go back to
earlier versions - or if you are keeping your XML files in git :-)

So what does this do:

- it removes location, latitude and longitude from the struct dive and
  replaces them with a dive_site_uuid.
- it uses the struct dive_site to hold that information plus some more (a
  description - that's shared with web sites (not yet implemented) plus
  local notes).
- it converts XML files and git storage on the fly. Since this is a change
  that is not compatible with older versions of Subsurface I increased the
  file format version to 3 - Subsurface now ONLY stores in the new format.
- I have done quite a bit of testing and it should do The Right Thing(tm)
  when converting. So it should catch identical dive sites and create them
  just once with multiple links to them. This process creates TONS of
  debug output - the idea is that while this is rather annoying it should
  help us track down what's going on if (whom are we kidding, when) you
  find bugs.
- I have tried to hook up basic editing for dive sites as well:
  -- you can edit name, description and notes and the name is reflected as
     the "location" for the dive
  -- when you double click on the globe the coordinates of the current
     dive site are changed and you are dropped into that UI
  -- accept and reject of changes to dive sites should work
- we try hard not to store dummy dive sites (so if they are empty they get
  deleted and no divesiteid gets stored with the dive
- I have also hooked up on the fly imports for the other divelog formats
  that we support, but this is COMPLETELY UNTESTED. And given how many
  bugs I had in the on the fly changes to our XML and git formats, I would
  urget people to please test those imports.
- imports of GPS data from the Subsurface webservice should work (but I
  ran out of time, wanting to push this tonight - so this also needs more
  testing).
- filtering for dive sites should work, this has received some mild
  testing.

What's missing:
- I haven't looked at all at XSLT.
- I haven't looked at the divelogs.de integraion.
- there's a ton more work needed on the UI; I asked Tomaz to stop while I
  whack the infrastructure in place, so I think he'll do this in the next
  few days. For example, the profile that is now shown (how silly is that)
  should be replaced with a site picture (oops, forgot to include
  infrastructure for that) and pictures taken at this site (extracted from
  the dives); the dive list should only show dives at that site.
- integration with divesite databases and websites is missing, as is a
  clever UI to do so. This will need more thinking.

Why did I push this now? This needs feedback, this needs testing. I
considered keeping it in a branch but in the past this never worked to get
enough testing.

At least for tonight I'm not making daily builds to prevent people who
haven't read this long email from playing with the new code. I know that
some of you can't build from source and need binaries to test this. I
will make those in a day or two once I'm more confident that there aren't
any catastrophic bugs that will eat your cat hidden in here.

Anyway, please play with this. Please provide feedback. Please Test, Test,
Test.

Thanks

/D

PS: once again didn't manage to get don before midnight. Dang.


More information about the subsurface mailing list