dive site handling issue

Dirk Hohndel dirk at hohndel.org
Sat Aug 29 07:47:45 PDT 2015


Tomaz,

you mentioned this to me a couple of times on IRC but I still can't figure
out how to reproduce / what the issue is.

Something about having multiple dives in a V2 XML files with the same
location and Subsurface creating mutiple identical divessites when loading
this file. I tried to reproduce this with a very simple example and when I
save it back out from Subsurface it seems like we did the right thing...

V2 file with two dives with the same location

<divelog program='subsurface' version='2'>
<dives>
<dive number='1' date='2014-03-15' time='21:44:06' duration='52:20 min'>
  <location>At Home</location>
  <notes>First dive with this location</notes>
  <divecomputer model='manually added dive'>
  <depth max='15.0 m' mean='9.908 m' />
  </divecomputer>
</dive>
<dive number='2' date='2014-03-16' time='21:44:06' duration='52:20 min'>
  <location>At Home</location>
  <notes>Second dive with this location</notes>
  <divecomputer model='manually added dive'>
  <depth max='15.0 m' mean='9.908 m' />
  </divecomputer>
</dive>
</dives>
</divelog>

after loading with Subsurface and writing it back out I get

<divelog program='subsurface' version='3'>
<settings>
</settings>
<divesites>
<site uuid='1f76443f' name='At Home'/>
</divesites>
<dives>
<dive number='1' divesiteid='1f76443f' date='2014-03-15' time='21:44:06' duration='52:20 min'>
  <notes>First dive with this location</notes>
  <divecomputer model='manually added dive'>
  <depth max='15.0 m' mean='9.908 m' />
  </divecomputer>
</dive>
<dive number='2' divesiteid='1f76443f' date='2014-03-16' time='21:44:06' duration='52:20 min'>
  <notes>Second dive with this location</notes>
  <divecomputer model='manually added dive'>
  <depth max='15.0 m' mean='9.908 m' />
  </divecomputer>
</dive>
</dives>
</divelog>

Which seems reasonable and correct.

Can you create an equally simple input file that demostrates the bug that
you are talking about?

/D


More information about the subsurface mailing list