<div dir="ltr">Thank you very much for your "warp speed" fix of the merge issue.<div><br></div><div>I will wait for the patched AppImage or binary distributions for Fedora and Ubuntu; I will also try once again to build subsurface from sources. At present i did no succeed in doing so in Fedora 24 and Ubuntu trusty. I hope next week to be able to try once again on a xenial laptop.</div><div><br></div><div>Since the irda interface is working in Ubuntu trusty I am going to maintain it in dual boot, together with xenial. I could even try to set up a trusty Virtual Machine only for the irda interface, even if I am not 100% sure that the trusty VM is able to use the USB-IR adapter. The WXP VM  succeeds in connecting the USB-IR adapter; I am relying on it since many years for running SmartTrak and SkyDemon, a flight planning application for Windows, Android and IOS.</div><div>I am afraid I will not be able to get rid of it in the next future.</div><div><br></div><div>Best regards.</div><div><br></div><div>Alessandro</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 19, 2017 at 10:29 PM, Linus Torvalds <span dir="ltr"><<a href="mailto:torvalds@linux-foundation.org" target="_blank">torvalds@linux-foundation.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, Feb 18, 2017 at 3:58 PM, Alessandro Volpi <<a href="mailto:volpial@gmail.com">volpial@gmail.com</a>> wrote:<br>
><br>
> I ran subsurface once again, opening file first_482_2.xml and importing file<br>
> complete_2.xml over it. The patched program DID NOT CRASH as the merge<br>
> operation was performed. THIS IS GOOD NEWS, albeit not unexpected. The<br>
> resulting log is file complete_3.xml .<br>
><br>
> I compared files complete_2.xml and complete_3.xml :<br>
><br>
> In my opinion there is still something to be fixed in the merge procedure.<br>
> Files complete_2 and complete_3 should be identical, since I would expect<br>
> the merge operation to ignore the content of existing dives fro #15 to #482<br>
> and simply to add the deleted dives once again.<br>
<br>
Right you are.<br>
<br>
You found real bugs (although perhaps not all that fatal this time).<br>
<br>
> Looking into file diff_2_3 I have observed the following two unexpected<br>
> behaviors:<br>
><br>
> The records related to dive site description have been DUPLICATED<br>
<br>
Yes. I absolutely detest our broken dive site handling. It's stupid<br>
and wrong, and I still think we did so much better before when we<br>
didn't have dive sites at all, just plain location descriptions and<br>
gps.<br>
<br>
And it looks like the dive site handling also does XML reading<br>
completely wrong, resulting in just duplicated UUID's, which makes the<br>
whole concept of a uuid entirely pointless.<br>
<br>
I tried to fix it up, but I would almost prefer to just rip out that<br>
garbage entirely. Nobody ever wrote the actual code to make the dive<br>
site management _useful_, and it's only been problematic.<br>
<br>
Oh well.<br>
<br>
> A large number of strings like <divetemperature air='0.0 C' water='20.0 C'/><br>
> has been replaced with <divetemperature air='0.0 C'/><br>
<br>
Ok, the 0.0C thing is obviously some bug in some importer or<br>
libdivecomputer that *should* have been "no temperature" and turned<br>
into "0.0C" instead.  Oh well. 0C is actually a perfectly valid<br>
temperature (even for water - seawater freezes at about -2°C), so<br>
using it as a "no temperature" thing is stupid but sadly common.<br>
<br>
Subsurface itself uses "0 K" as the "no temperature" marker, because<br>
subsurface wasn't written by f*cking morons. Sadly, there's much too<br>
few of us competent people..<br>
<br>
Anyway, the fact that the water temperature disappeared entirely due<br>
to the merge is obviously a bug. A simple one to fix too.<br>
<br>
> This is now even more important since I HAVE FOUND A BUG in the irda-utils<br>
> package.<br>
<br>
Ok, sadly, this I can't do anything about. Practically speaking, IRDA<br>
is dead. Nobody uses it any more, and no developer I know has any<br>
hardware or test-cases. We've found bugs over the years, and<br>
realistically they will not really get fixed.<br>
<br>
The Uwatec dive computers are literally the only use of IRDA I know<br>
of, and even there it's dying, with all modern hardware using other<br>
models of communication (ie BT or just waterproof USB connectors).<br>
<br>
But I fixed the merging issues you pointed out, and your test-case now<br>
gives me the idential result to "complete.xml" apart from some<br>
cleanups we do (ie whitespace in strings, and removing redundant<br>
cylinder pressures when the data exists in the sample data).<br>
<br>
I've created a pull request for Dirk at<br>
<br>
    <a href="https://github.com/Subsurface-divelog/subsurface/pull/213" rel="noreferrer" target="_blank">https://github.com/Subsurface-<wbr>divelog/subsurface/pull/213</a><br>
<br>
but this obviously missed the release that Dirk just did.<br>
<br>
Which admittedly is probably just as well, because the changes for<br>
dive site merging definitely need some testing. I did test the code<br>
that uses *both* names/descriptions/notes if you have the same UUID<br>
but different strings (you didn't have that, but you can create XML<br>
files that do), but people should look at it.<br>
<br>
Anyway, thanks for testing things that people generally have not tested.<br>
<span class="HOEnZb"><font color="#888888"><br>
                        Linus<br>
</font></span></blockquote></div><br></div>