RFI: Git export of CCR dives

Dirk Hohndel dirk at hohndel.org
Thu Nov 20 08:48:14 PST 2014


On Thu, Nov 20, 2014 at 06:12:22PM +0200, Willem Ferguson wrote:
> I have been modifying the code in save-git.c to be comparable to that in
> save-xml.c.  A few issues arise:
> 
> 1) After these modifications are finalised I need someone to test the code
> since the git interface is not public.

Well, we don't document it, but you can easily use it.

Go to a directory (I'd create a new one for this) and create a git
repository in it

git init

Let's say you are using ~/scuba/dives for this

Now in Subsurface, do "save as" and as filename select

~/scuba/dives[willem]

This will create the git store as a branch named "willem". You can look at
what was stored in this directory by doing

git show

You can even check it out and see the file hierachie. If you are brave,
you can even chenge the files, create your own commits and have them
reflected in Subsurface. That's how I fixed some oddities that happened in
my dives over time based on constantly using development versions.

> 2) Cylinder pressures in storing samples: the git format does not require
> "pressure=178bar" as in xml, it only uses "178bar" as part of the sample
> data. With the addition of diluent cylinder pressures, the situation is a
> bit more complex. At the moment I changed the git code to use a
> "pressure=178bar" and "o2pressure=145bar" in the sample record, in line with
> the current state of the xml export as well as the structure of the sample
> records. But this breaks the backwards compatibility of the code.
> Ideas would be appreciated.

So why would you add the 'pressure=' part. Simply keep that as is and ADD
o2pressure=145bar and you should be fine

/D


More information about the subsurface mailing list