[PATCH 1/2] Save all dive computer nicknames - whether used or not

Dirk Hohndel dirk at hohndel.org
Thu Jan 24 12:58:55 PST 2013


I think Linus and I discussed this off list, so I'll bring it here to
make sure people see this...

Linus Torvalds <torvalds at linux-foundation.org> writes:

> From: Linus Torvalds <torvalds at linux-foundation.org>
> Date: Thu, 24 Jan 2013 11:42:20 -0800
> Subject: [PATCH 1/2] Save all dive computer nicknames - whether used or not
>
> We used to save dive computer information only if that dive computer was
> actually used in any of the dives we saved.  But we can simplify the
> code if we just always save any dive computers we know about.  And it
> does allow for some usage cases where you have nicknames for other
> peoples computers that you may not actively use, but you want to see if
> you end up loading multiple XML files in one go.
>
> So there's just no compelling reason to not just save all the info we
> have.  And this will make it less painful to remove the "use system
> config for dive computer nicknames", because you can also use this to
> continue to gather dive computer info in a separate XML file if you want
> to.

This works perfectly fine for 99% of the users - people who usually just
work with their one data file. Or maybe a couple of them for themselves
and their partner.

This does potentially create some oddities for people like myself and
some of the other developers who have many computers, get loaner
computers, get XML files from others...

Think about this scenario:

I always use dirk.xml and my divecomputers.

I name my Uemis SDA "my Uemis" (I'm totally creative that way). Then
Linus sends me his xml file linux.xml and he (being as creative as I am)
named his Uemis SDA "my Uemis". When I open his file I will see his
divecomputer as "my Uemis". I can then rename this (and save the file
again), but the next time he sends me a new version of the file it will
be back to his naming scheme.

The workflow to actually get MY name for HIS computer into my XML files
is odd. Load his file. Close it. Load my file (the device info stays in
memory). Then manually save my file (because even though I have
information in memory that is NOT part of my file it won't be marked
changed). 

Worse, when I look at a new version of his xml file via ./subsurface
linus.xml I STILL get his name, not my name for his computer. And even
if I open my file first and then his, the name in his file will override
the name in memory...

I repeat, for "normal" users who most likely just start Subsurface from
an icon and therefore always load their default file this should never
be an issue.

But there is something slightly awkward here that I thought was easier
solved with the system config.

But Linus' argument about the inconsistency between the system config
and what we save in the XML file way outweighs my concerns about this,
so I intend to apply these patches.

I just wanted to make sure people have seen my issue.

/D


More information about the subsurface mailing list